diff --git a/.github/workflows/auto_approve_dependabot_prs.yml b/.github/workflows/auto_approve_dependabot_prs.yml new file mode 100644 index 00000000..be0ff28f --- /dev/null +++ b/.github/workflows/auto_approve_dependabot_prs.yml @@ -0,0 +1,16 @@ +name: Dependabot auto-approve +on: pull_request + +permissions: + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'Decatur-Robotics/Gearbox' + steps: + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/increment_version.yml b/.github/workflows/increment_version.yml index 364aba9d..a021286e 100644 --- a/.github/workflows/increment_version.yml +++ b/.github/workflows/increment_version.yml @@ -3,13 +3,14 @@ name: Increment Version on: workflow_call: workflow_dispatch: - pull_request: + pull_request_target: branches: [main] types: [opened] jobs: increment: runs-on: ubuntu-latest + if: steps: - name: Checkout uses: actions/checkout@v4