Skip to content

Commit

Permalink
Merge branch 'master' into issues/68-copy-name-to-title
Browse files Browse the repository at this point in the history
  • Loading branch information
damaru-inc authored Sep 2, 2021
2 parents 9adbbaa + 213f990 commit f526005
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/automerge-orphans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand All @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
repos_to_ignore: html-template #this is temporary until react component releases 1.0, then it can be removed
repos_to_ignore: html-template #this is temporary until react component releases 1.0, then it can be removed
23 changes: 23 additions & 0 deletions .github/workflows/issues-prs-notifications.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -10,6 +12,9 @@ on:
pull_request_target:
types: [opened, reopened, ready_for_review]

discussion:
types: [opened]

jobs:

issue:
Expand Down Expand Up @@ -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/[email protected]
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

0 comments on commit f526005

Please sign in to comment.