Skip to content

Commit

Permalink
chore: update with upstream master (#758)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Apr 19, 2022
1 parent c74f5c9 commit d239edb
Show file tree
Hide file tree
Showing 29 changed files with 571 additions and 141 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,15 @@
"contributions": [
"doc"
]
},
{
"login": "lejenome",
"name": "Moez Bouhlel",
"avatar_url": "https://avatars.githubusercontent.com/u/2295241?v=4",
"profile": "https://lejenome.tik.tn",
"contributions": [
"doc"
]
}
],
"commitConvention": "none"
Expand Down
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: Release issue
about: Track the progress of the next release of the AsyncAPI spec
title: ""
labels: ':shipit: Release'
assignees: ''
---

Release X.X.X is scheduled for XXXX

### Detailed info:
* https://github.com/asyncapi/spec/blob/master/RELEASE_PROCESS.md

### Kick-off:
* _link to recording of community call where the new release was started_

### Release branches:
* https://github.com/asyncapi/spec/tree/BRANCH_NAME
* https://github.com/asyncapi/spec-json-schemas/tree/BRANCH_NAME
* https://github.com/asyncapi/parser-js/tree/BRANCH_NAME

### Release notes:
* draft PR - https://github.com/asyncapi/website/pull/PULLREQUEST

### Progress:
- [ ] Create release branches
- [ ] spec
- [ ] spec-json-schemas
- [ ] parser-js
- [ ] Update release branches with new versions
- [ ] spec
- [ ] spec-json-schemas
- [ ] parser-js
- [ ] Update default branches with release branch name
- [ ] spec
- [ ] spec-json-schemas
- [ ] parser-js
- [ ] Create draft release notes
- [ ] Update release branches from forks
- [ ] spec
- [ ] spec-json-schemas
- [ ] parser-js
- [ ] Notify community about release branches
- [ ] Check for potential release contributions
- [ ] Draft announcement blog post for new features and changes
- [ ] Write release notes for new features and changes
- [ ] Prepare pull requests to merge release branches into master
- [ ] spec
- [ ] spec-json-schemas
- [ ] parser-js
- [ ] Notify tsc_members about upcoming release
- [ ] Merge release branches into master
- [ ] spec
- [ ] spec-json-schemas
- [ ] parser-js
- [ ] Write release notes for the releases on Github
- [ ] Create releases on Github
- [ ] spec
- [ ] spec-json-schemas
- [ ] parser-js
- [ ] Update RELEASE_PROCESS doc with any changes
6 changes: 3 additions & 3 deletions .github/workflows/add-good-first-issue-labels.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#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
# 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.
# 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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,82 @@
#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
# 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 PR with `ready-to-merge` and `do-not-merge` labels to get stuff merged or blocked from merging
name: Add ready-to-merge or do-not-merge label # if proper comment added
# Purpose of this workflow is to enable anyone to label PR with the following labels:
# `ready-to-merge` and `do-not-merge` labels to get stuff merged or blocked from merging
# `autoupdate` to keep a branch up-to-date with the target branch

name: Label PRs # if proper comment added

on:
issue_comment:
types:
- created

jobs:
parse-comment-and-add-ready: # for handling cases when you want to mark as ready to merge
if: github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot'
add-ready-to-merge-label:
if: >
github.event.issue.pull_request &&
github.event.issue.state != 'closed' &&
github.actor != 'asyncapi-bot' &&
(
contains(github.event.comment.body, '/ready-to-merge') ||
contains(github.event.comment.body, '/rtm' )
)
runs-on: ubuntu-latest
steps:
- name: Check if PR is draft # such info is not available in the context of issue_comment event

- name: Add ready-to-merge label
uses: actions/github-script@v5
id: checkDraft
with:
result-encoding: string
github-token: ${{ secrets.GH_TOKEN }}
script: |
const prDetailsUrl = context.payload.issue.pull_request.url;
const response = await github.request(prDetailsUrl);
return response.data.draft;
- name: Add label
if: steps.checkDraft.outputs.result == 'false' && (contains(github.event.comment.body, '/ready-to-merge') || contains(github.event.comment.body, '/rtm' ))
const { data: pull } = await github.request(prDetailsUrl);
const { draft: isDraft} = pull;
if(!isDraft) {
console.log('adding ready-to-merge label...');
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['ready-to-merge']
})
}
const { data: comparison } =
await github.rest.repos.compareCommitsWithBasehead({
owner: pull.head.repo.owner.login,
repo: pull.head.repo.name,
basehead: `${pull.base.label}...${pull.head.label}`,
});
if (comparison.behind_by !== 0) {
console.log(`This branch is behind the target by ${comparison.behind_by} commits`)
console.log('adding out-of-date comment...');
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Hello, @${{ github.actor }}! 👋🏼
This PR is not up to date with the base branch and can't be merged.
Please update your branch manually with the latest version of the base branch.
PRO-TIP: Add a comment to your PR with the text: \`/au\` or \`/autoupdate\` and our bot will take care of updating the branch in the future. The only requirement for this to work is to enable [Allow edits from maintainers](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) option in your PR.
Thanks 😄`
})
}
add-do-not-merge-label:
if: >
github.event.issue.pull_request &&
github.event.issue.state != 'closed' &&
github.actor != 'asyncapi-bot' &&
(
contains(github.event.comment.body, '/do-not-merge') ||
contains(github.event.comment.body, '/dnm' )
)
runs-on: ubuntu-latest
steps:
- name: Add do-not-merge label
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GH_TOKEN }}
Expand All @@ -33,15 +85,20 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['ready-to-merge']
labels: ['do-not-merge']
})
parse-comment-and-add-block: # for handling cases when you want to mark as do-not-merge
if: github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot'
add-autoupdate-label:
if: >
github.event.issue.pull_request &&
github.event.issue.state != 'closed' &&
github.actor != 'asyncapi-bot' &&
(
contains(github.event.comment.body, '/autoupdate') ||
contains(github.event.comment.body, '/au' )
)
runs-on: ubuntu-latest
steps:
- name: Add label
if: contains(github.event.comment.body, '/do-not-merge') || contains(github.event.comment.body, '/dnm' )
- name: Add autoupdate label
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GH_TOKEN }}
Expand All @@ -50,5 +107,5 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['do-not-merge']
labels: ['autoupdate']
})
6 changes: 3 additions & 3 deletions .github/workflows/automerge-for-humans-merging.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#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
# 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 allow people to merge PR without a need of maintainer doing it. If all checks are in place (including maintainers approval) - JUST MERGE IT!
# Purpose of this workflow is to allow people to merge PR without a need of maintainer doing it. If all checks are in place (including maintainers approval) - JUST MERGE IT!
name: Automerge For Humans

on:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#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
# 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

# Defence from evil contributor that after adding `ready-to-merge` all suddenly makes evil commit or evil change in PR title
# Label is removed once above action is detected
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/automerge-orphans.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#This action 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
# This action 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

name: 'Notify on failing automerge'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['autoapproved']
labels: ['autoapproved', 'autoupdate']
})
automerge-for-bot:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#This action 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
# This action 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

#This workflow is designed to work with:
# This workflow is designed to work with:
# - autoapprove and automerge workflows for dependabot and asyncapibot.
# - special release branches that we from time to time create in upstream repos. If we open up PRs for them from the very beginning of the release, the release branch will constantly update with new things from the destination branch they are opened against

# It uses GitHub Action that auto-updates pull requests branches, whenever changes are pushed to their destination branch.
#Autoupdating to latest destination branch works only in the context of upstream repo and not forks
# Autoupdating to latest destination branch works only in the context of upstream repo and not forks

name: autoupdate

Expand All @@ -28,6 +28,6 @@ jobs:
env:
GITHUB_TOKEN: '${{ secrets.GH_TOKEN }}'
PR_FILTER: "labelled"
PR_LABELS: "autoapproved"
PR_LABELS: "autoupdate"
PR_READY_STATE: "ready_for_review"
MERGE_CONFLICT_ACTION: "ignore"
14 changes: 7 additions & 7 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#This action 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
# This action 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 action is to update npm package in libraries that use it. It is like dependabot for asyncapi npm modules only.
#It runs in a repo after merge of release commit and searches for other packages that use released package. Every found package gets updated with lates version
# Purpose of this action is to update npm package in libraries that use it. It is like dependabot for asyncapi npm modules only.
# It runs in a repo after merge of release commit and searches for other packages that use released package. Every found package gets updated with lates version

name: Bump package version in dependent repos - if Node project

on:
#It cannot run on release event as when release is created then version is not yet bumped in package.json
#This means we cannot extract easily latest version and have a risk that package is not yet on npm
# It cannot run on release event as when release is created then version is not yet bumped in package.json
# This means we cannot extract easily latest version and have a risk that package is not yet on npm
push:
branches:
- master
Expand All @@ -31,4 +31,4 @@ jobs:
github_token: ${{ secrets.GH_TOKEN }}
committer_username: asyncapi-bot
committer_email: info@asyncapi.io
repos_to_ignore: html-template #this is temporary until react component releases 1.0, then it can be removed
repos_to_ignore: html-template # this is temporary until react component releases 1.0, then it can be removed
5 changes: 3 additions & 2 deletions .github/workflows/help-command.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#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
# 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

name: Create help comment

Expand All @@ -25,6 +25,7 @@ jobs:
- `/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.
create_help_comment_issue:
if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }}
runs-on: ubuntu-latest
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/if-go-pr-testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#This action 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
#It does magic only if there is go.mod file in the root of the project
# This action 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

# It does magic only if there is go.mod file in the root of the project
name: PR testing - if Go project

on:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#This action 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
#It does magic only if there is package.json file in the root of the project
# This action 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

# It does magic only if there is package.json file in the root of the project
name: PR testing - if Node project

on:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/if-nodejs-release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#This action 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
#It does magic only if there is package.json file in the root of the project
# This action 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

# It does magic only if there is package.json file in the root of the project
name: Release - if Node project

on:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/if-nodejs-version-bump.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#This action 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
#It does magic only if there is package.json file in the root of the project
# This action 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

# It does magic only if there is package.json file in the root of the project
name: Version bump - if Node.js project

on:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/issues-prs-notifications.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#This action 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
# This action 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

#This action notifies community on slack whenever there is a new issue, PR or discussion started in given repository
# This action notifies community on slack whenever there is a new issue, PR or discussion started in given repository
name: Notify slack

on:
Expand Down
Loading

0 comments on commit d239edb

Please sign in to comment.