Skip to content

Add permissions for auto-merge workflow #3

Add permissions for auto-merge workflow

Add permissions for auto-merge workflow #3

name: Comment for Merge Dependabot PRs Automatically
on:
pull_request:
jobs:
comment:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'dependabot/')
permissions:
pull-requests: write
steps:
- name: Comment to merge dependabot PR
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: '@dependabot merge'
})
github-token: ${{ secrets.GITHUB_TOKEN }}