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
19 changes: 13 additions & 6 deletions .github/workflows/ai-prep-sync-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,26 @@ jobs:
echo "title=$new_title" >> "$GITHUB_OUTPUT"
fi

- name: Commit and push changeset(s)
- name: Commit changeset(s)
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
BRANCH: ${{ github.event.pull_request.head.ref }}
run: |
if [ -z "$(git status --porcelain .changeset)" ]; then
echo "No changeset changes to commit"
exit 0
fi
git config user.name "fingerprint-dx-team-actions-runner[bot]"
git config user.email "fingerprint-dx-team-actions-runner[bot]@users.noreply.github.com"
git add .changeset/
git commit -m "chore: add changeset(s) [skip ci-ai-prep]"
git push origin HEAD:${{ github.event.pull_request.head.ref }}

# Commit through the API so GitHub signs each commit with the app's
# key; a local `git commit` + `git push` would be unsigned.
for file in $(git ls-files --others --exclude-standard -- .changeset/); do
Comment thread
mcnulty-fp marked this conversation as resolved.
echo "Committing $file"
gh api --method PUT "repos/$GITHUB_REPOSITORY/contents/$file" \
--field branch="$BRANCH" \
--field message="chore: add changeset $(basename "$file") [skip ci-ai-prep]" \
--field content="$(base64 -w0 "$file")" \
--silent
done

- name: Rename PR
if: steps.title.outputs.title != ''
Expand Down
Loading