Skip to content

Commit

Permalink
Merge branch 'asyncapi:master' into feat/serversChannelsAsComponents
Browse files Browse the repository at this point in the history
  • Loading branch information
smoya authored Dec 28, 2021
2 parents ae1b32c + 2d0bf41 commit c9023da
Show file tree
Hide file tree
Showing 19 changed files with 469 additions and 103 deletions.
136 changes: 60 additions & 76 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,27 @@
"README.md"
],
"imageSize": 100,
"skipCi": true,
"contributorsPerLine": 7,
"skipCi": false,
"contributorsPerLine": 9,
"contributors": [
{
"login": "fmvilas",
"name": "Fran Méndez",
"avatar_url": "https://avatars3.githubusercontent.com/u/242119?v=4",
"profile": "http://www.fmvilas.com",
"contributions": [
"question",
"bug",
"blog",
"doc",
"ideas",
"infra",
"maintenance",
"review",
"tutorial",
"talk"
]
},
{
"login": "derberg",
"name": "Lukasz Gornicki",
Expand All @@ -19,15 +37,11 @@
"doc",
"ideas",
"review",
"code",
"question",
"eventOrganizing",
"content",
"blog",
"tool",
"talk",
"maintenance",
"test"
"infra"
]
},
{
Expand All @@ -38,14 +52,10 @@
"contributions": [
"question",
"doc",
"code",
"ideas",
"infra",
"review",
"test",
"tool",
"maintenance",
"eventOrganizing"
"maintenance"
]
},
{
Expand All @@ -56,50 +66,10 @@
"contributions": [
"question",
"bug",
"code",
"doc",
"ideas",
"maintenance",
"review",
"tool",
"test"
]
},
{
"login": "fmvilas",
"name": "Fran Méndez",
"avatar_url": "https://avatars3.githubusercontent.com/u/242119?v=4",
"profile": "http://www.fmvilas.com",
"contributions": [
"question",
"bug",
"blog",
"business",
"code",
"content",
"doc",
"design",
"financial",
"fundingFinding",
"ideas",
"infra",
"maintenance",
"plugin",
"review",
"tool",
"test",
"tutorial",
"talk",
"eventOrganizing"
]
},
{
"login": "DulceDeLaRosa",
"name": "dulce",
"avatar_url": "https://avatars0.githubusercontent.com/u/389154?v=4",
"profile": "https://github.com/DulceDeLaRosa",
"contributions": [
"design"
"review"
]
},
{
Expand All @@ -108,7 +78,6 @@
"avatar_url": "https://avatars2.githubusercontent.com/u/2420069?v=4",
"profile": "https://github.com/SensibleWood",
"contributions": [
"code",
"ideas",
"doc"
]
Expand All @@ -120,7 +89,6 @@
"profile": "https://github.com/jschabowsky",
"contributions": [
"doc",
"fundingFinding",
"ideas"
]
},
Expand All @@ -141,7 +109,8 @@
"profile": "http://antoniogarrote.wordpress.com",
"contributions": [
"ideas",
"review"
"review",
"doc"
]
},
{
Expand All @@ -150,7 +119,6 @@
"avatar_url": "https://avatars0.githubusercontent.com/u/9660342?v=4",
"profile": "https://ramses.tech",
"contributions": [
"fundingFinding",
"example",
"ideas",
"review"
Expand All @@ -163,22 +131,11 @@
"profile": "https://github.com/jonaslagoni",
"contributions": [
"bug",
"code",
"doc",
"ideas",
"question",
"eventOrganizing"
]
},
{
"login": "evamorcillo",
"name": "Eva",
"avatar_url": "https://avatars3.githubusercontent.com/u/13051398?v=4",
"profile": "http://evamorcillo.com/",
"contributions": [
"ideas",
"business",
"eventOrganizing"
"review",
"example"
]
},
{
Expand All @@ -188,8 +145,7 @@
"profile": "https://waleedashraf.me/",
"contributions": [
"talk",
"tool",
"eventOrganizing"
"ideas"
]
},
{
Expand All @@ -198,8 +154,7 @@
"avatar_url": "https://avatars0.githubusercontent.com/u/1447151?v=4",
"profile": "https://github.com/jerzyn",
"contributions": [
"talk",
"eventOrganizing"
"talk"
]
},
{
Expand All @@ -209,7 +164,6 @@
"profile": "https://linkedin.com/in/emmelyn",
"contributions": [
"blog",
"eventOrganizing",
"ideas",
"doc",
"talk"
Expand Down Expand Up @@ -289,7 +243,6 @@
"avatar_url": "https://avatars.githubusercontent.com/u/1538635?v=4",
"profile": "http://medium.com/@lbroudoux",
"contributions": [
"code",
"doc",
"blog",
"talk",
Expand All @@ -309,6 +262,37 @@
"review",
"ideas"
]
},
{
"login": "smoya",
"name": "Sergio Moya",
"avatar_url": "https://avatars.githubusercontent.com/u/1083296?v=4",
"profile": "https://github.com/smoya",
"contributions": [
"review",
"ideas",
"question"
]
},
{
"login": "balogal",
"name": "Alexander Balogh",
"avatar_url": "https://avatars.githubusercontent.com/u/80794567?v=4",
"profile": "https://github.com/balogal",
"contributions": [
"doc",
"bug"
]
},
{
"login": "KhudaDad414",
"name": "Khuda Dad Nomani",
"avatar_url": "https://avatars.githubusercontent.com/u/32505158?v=4",
"profile": "https://github.com/KhudaDad414",
"contributions": [
"example",
"bug"
]
}
],
"commitConvention": "none"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#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

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'
runs-on: ubuntu-latest
steps:
- name: Check if PR is draft # such info is not available in the context of issue_comment event
uses: actions/github-script@v5
id: checkDraft
with:
result-encoding: string
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' ))
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['ready-to-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'
runs-on: ubuntu-latest
steps:
- name: Add label
if: contains(github.event.comment.body, '/do-not-merge') || contains(github.event.comment.body, '/dnm' )
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['do-not-merge']
})
32 changes: 32 additions & 0 deletions .github/workflows/automerge-for-humans-merging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#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!
name: Automerge For Humans

on:
pull_request_target:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked

jobs:
automerge-for-humans:
if: github.event.pull_request.draft == false && (github.event.pull_request.user.login != 'asyncapi-bot' || github.event.pull_request.user.login != 'dependabot[bot]' || github.event.pull_request.user.login != 'dependabot-preview[bot]') #it runs only if PR actor is not a bot, at least not a bot that we know
runs-on: ubuntu-latest
steps:
- name: Automerge PR
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
MERGE_LABELS: "!do-not-merge,ready-to-merge"
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "pull-request-title"
MERGE_RETRIES: "20"
MERGE_RETRY_SLEEP: "30000"
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#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
name: Remove ready-to-merge label

on:
pull_request_target:
types:
- synchronize
- edited

jobs:
remove-ready-label:
runs-on: ubuntu-latest
steps:
- name: Remove label
uses: actions/github-script@v5
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
})
4 changes: 2 additions & 2 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:

autoapprove:
if: (github.event.pull_request.draft == false) && (github.actor == 'asyncapi-bot' || github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') && !contains(github.event.pull_request.labels.*.name, 'released')
if: github.event.pull_request.draft == false && (github.event.pull_request.user.login == 'asyncapi-bot' || github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'dependabot-preview[bot]') && !contains(github.event.pull_request.labels.*.name, 'released')
runs-on: ubuntu-latest
steps:
- name: Autoapproving
Expand All @@ -44,11 +44,11 @@ jobs:
automerge:
needs: [autoapprove]
if: github.event.pull_request.user.login == 'asyncapi-bot' || github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'dependabot-preview[bot]'
runs-on: ubuntu-latest
steps:
- name: Automerging
uses: pascalgn/[email protected]
if: github.actor == 'asyncapi-bot' || github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
env:
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
GITHUB_LOGIN: asyncapi-bot
Expand Down
Loading

0 comments on commit c9023da

Please sign in to comment.