From d31ce82a13806a529dd168de5864570f96d735bf Mon Sep 17 00:00:00 2001 From: Brandon Pitman Date: Wed, 20 Sep 2023 12:09:37 -0700 Subject: [PATCH] Test fix to dependabot-automerge.yml. --- .github/workflows/dependabot-automerge.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml index a8af4e7f7..a54abe7f2 100644 --- a/.github/workflows/dependabot-automerge.yml +++ b/.github/workflows/dependabot-automerge.yml @@ -4,10 +4,17 @@ on: pull_request jobs: dependabot: runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} + # TODO: remove head_ref condition + if: ${{ github.actor == 'dependabot[bot]' || github.head_ref == 'dependabot/cargo/main/clap-4.4.4' }} steps: + - name: Dump GitHub context (temporary) # TODO: remove this step + run: echo "$GITHUB_CONTEXT" + env: + GITHUB_CONTEXT: ${{ toJson(github) }} - name: Approve & enable auto-merge for Dependabot PRs - run: gh pr review --approve -b "Auto-approving dependabot PR." "$PR_URL" && gh pr merge --auto --squash "$PR_URL" + # TODO: restore auto-merge + # run: gh pr review --approve -b "Auto-approving dependabot PR." "$PR_URL" && gh pr merge --auto --squash "$PR_URL" + run: gh pr review --approve -b "Auto-approving dependabot PR." "$PR_URL" env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.DIVVIUP_GITHUB_AUTOMATION_DEPENDABOT_APPROVER_PAT}} + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.DIVVIUP_GITHUB_AUTOMATION_DEPENDABOT_APPROVER_PAT }}