From 6c7342b9aa2f3935c76d48d8aeb1d4eb43229129 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sat, 5 Mar 2022 17:16:28 +0300 Subject: [PATCH] fix workflow Signed-off-by: Vasiliy Tolstov --- .github/workflows/autoreview.yml | 25 ++++++++++++++++++++++ .github/workflows/dependabot-automerge.yml | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/autoreview.yml diff --git a/.github/workflows/autoreview.yml b/.github/workflows/autoreview.yml new file mode 100644 index 0000000..69e9d5b --- /dev/null +++ b/.github/workflows/autoreview.yml @@ -0,0 +1,25 @@ +name: "prautomerge" + +on: + pull_request_target: + types: [assigned, opened, synchronize, reopened] + +permissions: + pull-requests: write + contents: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'vtolstov' }} + steps: + - name: metadata + id: metadata + uses: dependabot/fetch-metadata@v1.3.0 + with: + github-token: "${{ secrets.TOKEN }}" + - name: approve + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.TOKEN}} diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml index 8190317..f1f7774 100644 --- a/.github/workflows/dependabot-automerge.yml +++ b/.github/workflows/dependabot-automerge.yml @@ -11,7 +11,7 @@ permissions: jobs: dependabot: runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'vtolstov' }} + if: ${{ github.actor == 'dependabot[bot]'}} steps: - name: metadata id: metadata