File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -26,22 +26,22 @@ jobs:
2626
2727 - name : Get PR author username
2828 if : github.event_name == 'pull_request'
29- id : get_author
29+ id : get_pr_author
3030 run : echo "username=${{ github.event.pull_request.user.login }}" >> $GITHUB_OUTPUT
3131
3232 - name : Get committer username (for push)
3333 if : github.event_name == 'push'
34- id : get_author
34+ id : get_committer
3535 run : echo "username=${{ github.actor }}" >> $GITHUB_OUTPUT
3636
3737 - name : Add contributor to README
3838 env :
39- CONTRIBUTOR_USERNAME : ${{ steps.get_author .outputs.username }}
39+ CONTRIBUTOR_USERNAME : ${{ steps.get_pr_author.outputs.username || steps.get_committer .outputs.username }}
4040 run : |
4141 node .github/scripts/add-contributor.js
4242
4343 - name : Commit changes
4444 uses : stefanzweifel/git-auto-commit-action@v5
4545 with :
46- commit_message : " chore: add ${{ steps.get_author .outputs.username }} to Contributors in README"
46+ commit_message : " chore: add ${{ steps.get_pr_author.outputs.username || steps.get_committer .outputs.username }} to Contributors in README"
4747 branch : main
You can’t perform that action at this time.
0 commit comments