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 with master #999

Merged
merged 38 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9549230
docs: set proper indentation for the TOC (#853)
smoya Oct 28, 2022
226447a
ci: update generic workflows (#871)
asyncapi-bot Nov 9, 2022
d5c8960
ci: remove not needed workflow (#872)
codingtenshi Nov 14, 2022
eb8bb65
chore: fix example for operation security (#873)
derberg Nov 17, 2022
90e6a99
chore: update asyncapi versions in the social-media example (#876)
magicmatatjahu Nov 22, 2022
77cb157
ci: update generic workflows (#877)
asyncapi-bot Nov 23, 2022
1e3ec47
ci: update generic workflows (#879)
asyncapi-bot Dec 6, 2022
95643a7
docs: update readme, add sponsors section, review requested (#886)
AnimeshKumar923 Dec 19, 2022
6c252c2
docs: fix websocket-gemini message's payload example (#884)
magicmatatjahu Dec 20, 2022
143ddd0
ci: update generic workflows (#897)
asyncapi-bot Jan 30, 2023
8087fee
chore(deps): bump cookiejar from 2.1.3 to 2.1.4 in /.github/workflows…
dependabot[bot] Jan 30, 2023
1824379
feat: release for version 2.6.0 of the spec (#902)
AceTheCreator Feb 1, 2023
2e301c9
ci: update generic workflows (#906)
asyncapi-bot Feb 13, 2023
7a6aba6
ci: update generic workflows (#911)
asyncapi-bot Mar 14, 2023
1915753
ci: update generic workflows (#916)
asyncapi-bot Mar 28, 2023
be29f8f
docs: remove `are` from polymorphism section (#909)
sambhavgupta0705 Apr 3, 2023
e5520f3
ci: fix spec update in website workflow (#921)
derberg Apr 4, 2023
b61efe0
ci: update generic workflows (#922)
asyncapi-bot Apr 4, 2023
806a8a6
ci: update generic workflows (#924)
asyncapi-bot Apr 13, 2023
da9ed1c
ci: update generic workflows (#925)
asyncapi-bot Apr 13, 2023
33dfa11
ci: update generic workflows (#927)
asyncapi-bot Apr 13, 2023
ef33aef
ci: update of files from global .github repo (#951)
asyncapi-bot Jun 29, 2023
268d79d
ci: update release workflow (#939)
kaushik-rishi Jul 25, 2023
121ea2b
ci: upgrade GH workflows and fix markdown linting (#958)
derberg Aug 11, 2023
ca429e6
docs: add bronze sponsors (#964)
DarrenDsouza7273 Aug 29, 2023
10ffb46
chore: fix header format in gitter example (#965)
lornajane Sep 6, 2023
a4ac4e7
chore: add swix as the new silver sponsor (#974)
DarrenDsouza7273 Sep 27, 2023
d4c99e4
docs: channel object / $ref note. (#826)
ponelat Oct 18, 2023
0e1d020
docs: add info about breaking changes to contributing guide (#854)
Dule-martins Oct 26, 2023
ced795c
docs: use URL pointing to JSON Schema Draft 7 specs (#982)
char0n Nov 10, 2023
69ff34d
ci: update of files from global .github repo (#990)
asyncapi-bot Nov 15, 2023
83fd0b9
docs: align text definition of Message.payload with it's field defini…
char0n Nov 16, 2023
2e45aad
chore: merge upstream 'master' into 'next-major-spec'
jonaslagoni Dec 4, 2023
ba8ea9d
chore: apply #853
jonaslagoni Dec 4, 2023
297b336
chore: apply #884
jonaslagoni Dec 4, 2023
3cb5550
chore: apply #902
jonaslagoni Dec 4, 2023
736b5e1
chore: apply #909
jonaslagoni Dec 4, 2023
41686ae
chore: apply #983
jonaslagoni Dec 4, 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
35 changes: 18 additions & 17 deletions .github/workflows/add-good-first-issue-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,37 @@
# 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
uses: actions/github-script@v6
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';
area = 'javascript';
break;
case 'markdown':
values[1] = 'docs';
area = '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}`]
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

name: Label PRs # if proper comment added

on:
issue_comment:
types:
- created
on:
issue_comment:
types:
- created

jobs:
add-ready-to-merge-label:
if: >
if: >
github.event.issue.pull_request &&
github.event.issue.state != 'closed' &&
github.actor != 'asyncapi-bot' &&
Expand All @@ -25,9 +25,8 @@ jobs:

runs-on: ubuntu-latest
steps:

- name: Add ready-to-merge label
uses: actions/github-script@v5
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down Expand Up @@ -64,7 +63,7 @@ jobs:
Thanks 😄`
})
}

add-do-not-merge-label:
if: >
github.event.issue.pull_request &&
Expand All @@ -77,7 +76,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add do-not-merge label
uses: actions/github-script@v5
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand All @@ -86,7 +85,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['do-not-merge']
})
})
add-autoupdate-label:
if: >
github.event.issue.pull_request &&
Expand All @@ -99,7 +98,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add autoupdate label
uses: actions/github-script@v5
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand All @@ -108,4 +107,4 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['autoupdate']
})
})
2 changes: 1 addition & 1 deletion .github/workflows/automerge-for-humans-merging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
| join("\n")'
multiline: true
- name: Automerge PR
uses: pascalgn/automerge-action@v0.14.3
uses: pascalgn/automerge-action@22948e0bc22f0aa673800da838595a3e7347e584 #v0.15.6 https:/pascalgn/automerge-action/releases/tag/v0.15.6
env:
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
MERGE_LABELS: "!do-not-merge,ready-to-merge"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Remove label
uses: actions/github-script@v5
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const labelToRemove = 'ready-to-merge';
const labels = context.payload.pull_request.labels;

const isLabelPresent = labels.some(label => label.name === labelToRemove)

if(!isLabelPresent) return;

github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: labelToRemove
})
})
8 changes: 5 additions & 3 deletions .github/workflows/automerge-orphans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ jobs:
name: Find orphans and notify
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get list of orphans
uses: actions/github-script@v3
uses: actions/github-script@v6
id: orphans
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -50,10 +52,10 @@ jobs:
}
- if: steps.orphans.outputs.found == 'true'
name: Convert markdown to slack markdown
uses: LoveToKnow/slackify-markdown[email protected]
uses: asyncapi/.github/.github/actions/slackify-markdown@master
id: issuemarkdown
with:
text: "-> [${{steps.orphans.outputs.title}}](${{steps.orphans.outputs.url}})"
markdown: "-> [${{steps.orphans.outputs.title}}](${{steps.orphans.outputs.url}})"
- if: steps.orphans.outputs.found == 'true'
name: Send info about orphan to slack
uses: rtCamp/action-slack-notify@v2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This action is centrally managed in https:/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.

name: Automerge release bump PR
name: Automerge PRs from bots

on:
pull_request_target:
Expand All @@ -19,12 +19,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Autoapproving
uses: hmarr/auto-approve-action@v2
uses: hmarr/auto-approve-action@44888193675f29a83e04faf4002fa8c0b537b1e4 # v3.2.1 is used https:/hmarr/auto-approve-action/releases/tag/v3.2.1
with:
github-token: "${{ secrets.GH_TOKEN_BOT_EVE }}"

- name: Label autoapproved
uses: actions/github-script@v5
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand All @@ -41,11 +41,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Automerging
uses: pascalgn/automerge-action@v0.13.0
uses: pascalgn/automerge-action@22948e0bc22f0aa673800da838595a3e7347e584 #v0.15.6 https:/pascalgn/automerge-action/releases/tag/v0.15.6
env:
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
GITHUB_LOGIN: asyncapi-bot
MERGE_LABELS: ""
MERGE_LABELS: "!do-not-merge"
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})"
MERGE_RETRIES: "20"
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/bump.yml

This file was deleted.

60 changes: 38 additions & 22 deletions .github/workflows/help-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,48 @@ jobs:
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }}
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-create-comment@v1
- name: Add comment to PR
uses: actions/github-script@v6
with:
github_token: ${{ secrets.GH_TOKEN }}
body: |
Hello, @${{ github.actor }}! 👋🏼
github-token: ${{ secrets.GH_TOKEN }}
script: |
//Yes to add comment to PR the same endpoint is use that we use to create a comment in issue
//For more details http://developer.github.com/v3/issues/comments/
//Also proved by this action https:/actions-ecosystem/action-create-comment/blob/main/src/main.ts
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Hello, @${{ github.actor }}! 👋🏼

I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!

At the moment the following comments are supported in pull requests:

- \`/ready-to-merge\` or \`/rtm\` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added
- \`/do-not-merge\` or \`/dnm\` - This comment will block automerging even if all conditions are met and ready-to-merge label is added
- \`/autoupdate\` or \`/au\` - This comment will add \`autoupdate\` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR.`
})

I'm Genie from the magic lamp. Looks like somebody needs a hand! 🆘

At the moment the following comments are supported in pull requests:

- `/ready-to-merge` or `/rtm` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added
- `/do-not-merge` or `/dnm` - This comment will block automerging even if all conditions are met and ready-to-merge label is added
- `/autoupdate` or `/au` - This comment will add `autoupdate` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR.
create_help_comment_issue:
if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }}
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-create-comment@v1
- name: Add comment to Issue
uses: actions/github-script@v6
with:
github_token: ${{ secrets.GH_TOKEN }}
body: |
Hello, @${{ github.actor }}! 👋🏼

I'm Genie from the magic lamp. Looks like somebody needs a hand! 🆘

At the moment the following comments are supported in issues:

- `/good-first-issue {js | ts | java | go | docs | design | ci-cd} ` or `/gfi {js | ts | java | go | docs | design | ci-cd} ` - label an issue as a `good first issue`.
example: `/gfi js` or `/good-first-issue ci-cd`
github-token: ${{ secrets.GH_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Hello, @${{ github.actor }}! 👋🏼

I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!

At the moment the following comments are supported in issues:

- \`/good-first-issue {js | ts | java | go | docs | design | ci-cd}\` or \`/gfi {js | ts | java | go | docs | design | ci-cd}\` - label an issue as a \`good first issue\`.
example: \`/gfi js\` or \`/good-first-issue ci-cd\``
})
Loading
Loading