Skip to content

Commit 1363c79

Browse files
authored
Fix auto-merge workflow to use GITHUB_TOKEN (#19)
1 parent f548d31 commit 1363c79

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/auto-merge.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
name: Auto-merge
22
on:
3-
pull_request:
3+
pull_request_target:
44
types: [opened, synchronize, reopened]
55

6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
610
jobs:
711
auto-merge:
812
name: 🤝 Auto-merge
913
runs-on: ubuntu-latest
10-
if: |
11-
(github.actor == 'gaborbernat' || github.actor == 'dependabot[bot]' || github.actor == 'pre-commit-ci[bot]')
12-
&& vars.AUTO_MERGE_ENABLED == 'true'
14+
if: github.actor == 'gaborbernat' || github.actor == 'dependabot[bot]' || github.actor == 'pre-commit-ci[bot]' || github.actor == 'github-actions[bot]'
1315
steps:
1416
- name: 🔀 Enable auto-merge
1517
run: gh pr merge --auto --squash "$PR_URL"
1618
env:
1719
PR_URL: ${{ github.event.pull_request.html_url }}
18-
GH_TOKEN: ${{ secrets.AUTO_MERGE_TOKEN }}
20+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)