File tree Expand file tree Collapse file tree 3 files changed +27
-11
lines changed
Expand file tree Collapse file tree 3 files changed +27
-11
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,13 @@ jobs:
2020 script : |
2121 const query = `query($owner:String!, $name:String!) {
2222 repository(owner:$owner, name:$name){
23- pullRequests(first: 100){
23+ pullRequests(first: 100, states: OPEN ){
2424 nodes{
2525 title
2626 url
2727 author {
2828 resourcePath
2929 }
30- state
3130 }
3231 }
3332 }
3837 };
3938 const { repository: { pullRequests: { nodes } } } = await github.graphql(query, variables);
4039
41- let orphans = nodes.filter((pr)=> {
42- console.log('PR', pr.url);
43- console.log('State', pr.state);
44- console.log('Author resource path', pr.author.resourcePath);
45- console.log('Is orphan', pr.state === 'OPEN' && (pr.author.resourcePath === '/asyncapi-bot' || pr.author.resourcePath === '/apps/dependabot'));
46- return pr.state === 'OPEN' && (pr.author.resourcePath === '/asyncapi-bot' || pr.author.resourcePath === '/apps/dependabot')
47- })
40+ let orphans = nodes.filter( (pr) => pr.author.resourcePath === '/asyncapi-bot' || pr.author.resourcePath === '/apps/dependabot')
4841
4942 if (orphans.length) {
5043 core.setOutput('found', 'true');
Original file line number Diff line number Diff line change 2424 run : test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
2525 - if : steps.packagejson.outputs.exists == 'true' && startsWith(github.event.commits[0].message, 'chore(release):')
2626 name : Bumping latest version of this package in other repositories
27- uses : derberg/custom-dependabot- for-your-github-org@v2
27+ uses : derberg/npm-dependency-manager- for-your-github-org@v3
2828 with :
2929 github_token : ${{ secrets.GH_TOKEN }}
3030 committer_username : asyncapi-bot
3131 committer_email : info@asyncapi.io
32- repos_to_ignore : html-template # this is temporary until react component releases 1.0, then it can be removed
32+ repos_to_ignore : html-template # this is temporary until react component releases 1.0, then it can be removed
Original file line number Diff line number Diff line change 11# This action is centrally managed in https://github.com/asyncapi/.github/
22# 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
3+
4+ # This action notifies community on slack whenever there is a new issue, PR or discussion started in given repository
35name : Notify slack
46
57on :
1012 pull_request_target :
1113 types : [opened, reopened, ready_for_review]
1214
15+ discussion :
16+ types : [opened]
17+
1318jobs :
1419
1520 issue :
4752 SLACK_TITLE : 💪 New Pull Request 💪
4853 SLACK_MESSAGE : ${{steps.prmarkdown.outputs.text}}
4954 MSG_MINIMAL : true
55+
56+ discussion :
57+ if : github.event_name == 'discussion' && github.actor != 'asyncapi-bot' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
58+ name : On every new pull request
59+ runs-on : ubuntu-latest
60+ steps :
61+ - name : Convert markdown to slack markdown for pull request
62+ uses : LoveToKnow/slackify-markdown-action@v1.0.0
63+ id : discussionmarkdown
64+ with :
65+ text : " [${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}"
66+ - name : Send info about pull request
67+ uses : rtCamp/action-slack-notify@v2
68+ env :
69+ SLACK_WEBHOOK : ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
70+ SLACK_TITLE : 💬 New Discussion 💬
71+ SLACK_MESSAGE : ${{steps.discussionmarkdown.outputs.text}}
72+ MSG_MINIMAL : true
You can’t perform that action at this time.
0 commit comments