Skip to content

Commit

Permalink
Use GitHub CLI comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Pil0tXia committed Apr 18, 2024
1 parent e934ca2 commit dca69b3
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ permissions:
pull-requests: write

jobs:
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions
# Pull request Auto merge is not enabled for this repository
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
Expand All @@ -33,15 +35,16 @@ jobs:
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Approve a PR
- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Enable auto-merge for Dependabot PRs
# comment '@dependabot merge' to merge the PR
- name: Comment and Merge PR
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --merge "$PR_URL"
run: gh pr comment $PR_URL -b "@dependabot merge"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit dca69b3

Please sign in to comment.