Skip to content

Commit 5b99768

Browse files
authored
Merge pull request #94 from django/remove-team-reviewers
Use gh cli instead of third-party action for PR creation
2 parents 3b4216e + 458ca86 commit 5b99768

1 file changed

Lines changed: 29 additions & 12 deletions

File tree

.github/workflows/update-changelog.yml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,32 @@ jobs:
2424
run: |
2525
bash scripts/update_changelog.sh
2626
27-
- name: Create Pull Request
28-
uses: peter-evans/create-pull-request@v6
29-
with:
30-
commit-message: Update changelog
31-
title: Update changelog
32-
body: |
33-
This PR updates the changelog with recent changes.
34-
35-
Auto-generated by workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
36-
branch: changelog-update-${{ github.run_number }}
37-
delete-branch: true
38-
team-reviewers: coc-committee
27+
- name: Create and push branch with changelog update
28+
shell: bash
29+
env:
30+
GH_TOKEN: ${{ github.token }}
31+
run: |
32+
set -euo pipefail
33+
34+
if git diff --quiet -- CHANGELOG.md; then
35+
echo "No changelog updates to commit."
36+
exit 0
37+
fi
38+
39+
BRANCH="changelog-update-${{ github.run_number }}"
40+
41+
git config user.name "github-actions[bot]"
42+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
43+
44+
git checkout -b "${BRANCH}"
45+
git add CHANGELOG.md
46+
git commit -m "Update changelog"
47+
git push origin "${BRANCH}"
48+
49+
gh pr create \
50+
--title "Update changelog" \
51+
--body "This PR updates the changelog with recent changes.
52+
53+
Auto-generated by workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
54+
--base main \
55+
--head "${BRANCH}"

0 commit comments

Comments
 (0)