Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/add-git-trailers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
github.event.pull_request.base.ref == 'main' &&
github.event.review.state == 'approved' &&
(github.event.pull_request.rebaseable == null ||
github.event.pull_request.rebaseable == true)
github.event.pull_request.rebaseable == true)
runs-on: ubuntu-22.04
steps:
- name: Harden the runner (Audit all outbound calls)
Expand All @@ -41,15 +41,13 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}

- name: Append git trailers
uses: nubificus/git-trailers@71281069ce88ac3c3c7615181bdbe1d022670000 # main_external
uses: nubificus/git-trailers@e3cefe03237a8a33f12ee41a8194bfb03a4d179b # fix_auto_merge
with:
user-info: .github/contributors.yaml
token: ${{ steps.generate-token.outputs.token }}
user_info: .github/contributors.yaml

- name: Merge PR
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
sleep 5
gh pr merge "$PR_URL" --rebase --admin
10 changes: 7 additions & 3 deletions .github/workflows/pr-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ on:
branches:
- 'main-pr*'

permissions:
contents: read

jobs:
add-trailers-and-merge:
if: |
github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.base.ref, 'main-pr')
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Harden the runner (Audit all outbound calls)
Expand All @@ -34,10 +39,9 @@ jobs:
private-key: ${{ secrets.URUNC_BOT_PRIVATE_KEY }}

- name: Append git trailers
uses: nubificus/git-trailers@71281069ce88ac3c3c7615181bdbe1d022670000 # main_external
uses: nubificus/git-trailers@e3cefe03237a8a33f12ee41a8194bfb03a4d179b # fix_auto_merge
with:
user-info: .github/contributors.yaml
token: ${{ steps.generate-token.outputs.token }}
user_info: .github/contributors.yaml

- name: Create a Pull Request from PR_BRANCH to main and merge it
env:
Expand Down
Loading