Skip to content

Commit

Permalink
updated update_credits.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
qcdyx committed Nov 20, 2023
1 parent 69aea65 commit e804aa2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/update_credits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,24 @@ name: Update Credits upon merging PR

on:
pull_request:
branches:
- master
types:
- closed
- opened

jobs:
update-credits:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v4
with:
ref: master
- run: |
contributor_name=$(jq -r '.pull_request.user.login' $GITHUB_EVENT_PATH)
pr_description=$(jq -r '.pull_request.body' $GITHUB_EVENT_PATH)
echo "### Timestamp:" >> .github/credits.md
echo "$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> .github/credits.md
echo "### Contributor:" >> .github/credits.md
echo "${{ github.event.pull_request.user.login }}" >> .github/credits.md
echo "#### PR Title:" >> .github/credits.md
echo "${{ github.event.pull_request.title }}" >> .github/credits.md
echo "############################################" >> .github/credits.md
echo "########################################################################################x" >> .github/credits.md
git add .github/credits.md
git config --local user.email "[email protected]"
Expand Down

0 comments on commit e804aa2

Please sign in to comment.