forked from asyncapi/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2022-01-release' of github.com:dalelane/website into 20…
…22-01-release
- Loading branch information
Showing
49 changed files
with
2,965 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#This workflow 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 | ||
|
||
#Purpose of this workflow is to enable anyone to label issue with 'Good First Issue' and 'area/*' with a single command. | ||
name: Add 'Good First Issue' and 'area/*' labels # if proper comment added | ||
|
||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
|
||
jobs: | ||
add-labels: | ||
if: github.event.issue && github.event.issue.state != 'closed' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Add label | ||
if: contains(github.event.comment.body, '/good-first-issue') || contains(github.event.comment.body, '/gfi' ) | ||
uses: actions/github-script@v5 | ||
with: | ||
github-token: ${{ secrets.GH_TOKEN }} | ||
script: | | ||
const areas = ['javascript', 'typescript', 'java' , 'go', 'docs', 'ci-cd', 'design']; | ||
const values = context.payload.comment.body.split(" "); | ||
switch(values[1]){ | ||
case 'ts': | ||
values[1] = 'typescript'; | ||
break; | ||
case 'js': | ||
values[1] = 'javascript'; | ||
case 'markdown': | ||
values[1] = 'docs'; | ||
} | ||
if(values.length != 2 || !areas.includes(values[1])){ | ||
const message = `Hey @${context.payload.sender.login}, something is wrong with your command please use \`/help\` for help.` | ||
await github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: message | ||
}) | ||
} else { | ||
//remove complexity and areas if there are any before adding new labels; | ||
const currentLabels = (await github.rest.issues.listLabelsOnIssue({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
})).data.map(label => label.name); | ||
const shouldBeRemoved = currentLabels.filter(label => (label.startsWith('area/') && !label.endsWith(values[1]))); | ||
shouldBeRemoved.forEach(label => { | ||
github.rest.issues.deleteLabel({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
name: label, | ||
}); | ||
}); | ||
//add new labels | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['good first issue', `area/${values[1]}`] | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.