Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci/automerge): use PAT token #415

Merged
merged 1 commit into from
Nov 19, 2024
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
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"acpica",
"addinivalue",
"addoption",
"automerge",
"autopep",
"blkio",
"bsdmainutils",
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/bot--automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions: read-all

jobs:
# Enable auto-merge on all pull requests by default
# Docs: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request
enable-auto-merge:
runs-on: ubuntu-latest
permissions:
Expand All @@ -23,10 +24,11 @@ jobs:
run: |
gh pr merge --auto "${{ github.event.pull_request.number }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_PAT_AUTOMERGE }}

# If PR is made by dependabot, automatically approve the PR
# Linting and all checks will still have to pass in order for the PR to be merged
# Docs: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#approve-a-pull-request
auto-approve-dependabot:
runs-on: ubuntu-latest
permissions:
Expand All @@ -36,8 +38,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Auto approve dependabot pull requests
if: github.actor == 'dependabot[bot]'
if: ${{ github.actor == 'dependabot[bot]' }}
run: |
gh pr review "${{ github.event.pull_request.number }}" --approve
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_PAT_AUTOMERGE }}