Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update release branch #706

Merged
merged 21 commits into from
Jan 31, 2023
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f5d6b9f
ci: update generic workflows (#653)
asyncapi-bot Oct 13, 2022
dc3e4b7
ci: update generic workflows (#657)
asyncapi-bot Oct 20, 2022
b6ddc7c
chore(deps): bump marked and jsdoc-to-markdown (#658)
dependabot[bot] Oct 20, 2022
6b17064
fix: update @asyncapi/specs to 4.0.0 version (#660)
asyncapi-bot Oct 21, 2022
f7f7763
chore(release): v1.17.1 (#661)
asyncapi-bot Oct 21, 2022
aa4e1c5
ci: update generic workflows (#662)
asyncapi-bot Oct 24, 2022
6e404cc
ci: update generic workflows (#666)
asyncapi-bot Oct 27, 2022
297f829
chore(deps): bump @actions/core from 1.6.0 to 1.9.1 in /.github/workf…
dependabot[bot] Oct 27, 2022
87531cd
ci: remove not needed workflow (#673)
codingtenshi Nov 9, 2022
f707339
ci: update generic workflows (#675)
asyncapi-bot Nov 9, 2022
bffbc69
ci: update generic workflows (#678)
asyncapi-bot Nov 23, 2022
9818a85
chore(deps): bump minimatch and mocha (#679)
dependabot[bot] Nov 24, 2022
2e14103
fix: update @asyncapi/specs to 4.0.1 version (#681)
asyncapi-bot Nov 26, 2022
a18ba44
chore(release): v1.17.2 (#682)
asyncapi-bot Nov 28, 2022
bd24cb7
ci: update workflows for nodejs projects (#685)
asyncapi-bot Dec 1, 2022
39008d8
ci: update generic workflows (#686)
asyncapi-bot Dec 7, 2022
2edde95
chore(deps): bump json5 from 2.2.1 to 2.2.3 (#689)
dependabot[bot] Jan 12, 2023
418810a
test: skip memory usage test (#694)
magicmatatjahu Jan 24, 2023
2187856
ci: update generic workflows (#703)
asyncapi-bot Jan 30, 2023
78cb219
chore(deps): bump cookiejar from 2.1.3 to 2.1.4 in /.github/workflows…
dependabot[bot] Jan 30, 2023
38a1816
Merge branch 'master' of https://github.com/AceTheCreator/parser-js i…
AceTheCreator Jan 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions .github/workflows/add-good-first-issue-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@
# 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
on:
issue_comment:
types:
- created

jobs:
add-labels:
if: ${{!github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot'}}
if: ${{(!github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot') && (contains(github.event.comment.body, '/good-first-issue') || contains(github.event.comment.body, '/gfi' ))}}
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.trim().split(" ");
switch(values[1]){
const words = context.payload.comment.body.trim().split(" ");
const areaIndex = words.findIndex((word)=> word === '/gfi' || word === '/good-first-issue') + 1
let area = words[areaIndex];
switch(area){
case 'ts':
values[1] = 'typescript';
area = 'typescript';
break;
case 'js':
values[1] = 'javascript';
Expand All @@ -33,7 +34,7 @@ jobs:
values[1] = 'docs';
break;
}
if(values.length != 2 || !areas.includes(values[1])){
if(!areas.includes(area)){
const message = `Hey @${context.payload.sender.login}, your message doesn't follow the requirements, you can try \`/help\`.`

await github.rest.issues.createComment({
Expand All @@ -44,14 +45,14 @@ jobs:
})
} else {

//remove complexity and areas if there are any before adding new labels;
// remove area if there is 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])));
const shouldBeRemoved = currentLabels.filter(label => (label.startsWith('area/') && !label.endsWith(area));
shouldBeRemoved.forEach(label => {
github.rest.issues.deleteLabel({
owner: context.repo.owner,
Expand All @@ -60,11 +61,11 @@ jobs:
});
});

//add new labels
// 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]}`]
labels: ['good first issue', `area/${area}`]
});
}