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

feat: introduce new schema referencing standard #825

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
76 changes: 72 additions & 4 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@
"profile": "https://waleedashraf.me/",
"contributions": [
"talk",
"ideas"
"ideas",
"doc",
"example"
]
},
{
Expand Down Expand Up @@ -215,7 +217,12 @@
"profile": "https://github.com/magicmatatjahu",
"contributions": [
"review",
"ideas"
"ideas",
"question",
"bug",
"doc",
"example",
"maintenance"
]
},
{
Expand All @@ -224,7 +231,11 @@
"avatar_url": "https://avatars.githubusercontent.com/u/193286?v=4",
"profile": "https://vladimirgorej.com/",
"contributions": [
"doc"
"doc",
"bug",
"example",
"ideas",
"review"
]
},
{
Expand Down Expand Up @@ -271,7 +282,12 @@
"contributions": [
"review",
"ideas",
"question"
"question",
"blog",
"bug",
"doc",
"example",
"maintenance"
]
},
{
Expand Down Expand Up @@ -311,6 +327,58 @@
"contributions": [
"doc"
]
},
{
"login": "lejenome",
"name": "Moez Bouhlel",
"avatar_url": "https://avatars.githubusercontent.com/u/2295241?v=4",
"profile": "https://lejenome.tik.tn",
"contributions": [
"doc"
]
},
{
"login": "luphieanza",
"name": "Muhammad Rafly Andrianza",
"avatar_url": "https://avatars.githubusercontent.com/u/20577131?v=4",
"profile": "https://github.com/luphieanza",
"contributions": [
"doc"
]
},
{
"login": "danielkocot",
"name": "Daniel Kocot",
"avatar_url": "https://avatars.githubusercontent.com/u/466609?v=4",
"profile": "https://danielkocot.github.io/",
"contributions": [
"doc",
"example",
"ideas"
]
},
{
"login": "sekharbans-ebay",
"name": "sekharbans-ebay",
"avatar_url": "https://avatars.githubusercontent.com/u/66145510?v=4",
"profile": "https://github.com/sekharbans-ebay",
"contributions": [
"doc",
"example",
"ideas"
]
},
{
"login": "damaru-inc",
"name": "Michael Davis",
"avatar_url": "https://avatars.githubusercontent.com/u/3926925?v=4",
"profile": "http://www.damaru.com/",
"contributions": [
"bug",
"doc",
"example",
"ideas"
]
}
],
"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
4 changes: 2 additions & 2 deletions .github/scripts/remove-toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = (givenSpec) => {
const startingLine = "## Table of Contents\n";
const endingLine = "<!-- /TOC -->\n";

const specFile = fs.readFileSync(`./website/pages/docs/specifications/${givenSpec}.md`);
const specFile = fs.readFileSync(`./website/pages/docs/reference/specification/${givenSpec}.md`);

const startingIndex = specFile.indexOf(startingLine);
const endingIndex = specFile.indexOf(endingLine);
Expand All @@ -21,5 +21,5 @@ module.exports = (givenSpec) => {
const firstHalf = specFile.slice(0, startingIndex);
const secondHalf = specFile.slice(endingIndex + endingLine.length);
const specWithoutToc = `${firstHalf}${secondHalf}`;
fs.writeFileSync(`./website/pages/docs/specifications/${givenSpec}.md`, specWithoutToc);
fs.writeFileSync(`./website/pages/docs/reference/specification/${givenSpec}.md`, specWithoutToc);
}
8 changes: 4 additions & 4 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 All @@ -21,7 +21,7 @@ jobs:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const areas = ['javascript', 'typescript', 'java' , 'go', 'docs', 'ci-cd', 'design'];
const values = context.payload.comment.body.split(" ");
const values = context.payload.comment.body.trim().split(" ");
switch(values[1]){
case 'ts':
values[1] = 'typescript';
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 && pull.mergeable_state === 'behind') {
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
7 changes: 4 additions & 3 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 All @@ -9,6 +9,7 @@ on:

jobs:
identify-orphans:
if: startsWith(github.repository, 'asyncapi/')
name: Find orphans and notify
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -57,7 +58,7 @@ jobs:
name: Send info about orphan to slack
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
SLACK_WEBHOOK: ${{secrets.SLACK_CI_FAIL_NOTIFY}}
SLACK_TITLE: 🚨 Not merged PR that should be automerged 🚨
SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}}
MSG_MINIMAL: true
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
Loading