diff --git a/.github/workflows/automerge-orphans.yml b/.github/workflows/automerge-orphans.yml index a053d0cb..8b8c6c2d 100644 --- a/.github/workflows/automerge-orphans.yml +++ b/.github/workflows/automerge-orphans.yml @@ -20,14 +20,13 @@ jobs: script: | const query = `query($owner:String!, $name:String!) { repository(owner:$owner, name:$name){ - pullRequests(first: 100){ + pullRequests(first: 100, states: OPEN){ nodes{ title url author { resourcePath } - state } } } @@ -38,13 +37,7 @@ jobs: }; const { repository: { pullRequests: { nodes } } } = await github.graphql(query, variables); - 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') - }) + let orphans = nodes.filter( (pr) => pr.author.resourcePath === '/asyncapi-bot' || pr.author.resourcePath === '/apps/dependabot') if (orphans.length) { core.setOutput('found', 'true'); diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 48a252ff..66af7a55 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -24,9 +24,9 @@ jobs: run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false" - if: steps.packagejson.outputs.exists == 'true' && startsWith(github.event.commits[0].message, 'chore(release):') name: Bumping latest version of this package in other repositories - uses: derberg/custom-dependabot-for-your-github-org@v2 + uses: derberg/npm-dependency-manager-for-your-github-org@v3 with: github_token: ${{ secrets.GH_TOKEN }} committer_username: asyncapi-bot committer_email: info@asyncapi.io - repos_to_ignore: html-template #this is temporary until react component releases 1.0, then it can be removed \ No newline at end of file + repos_to_ignore: html-template #this is temporary until react component releases 1.0, then it can be removed diff --git a/.github/workflows/issues-prs-notifications.yml b/.github/workflows/issues-prs-notifications.yml index 8577db6f..41035079 100644 --- a/.github/workflows/issues-prs-notifications.yml +++ b/.github/workflows/issues-prs-notifications.yml @@ -1,5 +1,7 @@ #This action is centrally managed in https://github.com/asyncapi/.github/ #Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo + +#This action notifies community on slack whenever there is a new issue, PR or discussion started in given repository name: Notify slack on: @@ -10,6 +12,9 @@ on: pull_request_target: types: [opened, reopened, ready_for_review] + discussion: + types: [opened] + jobs: issue: @@ -47,3 +52,21 @@ jobs: SLACK_TITLE: 💪 New Pull Request 💪 SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}} MSG_MINIMAL: true + + discussion: + if: github.event_name == 'discussion' && github.actor != 'asyncapi-bot' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' + name: On every new pull request + runs-on: ubuntu-latest + steps: + - name: Convert markdown to slack markdown for pull request + uses: LoveToKnow/slackify-markdown-action@v1.0.0 + id: discussionmarkdown + with: + text: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}" + - name: Send info about pull request + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}} + SLACK_TITLE: 💬 New Discussion 💬 + SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}} + MSG_MINIMAL: true