Skip to content

Commit c9d8d2a

Browse files
committed
Add more context
1 parent 8d8405d commit c9d8d2a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/merge-to-stage.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,16 @@ const getPRs = async () => {
106106
prs = prs.filter(({ checks, reviews, html_url, number, title }) => {
107107
if (hasFailingChecks(checks)) {
108108
slackNotification(slack.failingChecks({ html_url, number, title }));
109-
if (number === currPrNumber) core.setFailed('Failing checks.');
109+
if (number === currPrNumber)
110+
core.setFailed(`Failing checks on the current PR ${number}`);
110111
return false;
111112
}
112113

113114
const approvals = reviews.filter(({ state }) => state === 'APPROVED');
114115
if (approvals.length < requiredApprovals) {
115116
slackNotification(slack.requireApprovals({ html_url, number, title }));
116-
if (number === currPrNumber) core.setFailed('Insufficient approvals.');
117+
if (number === currPrNumber)
118+
core.setFailed(`Insufficient approvals on the current PR ${number}`);
117119
return false;
118120
}
119121

@@ -210,7 +212,7 @@ const main = async (params) => {
210212
}
211213
try {
212214
const stageToMainPR = await getStageToMainPR();
213-
console.log('has Stage to Main PR: ', !!stageToMainPR);
215+
console.log('has Stage to Main PR:', !!stageToMainPR);
214216
if (stageToMainPR?.labels.some((label) => label.includes(labels.SOTPrefix)))
215217
return console.log('PR exists & testing started. Stopping execution.');
216218
const prs = await getPRs();

.github/workflows/merge-to-stage.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
env:
1111
MILO_RELEASE_SLACK_WH: ${{ secrets.MILO_RELEASE_SLACK_WH }}
12+
REQUIRED_APPROVALS: ${{ secrets.REQUIRED_APPROVALS }}
1213

1314
jobs:
1415
merge-to-stage:

0 commit comments

Comments
 (0)