Skip to content

Commit

Permalink
Feat: update the automerge workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolnagpal committed Dec 5, 2023
1 parent d570532 commit a948970
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,24 @@ jobs:
autoapprove:
name: Auto Approve a PR by dependabot
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]' && success() && github.event_name == 'pull_request'
if: github.actor == 'dependabot[bot]'
steps:

- name: Get Status of current ref
id: get-status
uses: danieldeichfuss/get-status@v0
with:
ref: ${{ github.sha }}

- name: Approve a PR for Github Bot
if: ${{steps.get-status.outputs.all-checks-completed == 'true' && steps.get-status.outputs.all-checks-passed == 'true'}}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Approve a PR for Anmol nagpal
if: ${{steps.get-status.outputs.all-checks-completed == 'true' && steps.get-status.outputs.all-checks-passed == 'true'}}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
Expand Down

0 comments on commit a948970

Please sign in to comment.