Skip to content

Commit

Permalink
ci: update global workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
asyncapi-bot authored Aug 10, 2021
1 parent ba77b5e commit 576e7dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/automerge-orphans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

Expand All @@ -44,4 +44,4 @@ jobs:
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "pull-request-title"
MERGE_RETRIES: "20"
MERGE_RETRY_SLEEP: "20000"
MERGE_RETRY_SLEEP: "30000"

0 comments on commit 576e7dd

Please sign in to comment.