Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/lock-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ jobs:
PR_NUMBERS=$(gh pr list -L 100 -R primer/react --state open --json number,baseRefName,autoMergeRequest,reviewDecision -q '.[] | select(.autoMergeRequest != null) | select(.baseRefName == "main") | select(.reviewDecision == "APPROVED") | .number')
if [ -n "$PR_NUMBERS" ]; then
echo "Updating $PR_NUMBERS"
echo "$PR_NUMBERS" | xargs -I {} gh pr update-branch -R primer/react {}
for pr in $PR_NUMBERS; do
gh pr update-branch -R primer/react "$pr" || echo "Warning: failed to update PR #$pr (likely has conflicts)"
done
Comment on lines +86 to +88
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gh pr update-branch ... || echo ... will now treat any update-branch failure as a success (not just merge-conflict failures). That can mask real problems like auth/permission issues or GitHub API outages and still report the workflow as successful. Consider detecting/ignoring only the known conflict case (or at least tracking failures and failing the step if all/most updates fail), while still continuing past individual conflict errors.

Suggested change
for pr in $PR_NUMBERS; do
gh pr update-branch -R primer/react "$pr" || echo "Warning: failed to update PR #$pr (likely has conflicts)"
done
failed=0
for pr in $PR_NUMBERS; do
if ! output=$(gh pr update-branch -R primer/react "$pr" 2>&1); then
if echo "$output" | grep -qi "merge conflict"; then
echo "Warning: failed to update PR #$pr (merge conflict detected)"
else
echo "Error: failed to update PR #$pr due to an unexpected error"
echo "$output"
failed=1
fi
fi
done
if [ "$failed" -ne 0 ]; then
echo "One or more PR updates failed due to unexpected errors."
exit 1
fi

Copilot uses AI. Check for mistakes.
else
echo "No PRs to update."
fi
Expand Down
Loading