File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
const express = require ( 'express' ) ;
2
2
const path = require ( 'path' ) ;
3
3
const axios = require ( 'axios' ) ;
4
+ const markdownit = require ( 'markdown-it' ) ;
5
+ const md = new markdownit ( ) ;
4
6
// const fs = require('fs');
5
7
const app = express ( ) ;
6
8
@@ -44,6 +46,14 @@ function getOneLineSummaryAndDescription(event) { // TODO: make logic to merge s
44
46
const action = event . payload . action ;
45
47
return actorHref + ' ' + action + ' member ' + whomHref + ' to ' + repoHref ;
46
48
49
+ case 'IssueCommentEvent' :
50
+ const issueHref = `<a href="${ event . payload . issue . html_url } " target="_blank">${ event . payload . issue . title } #${ event . payload . issue . number } </a>` ;
51
+ const body = md . render ( event . payload . comment . body ) ;
52
+ return {
53
+ summaryLine : actorHref + ' commented on ' + issueHref ,
54
+ description : body ,
55
+ } ;
56
+
47
57
// INFO: below events are identified by AI assistant, but i didn't find them in my feed api
48
58
// case 'PullRequestEvent':
49
59
// return 'opened a pull request';
Original file line number Diff line number Diff line change 1
1
{
2
2
"dependencies" : {
3
+ "axios" : " ^1.7.7" ,
3
4
"express" : " ^4.21.1" ,
4
- "axios " : " ^1.7.7 "
5
+ "markdown-it " : " ^14.1.0 "
5
6
}
6
7
}
You can’t perform that action at this time.
0 commit comments