From 522556a62862c1a58b0634ccdad12822091a85dd Mon Sep 17 00:00:00 2001 From: Tobias Berger Date: Wed, 21 Jan 2026 22:20:18 +0000 Subject: [PATCH] Automate credits workflow (#5258) * Change GITHUB_TOKEN to BOT_TOKEN in credits workflow Signed-off-by: Tobias Berger * If at first you don't succeed Try try again * Maybe this one? * Surely this time it'll work * Chest compressions, chest compressions, chest compressions * squasmgsh * Undo that * Hm yes newline --------- Signed-off-by: Tobias Berger --- .github/PULL_REQUEST_TEMPLATE.md | 3 +- .github/workflows/update-credits.yml | 44 ++++++++++++++++++---------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7909cc3f75..64a7de1b5f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -22,8 +22,7 @@ Small fixes/refactors are exempt. --> ## Licensing +This just saves them the trouble. Note that AGPL or MIT licensing is only applicable to SOFTWARE, and that assets such as textures and audio have their own licensing scheme that is defined in the codebase itself. --> - [ ] I confirm that I am the creator of the code in this PR, and allow licensing it under the following license(s), or that the original author(s) has given me permission to do so: - [X] AGPL (https://github.com/DeltaV-Station/Delta-v/blob/master/LICENSE-AGPLv3.txt) - [X] MIT (https://github.com/DeltaV-Station/Delta-v/blob/master/LICENSE-MIT.txt) diff --git a/.github/workflows/update-credits.yml b/.github/workflows/update-credits.yml index 3f00658db1..79f10b487f 100644 --- a/.github/workflows/update-credits.yml +++ b/.github/workflows/update-credits.yml @@ -34,22 +34,34 @@ jobs: # Uncomment this and comment the other line if you do this. # https://github.com/stefanzweifel/git-auto-commit-action#push-to-protected-branches - - name: Commit new credit files - uses: stefanzweifel/git-auto-commit-action@v7 - with: - commit_message: Update Credits - commit_author: DeltaV-Bot - token: ${{ secrets.GITHUB_TOKEN }} + # - name: Commit new credit files + # uses: stefanzweifel/git-auto-commit-action@v7 + # with: + # commit_message: Update Credits + # commit_author: DeltaV-Bot + # token: ${{ secrets.GITHUB_TOKEN }} # This will make a PR - # - name: Set current date as env variable - # run: echo "NOW=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_ENV + - name: Set current date as env variable + run: echo "NOW=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_ENV - # - name: Create Pull Request - # uses: peter-evans/create-pull-request@v5 - # with: - # commit-message: Update Credits - # title: Update Credits - # body: This is an automated Pull Request. This PR updates the github contributors in the credits section. - # author: DeltaV-Bot - # branch: automated/credits-${{env.NOW}} + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v5 + with: + commit-message: Update Credits + title: Update Credits + body: This is an automated Pull Request. This PR updates the github contributors in the credits section. + author: DeltaV-Bot + branch: automated/credits-${{env.NOW}} + + - name: Auto-merge PR with bypass + if: steps.cpr.outputs.pull-request-number != '' + env: + GH_TOKEN: ${{secrets.CREDITS_TOKEN}} + run: | + gh pr merge ${{ steps.cpr.outputs.pull-request-number }} \ + --squash \ + --admin \ + --delete-branch \ + --repo ${{ github.repository }}