@@ -59,7 +59,7 @@ async function resolveAllComments(context, prNumber) {
5959 )
6060
6161 for (const comment of comments) {
62- if (comment.user.login !== 'cursor[bot]' || comment.user.login !== 'snyk-io[bot]') continue;
62+ if (comment.user.login !== 'cursor[bot]' && comment.user.login !== 'snyk-io[bot]') continue;
6363 console.log("deleting comment : " + comment.id);
6464 await context.octokit.request(
6565 'DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}',
@@ -193,6 +193,7 @@ exports.masterBranch = masterBranch;
193193const notifications = __nccwpck_require__(53474);
194194const github = __nccwpck_require__(76898);
195195const core = __nccwpck_require__(42186);
196+ const slack = __nccwpck_require__(38154);
196197const { masterBranch } = __nccwpck_require__(51629);
197198
198199function toPr(context) {
@@ -327,6 +328,7 @@ async function raisePrToAllStagingBranches(context, onMergeConflict) {
327328 try {
328329 let stagingBranchNames = await fetchingStagingBranchNames(context)
329330 console.log(`Raising PR to all staging branches - ${stagingBranchNames.join(", ")}`)
331+ throw new Error("Throwing a dummy error")
330332 return stagingBranchNames.map(async (branchName) => {
331333 let existingOpenPr = await github.fetchOpenPr(context, masterBranch, branchName);
332334 if (existingOpenPr) {
@@ -341,8 +343,9 @@ async function raisePrToAllStagingBranches(context, onMergeConflict) {
341343 return createdPr
342344 })
343345 } catch(err) {
344- console.log("ERROR!")
345346 console.log(err)
347+ slack.autoSyncFailed("master");
348+ throw err;
346349 }
347350}
348351
@@ -108038,7 +108041,14 @@ async function notifyPrMergeFailed(pr) {
108038108041 slack.markdown(`Team <!here>, fix it by merging <${pr.url}|this PR> *manually*.`)
108039108042 ])
108040108043}
108041- module.exports = {notifyNewPR, notifyMergedPR, notifyClosedPR, notifyPrHasConflicts, notifyPrMergeFailed}
108044+
108045+ async function autoSyncFailed(channelName) {
108046+ let textMessage = `AUTO SYNC FAILED`
108047+ await slack.sendMessage(channelName, textMessage, [
108048+ slack.header(":need_action: AUTO SYNC FAILED :need_action:")
108049+ ])
108050+ }
108051+ module.exports = {notifyNewPR, notifyMergedPR, notifyClosedPR, notifyPrHasConflicts, notifyPrMergeFailed, autoSyncFailed}
108042108052
108043108053/***/ }),
108044108054
0 commit comments