Skip to content

Commit

Permalink
ci: update of files from global .github repo (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
asyncapi-bot authored May 6, 2024
1 parent f5743a3 commit 9bbc0c5
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 8 deletions.
50 changes: 43 additions & 7 deletions .github/workflows/bounty-program-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ on:
types:
- created

env:
BOUNTY_PROGRAM_LABELS_JSON: |
[
{"name": "bounty", "color": "0e8a16", "description": "Participation in the Bounty Program"}
]
jobs:
guard-against-unauthorized-use:
if: >
github.actor != ('aeworxet' || 'thulieblack') &&
(
contains(github.event.comment.body, '/bounty' )
startsWith(github.event.comment.body, '/bounty' )
)
runs-on: ubuntu-latest
Expand All @@ -46,15 +52,10 @@ jobs:
if: >
github.actor == ('aeworxet' || 'thulieblack') &&
(
contains(github.event.comment.body, '/bounty' )
startsWith(github.event.comment.body, '/bounty' )
)
runs-on: ubuntu-latest
env:
BOUNTY_PROGRAM_LABELS_JSON: |
[
{"name": "bounty", "color": "0e8a16", "description": "Participation in the Bounty Program"}
]

steps:
- name: Add label `bounty`
Expand Down Expand Up @@ -88,3 +89,38 @@ jobs:
repo: context.repo.repo,
labels: [BOUNTY_PROGRAM_LABELS[0].name]
})
remove-label-bounty:
if: >
github.actor == ('aeworxet' || 'thulieblack') &&
(
startsWith(github.event.comment.body, '/unbounty' )
)
runs-on: ubuntu-latest

steps:
- name: Remove label `bounty`
uses: actions/github-script@v6

with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const BOUNTY_PROGRAM_LABELS = JSON.parse(process.env.BOUNTY_PROGRAM_LABELS_JSON);
let LIST_OF_LABELS_FOR_ISSUE = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
LIST_OF_LABELS_FOR_ISSUE = LIST_OF_LABELS_FOR_ISSUE.data.map(key => key.name);
if (LIST_OF_LABELS_FOR_ISSUE.includes(BOUNTY_PROGRAM_LABELS[0].name)) {
console.log('Removing label `bounty`...');
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: [BOUNTY_PROGRAM_LABELS[0].name]
})
}
3 changes: 2 additions & 1 deletion .github/workflows/if-nodejs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- next-major-spec
- beta
- alpha
- next

jobs:

Expand Down Expand Up @@ -128,4 +129,4 @@ jobs:
fields: repo,action,workflow
text: 'Release workflow failed in release job'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
2 changes: 2 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ branches:
prerelease: true
- name: alpha
prerelease: true
- name: next
prerelease: true
plugins:
- - "@semantic-release/commit-analyzer"
- preset: conventionalcommits
Expand Down

0 comments on commit 9bbc0c5

Please sign in to comment.