Skip to content

Commit 8075780

Browse files
authored
Merge pull request Expensify#68301 from Expensify/jules-notifyOnCPConflict
[NO QA] Ping deployers in slack when a CP request failed due to conflicts
2 parents 817ef88 + 317d133 commit 8075780

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/cherryPick.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,30 @@ jobs:
240240
--label "Engineering,Hourly,${{ inputs.TARGET == 'staging' && 'CP Staging' || 'CP Production' }}" \
241241
--base "${{ inputs.TARGET }}"
242242
sleep 5
243+
244+
# Save the Cherry-pick PR URL for Slack notification
245+
PR_URL="$(gh pr view --json url --jq .url)"
246+
echo "PR_URL=$PR_URL" >> "$GITHUB_OUTPUT"
243247
env:
244248
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
245249

250+
- name: Announce CP conflict in #deployer
251+
if: steps.cherryPick.outputs.HAS_CONFLICTS == 'true'
252+
uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e
253+
with:
254+
status: custom
255+
custom_payload: |
256+
{
257+
"channel": "#deployer",
258+
"attachments": [{
259+
"color": "#DB4545",
260+
"text": "🚨 Cherry-pick to ${{ inputs.TARGET }} has conflicts and requires manual resolution.\nOriginal PR: ${{ inputs.PULL_REQUEST_URL }}\nConflict PR: ${{ steps.createPullRequest.outputs.PR_URL }}"
261+
}]
262+
}
263+
env:
264+
GITHUB_TOKEN: ${{ github.token }}
265+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
266+
246267
- name: Add assignees to conflict PRs
247268
if: steps.cherryPick.outputs.HAS_CONFLICTS == 'true'
248269
run: |

0 commit comments

Comments
 (0)