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
28 changes: 14 additions & 14 deletions .github/workflows/sync-from-accelerate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,29 +113,29 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
BODY=$(cat <<EOF
This pull request synchronizes DIDAS with the canonical Accelerate upstream.

Upstream: https://github.com/$UPSTREAM_REPOSITORY
Upstream commit: `$UPSTREAM_SHA`

Repository-specific DIDAS publication and synchronization workflows are preserved.
The synchronized tree passed the repository's validation commands before this PR was created.

This PR is generated by GitHub Actions.
EOF
)
BODY_FILE="$RUNNER_TEMP/sync-pr-body.md"
printf '%s\n' \
'This pull request synchronizes DIDAS with the canonical Accelerate upstream.' \
'' \
"Upstream: https://github.com/$UPSTREAM_REPOSITORY" \
"Upstream commit: \`$UPSTREAM_SHA\`" \
'' \
'Repository-specific DIDAS publication and synchronization workflows are preserved.' \
"The synchronized tree passed the repository's validation commands before this PR was created." \
'' \
'This PR is generated by GitHub Actions.' \
> "$BODY_FILE"

if NUMBER=$(gh pr view "$SYNC_BRANCH" --json number --jq .number 2>/dev/null); then
gh pr edit "$NUMBER" \
--title "Sync from Accelerate upstream" \
--body "$BODY"
--body-file "$BODY_FILE"
else
gh pr create \
--base main \
--head "$SYNC_BRANCH" \
--title "Sync from Accelerate upstream" \
--body "$BODY"
--body-file "$BODY_FILE"
fi

- name: Close stale synchronization PR when no drift remains
Expand Down
Loading