From 576e7dd46a51177cfbdfe0bd59ddfae126f89c09 Mon Sep 17 00:00:00 2001 From: asyncapi-bot <61865014+asyncapi-bot@users.noreply.github.com> Date: Tue, 10 Aug 2021 14:27:28 +0200 Subject: [PATCH] ci: update global workflows --- .github/workflows/automerge-orphans.yml | 8 +++++++- .github/workflows/automerge.yml | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/automerge-orphans.yml b/.github/workflows/automerge-orphans.yml index d712c13d0..a053d0cbe 100644 --- a/.github/workflows/automerge-orphans.yml +++ b/.github/workflows/automerge-orphans.yml @@ -38,7 +38,13 @@ jobs: }; const { repository: { pullRequests: { nodes } } } = await github.graphql(query, variables); - let orphans = nodes.filter((pr)=> pr.state === 'OPEN' && (pr.author.resourcePath === '/asyncapi-bot' || pr.author.resourcePath === '/apps/dependabot')) + let orphans = nodes.filter((pr)=> { + console.log('PR', pr.url); + console.log('State', pr.state); + console.log('Author resource path', pr.author.resourcePath); + console.log('Is orphan', pr.state === 'OPEN' && (pr.author.resourcePath === '/asyncapi-bot' || pr.author.resourcePath === '/apps/dependabot')); + return pr.state === 'OPEN' && (pr.author.resourcePath === '/asyncapi-bot' || pr.author.resourcePath === '/apps/dependabot') + }) if (orphans.length) { core.setOutput('found', 'true'); diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 19c8d1891..1968cb809 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Autoapproving uses: hmarr/auto-approve-action@v2 - if: github.actor == 'asyncapi-bot' || github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' + if: github.actor == ('asyncapi-bot' || github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') && !contains(github.event.pull_request.labels.*.name, 'released') with: github-token: "${{ secrets.GITHUB_TOKEN }}" @@ -44,4 +44,4 @@ jobs: MERGE_METHOD: "squash" MERGE_COMMIT_MESSAGE: "pull-request-title" MERGE_RETRIES: "20" - MERGE_RETRY_SLEEP: "20000" \ No newline at end of file + MERGE_RETRY_SLEEP: "30000" \ No newline at end of file