@@ -9,6 +9,7 @@ export default (app: Probot) => {
99 try {
1010 const issue = context . payload . issue ;
1111 const label = context . payload . label ?. name ;
12+ const lang = context . payload . repository . language ?? "Unknown"
1213
1314 if ( label === "zap reward" ) {
1415 const comments = await context . octokit . issues . listComments ( {
@@ -22,7 +23,7 @@ export default (app: Probot) => {
2223 . find ( ( request ) => request !== null ) ;
2324
2425 if ( zapRequest ) {
25- const message = generateMessage ( zapRequest . amount , issue . title , issue . html_url ) ;
26+ const message = generateMessage ( zapRequest . amount , issue . title , issue . html_url , lang ) ;
2627 await sendToAll ( message ) ;
2728 }
2829 }
@@ -35,10 +36,11 @@ export default (app: Probot) => {
3536 try {
3637 const comment = context . payload . comment . body ;
3738 const issue = context . payload . issue ;
39+ const lang = context . payload . repository . language ?? "Unknown"
3840 const zapRequest = parseZapReward ( comment ) ;
3941
4042 if ( zapRequest ) {
41- const message = generateMessage ( zapRequest . amount , issue . title , issue . html_url ) ;
43+ const message = generateMessage ( zapRequest . amount , issue . title , issue . html_url , lang ) ;
4244 await sendToAll ( message ) ;
4345 }
4446 } catch ( error ) {
@@ -86,11 +88,12 @@ function parseZapReward(comment: string) {
8688 }
8789}
8890
89- function generateMessage ( amount : number , title : string , link : string ) : string {
91+ function generateMessage ( amount : number , title : string , link : string , language : string ) : string {
9092 return (
9193 `π New Zap Reward Request π\n\n` +
9294 `**Issue:** π ${ title } \n\n` +
93- `**Amount:** ${ amount } Sats β‘ \n\n` +
95+ `**Amount:** ${ amount } β‘ Sats \n\n` +
96+ `**Language:** π» ${ language } \n\n` +
9497 `This reward has been requested for the following issue:\n` +
9598 `π View Issue Here:\n${ link } \n\n` +
9699 `Thank you for your participation! π\n\n` +
0 commit comments