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
8 changes: 6 additions & 2 deletions .github/workflows/baseline-profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,12 @@ jobs:
cat "$RUNNER_TEMP/summary.md"
} > "$RUNNER_TEMP/body.md"

if [ -n "$(gh pr list --head "$BRANCH" --state open --json number --jq '.[].number')" ]; then
gh pr edit "$BRANCH" --body-file "$RUNNER_TEMP/body.md"
PR_NUMBER=$(gh pr list --head "$BRANCH" --state open --json number --jq '.[0].number')
if [ -n "$PR_NUMBER" ]; then
# Update through the REST API: `gh pr edit` also queries fields that need the read:org
# scope, which the bot token does not have.
gh api --method PATCH "repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}" \
-F "body=@$RUNNER_TEMP/body.md" --silent
else
gh pr create --base main --head "$BRANCH" --title "chore: regenerate Baseline Profiles" --body-file "$RUNNER_TEMP/body.md"
fi
Loading