@@ -198,6 +198,9 @@ const { masterBranch } = __nccwpck_require__(51629);
198198
199199function toPr(context) {
200200 let { base, body, user, html_url, title, number, head, id} = context.payload.pull_request
201+ let repoFullName = (base && base.repo && base.repo.full_name) ||
202+ (head && head.repo && head.repo.full_name) || "";
203+
201204 return {
202205 description: body,
203206 authorHandle: user.login,
@@ -207,7 +210,8 @@ function toPr(context) {
207210 from: head.ref,
208211 to: base.ref,
209212 id: id,
210- typeOfChange: head.ref.split('/')[0]
213+ typeOfChange: head.ref.split('/')[0],
214+ repoFullName: repoFullName
211215 }
212216}
213217
@@ -415,6 +419,7 @@ async function test() {
415419 // await onPrClose({ payload: { pull_request: closedPr } })
416420}
417421
422+
418423/***/ }),
419424
420425/***/ 87351:
@@ -107969,6 +107974,10 @@ function entry(label, value) {
107969107974 return slack.markdown(`*${label}:* ${value}`)
107970107975}
107971107976
107977+ function repoPrefix(pr) {
107978+ return pr && pr.repoFullName ? `[${pr.repoFullName}] ` : ""
107979+ }
107980+
107972107981async function notifyNewPR(pr) {
107973107982 if (isAuthoredByBot(pr.authorHandle)) {
107974107983 return;
@@ -107987,8 +107996,9 @@ async function notifyNewPR(pr) {
107987107996async function notifyMergedPR(pr, mergedBy) {
107988107997 let textMessage = `${mergedBy} has merged a PR ${pr.title}(${pr.url})`
107989107998 if (isAuthoredByBot(mergedBy)) {
107999+ let completedMessage = `${repoPrefix(pr)}${pr.title} - completed`
107990108000 await slack.sendMessage(channelName(pr), textMessage, [
107991- slack.markdown(pr.title + " - completed" )
108001+ slack.markdown(completedMessage )
107992108002 ]);
107993108003 return
107994108004 }
@@ -108049,6 +108059,7 @@ async function autoSyncFailed(channelName) {
108049108059}
108050108060module.exports = {notifyNewPR, notifyMergedPR, notifyClosedPR, notifyPrHasConflicts, notifyPrMergeFailed, autoSyncFailed}
108051108061
108062+
108052108063/***/ }),
108053108064
108054108065/***/ 22877:
0 commit comments