Skip to content

Commit df10db5

Browse files
committed
Create PR instead of pushing to develop branch
1 parent c68f208 commit df10db5

1 file changed

Lines changed: 25 additions & 10 deletions

File tree

.github/workflows/update_contributors.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,37 @@ jobs:
6262
lfs: false
6363
timeout-minutes: 10
6464

65-
# Configure Git:
66-
- name: 'Configure Git'
67-
run: |
68-
git config --local user.email "noreply@stdlib.io"
69-
git config --local user.name "stdlib-bot"
70-
timeout-minutes: 5
71-
7265
# Run the makefile target for updating the contributors list:
7366
- name: 'Update contributors list'
67+
id: update-contributors
7468
run: |
7569
make update-contributors
7670
7771
if [[ -z "$(git status --porcelain)" ]]; then
7872
echo "No changes to commit."
79-
exit 0
73+
echo "changed=false" >> $GITHUB_OUTPUT
8074
else
81-
git add CONTRIBUTORS && git commit -m "Update contributors"
82-
git push origin develop
75+
echo "changed=true" >> $GITHUB_OUTPUT
8376
fi
77+
78+
# Create a pull request with the updated contributors list:
79+
- name: 'Create pull request'
80+
id: cpr
81+
uses: peter-evans/create-pull-request@v4
82+
if: steps.update-contributors.outputs.changed == 'true'
83+
with:
84+
title: 'Update list of contributors'
85+
body: |
86+
This PR
87+
88+
- updates list of contributors
89+
90+
commit-message: 'Update list of contributors'
91+
committer: 'stdlib-bot <noreply@stdlib.io>'
92+
labels: |
93+
documentation
94+
automated-pr
95+
team-reviewers: |
96+
stdlib-reviewers
97+
branch: update-contributors
98+
delete-branch: true

0 commit comments

Comments
 (0)