From f91390b2c8375903eede66791921a58b8466caf5 Mon Sep 17 00:00:00 2001 From: Danny Kopping Date: Thu, 28 May 2026 13:26:04 +0200 Subject: [PATCH] ci: don't fail job if commenting on locked PR (#25765) The final step of `.github/workflows/cherry-pick.yaml` comments on the original PR with a link to the cherry-pick PR. If the original PR is locked, `gh pr comment` fails and the whole job exits with status 1, even though the backport branch and PR were created successfully. See https://github.com/coder/coder/actions/runs/26559681779/job/78239379200 for an example. Make the comment non-fatal: log a warning and continue. Co-authored-by: Claude Opus 4.7 (1M context) --- .github/workflows/cherry-pick.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cherry-pick.yaml b/.github/workflows/cherry-pick.yaml index 98abd79382..8528f7b703 100644 --- a/.github/workflows/cherry-pick.yaml +++ b/.github/workflows/cherry-pick.yaml @@ -154,4 +154,5 @@ jobs: if [ "$CONFLICT" = true ]; then COMMENT="${COMMENT} (⚠️ conflicts need manual resolution)" fi - gh pr comment "$PR_NUMBER" --body "$COMMENT" + # Don't fail the job if commenting fails (e.g. the original PR is locked). + gh pr comment "$PR_NUMBER" --body "$COMMENT" || echo "::warning::Failed to comment on #${PR_NUMBER} (PR may be locked)."