From 5b0c7433a9d04cff2c02b54eaeaf867e902e5302 Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Sun, 24 Mar 2024 16:51:27 +0530 Subject: [PATCH 01/21] Add workflow to enable voting --- .github/workflows/add_vote_label.yml | 70 ++++++++++++++++++++++++ .github/workflows/remove_vote_label.yml | 71 +++++++++++++++++++++++++ .gitvote.yml | 54 +++++++++++++++++++ 3 files changed, 195 insertions(+) create mode 100644 .github/workflows/add_vote_label.yml create mode 100644 .github/workflows/remove_vote_label.yml create mode 100644 .gitvote.yml diff --git a/.github/workflows/add_vote_label.yml b/.github/workflows/add_vote_label.yml new file mode 100644 index 000000000..b7f77f673 --- /dev/null +++ b/.github/workflows/add_vote_label.yml @@ -0,0 +1,70 @@ +name: Add label to PR on comment + +on: + issue_comment: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Get the comment body + id: get_comment_body + run: | + echo "Comment body: ${{ github.event.comment.body }}" | ls + + - name: Verify TSC Member + id: verify_member + uses: actions/github-script@v6 + with: + script: | + const fs = require('fs'); + const filePath = 'TSC_MEMBERS.json'; + const commenterName = context.payload.sender.login; + let isTSCMember = false; + + function readFileAndProcess(callback) { + fs.readFile(filePath, 'utf8', (err, data) => { + if (err) { + callback(err, null); + return; + } + try { + const jsonData = JSON.parse(data); + // Iterate over each object in the array + jsonData.forEach(item => { + if (item.github === commenterName) { + isTSCMember = true; + } + }); + // Invoke the callback function with the result + callback(null, isTSCMember); + } catch (parseError) { + callback(parseError, null); + } + }); + } + + readFileAndProcess((error, result) => { + if (error) { + console.error('Error:', error); + } else { + console.log('Is TSC Member:', result); + core.setOutput('isTSCMember', isTSCMember); + } + }); + + - name: Add the label + if: contains(github.event.comment.body, '/vote') && steps.verify_member.outputs.isTSCMember =='true' + run: + if [ "${{ github.event_name }}" = "pull_request" ]; then + gh pr edit ${{ github.event.pull_request.number }} --add-label "vote" + else + gh issue edit ${{ github.event.issue.number }} --add-label "vote" + fi + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/remove_vote_label.yml b/.github/workflows/remove_vote_label.yml new file mode 100644 index 000000000..15d91a813 --- /dev/null +++ b/.github/workflows/remove_vote_label.yml @@ -0,0 +1,71 @@ +name: Remove vote label + +on: + issue_comment: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Get the comment body + id: get_comment_body + run: | + echo "Comment body: ${{ github.event.comment.body }}" + + - name: Verify TSC Member + id: verify_member + uses: actions/github-script@v6 + with: + script: | + const fs = require('fs'); + const filePath = 'TSC_MEMBERS.json'; + const commenterName = context.payload.sender.login; + let isTSCMember = false; + + function readFileAndProcess(callback) { + fs.readFile(filePath, 'utf8', (err, data) => { + if (err) { + callback(err, null); + return; + } + try { + const jsonData = JSON.parse(data); + // Iterate over each object in the array + jsonData.forEach(item => { + if (item.github === commenterName) { + isTSCMember = true; + } + }); + // Invoke the callback function with the result + callback(null, isTSCMember); + } catch (parseError) { + callback(parseError, null); + } + }); + } + + readFileAndProcess((error, result) => { + if (error) { + console.error('Error:', error); + } else { + console.log('Is TSC Member:', result); + core.setOutput('isTSCMember', isTSCMember); + } + }); + + - name: Add the label + if: contains(github.event.comment.body, '/cancel-vote') && steps.verify_member.outputs.isTSCMember =='true' + run: + run:| + if [ "${{ github.event_name }}" = "pull_request" ]; then + gh pr edit ${{ github.event.pull_request.number }} --remove-label "vote" + else + gh issue edit ${{ github.event.issue.number }} --remove-label "vote" + fi + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.gitvote.yml b/.gitvote.yml new file mode 100644 index 000000000..312bc5055 --- /dev/null +++ b/.gitvote.yml @@ -0,0 +1,54 @@ +profiles: + default: + duration: 2m + pass_threshold: 51 + periodic_status_check: "1 week" + allowed_voters: + teams: + - tsc_members + users: + - aayushmau5 + - imabp + - akshatnema + - anandsunderraman + - arjungarg07 + - CameronRushton + - dalelane + - emilianozublena + - fmvilas + - GeraldLoeffler + - jonaslagoni + - KhudaDad414 + - lbroudoux + - m3lkior + - derberg + - magicmatatjahu + - AceTheCreator + - damaru-inc + - mcturco + - NektariosFifes + - Pakisan + - theschles + - pratik2315 + - rcoppen + - smoya + - Souvikns + - alequetzalli + - BOLT04 + - dan-r + - KieranM1999 + - JEFFLUFC + - thulieblack + - lewis-relph + - boyney123 + - Tenischev + - Samridhi-98 + - ron-debajyoti + - ivangsa + - Florence-Njeri + - whitlockjc + - char0n + - VisualBean + - Barbanio + - kennethaasan + - GreenRover \ No newline at end of file From 04c7047b2404af226b730827b41d6c9bc299b430 Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Thu, 28 Mar 2024 09:12:28 +0530 Subject: [PATCH 02/21] Added required changes --- .github/actions/verifyMember/action.yml | 43 +++++++++++++ .github/workflows/add_vote_label.yml | 70 -------------------- .github/workflows/remove_vote_label.yml | 71 --------------------- .github/workflows/vote-verifcation.yml | 52 +++++++++++++++ .gitvote.yml | 50 +-------------- docs/voting.md | 85 +++++++++++++++++++++++++ tsc_members.yaml | 46 +++++++++++++ 7 files changed, 228 insertions(+), 189 deletions(-) create mode 100644 .github/actions/verifyMember/action.yml delete mode 100644 .github/workflows/add_vote_label.yml delete mode 100644 .github/workflows/remove_vote_label.yml create mode 100644 .github/workflows/vote-verifcation.yml create mode 100644 docs/voting.md create mode 100644 tsc_members.yaml diff --git a/.github/actions/verifyMember/action.yml b/.github/actions/verifyMember/action.yml new file mode 100644 index 000000000..9592d2c28 --- /dev/null +++ b/.github/actions/verifyMember/action.yml @@ -0,0 +1,43 @@ +name: Verify Member +outputs: + isTSCMember: + description: 'Verify Member' + value: ${{steps.verify_member.outputs.isTSCMember}} +inputs: + authorName: + description: 'Name of the Author' + required: true + +runs: + using: "composite" + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install the dependencies + run: npm install js-yaml + shell: bash + + - name: Verify TSC Member + id: verify_member + uses: actions/github-script@v6 + with: + script: | + const yaml = require('js-yaml'); + const fs = require('fs'); + const commenterName = 'AayushSaini101'; + let isTSCMember = false; + try { + // Load YAML file + const data = yaml.load(fs.readFileSync('MAINTAINERS.yaml', 'utf8')); + // Iterate over each person object + data.forEach(person => { + // Check if the person is a TSC member or not + if (person.isTscMember && person.github == commenterName) { + isTSCMember = true; + core.setOutput('isTSCMember', isTSCMember); + } + }); + } catch (e) { + console.log(e); + } \ No newline at end of file diff --git a/.github/workflows/add_vote_label.yml b/.github/workflows/add_vote_label.yml deleted file mode 100644 index b7f77f673..000000000 --- a/.github/workflows/add_vote_label.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Add label to PR on comment - -on: - issue_comment: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Get the comment body - id: get_comment_body - run: | - echo "Comment body: ${{ github.event.comment.body }}" | ls - - - name: Verify TSC Member - id: verify_member - uses: actions/github-script@v6 - with: - script: | - const fs = require('fs'); - const filePath = 'TSC_MEMBERS.json'; - const commenterName = context.payload.sender.login; - let isTSCMember = false; - - function readFileAndProcess(callback) { - fs.readFile(filePath, 'utf8', (err, data) => { - if (err) { - callback(err, null); - return; - } - try { - const jsonData = JSON.parse(data); - // Iterate over each object in the array - jsonData.forEach(item => { - if (item.github === commenterName) { - isTSCMember = true; - } - }); - // Invoke the callback function with the result - callback(null, isTSCMember); - } catch (parseError) { - callback(parseError, null); - } - }); - } - - readFileAndProcess((error, result) => { - if (error) { - console.error('Error:', error); - } else { - console.log('Is TSC Member:', result); - core.setOutput('isTSCMember', isTSCMember); - } - }); - - - name: Add the label - if: contains(github.event.comment.body, '/vote') && steps.verify_member.outputs.isTSCMember =='true' - run: - if [ "${{ github.event_name }}" = "pull_request" ]; then - gh pr edit ${{ github.event.pull_request.number }} --add-label "vote" - else - gh issue edit ${{ github.event.issue.number }} --add-label "vote" - fi - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.github/workflows/remove_vote_label.yml b/.github/workflows/remove_vote_label.yml deleted file mode 100644 index 15d91a813..000000000 --- a/.github/workflows/remove_vote_label.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Remove vote label - -on: - issue_comment: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Get the comment body - id: get_comment_body - run: | - echo "Comment body: ${{ github.event.comment.body }}" - - - name: Verify TSC Member - id: verify_member - uses: actions/github-script@v6 - with: - script: | - const fs = require('fs'); - const filePath = 'TSC_MEMBERS.json'; - const commenterName = context.payload.sender.login; - let isTSCMember = false; - - function readFileAndProcess(callback) { - fs.readFile(filePath, 'utf8', (err, data) => { - if (err) { - callback(err, null); - return; - } - try { - const jsonData = JSON.parse(data); - // Iterate over each object in the array - jsonData.forEach(item => { - if (item.github === commenterName) { - isTSCMember = true; - } - }); - // Invoke the callback function with the result - callback(null, isTSCMember); - } catch (parseError) { - callback(parseError, null); - } - }); - } - - readFileAndProcess((error, result) => { - if (error) { - console.error('Error:', error); - } else { - console.log('Is TSC Member:', result); - core.setOutput('isTSCMember', isTSCMember); - } - }); - - - name: Add the label - if: contains(github.event.comment.body, '/cancel-vote') && steps.verify_member.outputs.isTSCMember =='true' - run: - run:| - if [ "${{ github.event_name }}" = "pull_request" ]; then - gh pr edit ${{ github.event.pull_request.number }} --remove-label "vote" - else - gh issue edit ${{ github.event.issue.number }} --remove-label "vote" - fi - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.github/workflows/vote-verifcation.yml b/.github/workflows/vote-verifcation.yml new file mode 100644 index 000000000..1ff5da1ba --- /dev/null +++ b/.github/workflows/vote-verifcation.yml @@ -0,0 +1,52 @@ +name: Verification of the Vote +on: + issue_comment: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Verify the person + id: verify_member + uses: ./.github/actions/verifyMember + with: + authorName: "${{github.event.comment.user.login}}" + + - name: Set Output to Environment Variable + run: echo "IS_TSC_MEMBER=${{ steps.verify_member.outputs.isTSCMember }}" >> $GITHUB_ENV + + - name: Sending authorised + if: (contains(github.event.comment.body, '/vote') || contains(github.event.comment.body, '/cancel-vote')) && env.IS_TSC_MEMBER == 'false' + uses: actions/github-script@v6 + with: + script: | + const commentText = `❌ @${{github.actor}} is not authorized to vote. + These commands can only be used by TSC members of the [TSC Members](https://github.com/asyncapi/community/blob/master/TSC_MEMBERS.json).`; + console.log(`❌ @${{github.actor}} made an unauthorized attempt to use a vote command.`); + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: commentText + }) + + - name: Add the label + if: (contains(github.event.comment.body, '/cancel-vote') || contains(github.event.comment.body, '/vote')) && env.IS_TSC_MEMBER =='true' + run: | + if [ "${{ github.event.comment.body }}" == "/cancel-vote" ]; then + if [ "${{ github.event_name }}" != "pull_request" ]; then + gh issue edit ${{ github.event.issue.number }} --remove-label "vote" + else + gh pr edit ${{ github.event.issue.number }} --remove-label "vote" + fi + fi + if [ "${{ github.event.comment.body }}" == "/vote" ]; then + if [ "${{ github.event_name }}" != "pull_request" ]; then + gh issue edit ${{ github.event.issue.number }} --add-label "vote" + else + gh pr edit ${{ github.event.issue.number }} --add-label "vote" + fi + fi + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitvote.yml b/.gitvote.yml index 312bc5055..30bf2ce21 100644 --- a/.gitvote.yml +++ b/.gitvote.yml @@ -1,54 +1,8 @@ profiles: default: - duration: 2m + duration: 1d pass_threshold: 51 periodic_status_check: "1 week" allowed_voters: teams: - - tsc_members - users: - - aayushmau5 - - imabp - - akshatnema - - anandsunderraman - - arjungarg07 - - CameronRushton - - dalelane - - emilianozublena - - fmvilas - - GeraldLoeffler - - jonaslagoni - - KhudaDad414 - - lbroudoux - - m3lkior - - derberg - - magicmatatjahu - - AceTheCreator - - damaru-inc - - mcturco - - NektariosFifes - - Pakisan - - theschles - - pratik2315 - - rcoppen - - smoya - - Souvikns - - alequetzalli - - BOLT04 - - dan-r - - KieranM1999 - - JEFFLUFC - - thulieblack - - lewis-relph - - boyney123 - - Tenischev - - Samridhi-98 - - ron-debajyoti - - ivangsa - - Florence-Njeri - - whitlockjc - - char0n - - VisualBean - - Barbanio - - kennethaasan - - GreenRover \ No newline at end of file + - tsc_members \ No newline at end of file diff --git a/docs/voting.md b/docs/voting.md new file mode 100644 index 000000000..99a744ae9 --- /dev/null +++ b/docs/voting.md @@ -0,0 +1,85 @@ +## Voting for TSC Members + +There are many situation in the open source contribution, when we need to take suggestion of all the organsiation members, whether the particular issue is required or not, or the changes is valid in the specific pull request. + +Now we can easily listen the suggestions of the members via **git-vot** bot. + +### Voting Rules + +* The voting will be done by only TSC Members. +* The duration of the voting will be 1 day. +* The vote will be passed when more than 50% voting are in favour. + +### How to vote on particular issue and pull request. + +You need to add only one command to start the voting process on the issue on in the particular PR. **Please not only TSC Members can participate in the voting process**. + +*A **vote label** will be added on the issue after starting of the voting process.* + +**Command:** + +``` +/vote +``` + +**TSC Member starting voting process:** + +![image](https://hackmd.io/_uploads/Sk_L-CWyR.png) + + +**Reactions to participate in voting process** +* In favor of the changes. 👍 +* In against of the changes. 👎 +* Abstain from the voting. 👀 + + +**Example:** + +Member voted in the favor of the required changes + +![image](https://hackmd.io/_uploads/BybuXCZ1C.png) + + +**Result:** + + +![image](https://hackmd.io/_uploads/ByXBNRWJA.png) + + +### Checking status of the vote +If anyone wants to check the status of the vote can easily check by using following command: + +``` +/check-vote +``` +**Status of the vote** + +![image](https://hackmd.io/_uploads/ry3dOLGJ0.png) + +### Invalid vote execution + + +When unauthorised member tries to execute the /vote command, he or she will get a message related to unauthorised. + +**Starting unauthorised voting:** + +![image](https://hackmd.io/_uploads/BywW8AbkR.png) + + +**Getting response for voting** +![image](https://hackmd.io/_uploads/rkjnS0bkA.png) + + + +### Cancelling the vote + +TSC members can cancel the voting on the particular issue or PR, The cancelling vote removes the **vote** label from an issue. + +**Command:** +``` +cancel-vote +``` + +**Cancelling vote status:** + +![image](https://hackmd.io/_uploads/rkhgYUzkC.png) diff --git a/tsc_members.yaml b/tsc_members.yaml new file mode 100644 index 000000000..6605ea1d7 --- /dev/null +++ b/tsc_members.yaml @@ -0,0 +1,46 @@ + - aayushmau5 + - imabp + - akshatnema + - anandsunderraman + - arjungarg07 + - CameronRushton + - dalelane + - emilianozublena + - fmvilas + - GeraldLoeffler + - jonaslagoni + - KhudaDad414 + - lbroudoux + - m3lkior + - derberg + - magicmatatjahu + - AceTheCreator + - damaru-inc + - mcturco + - NektariosFifes + - Pakisan + - theschles + - pratik2315 + - rcoppen + - smoya + - Souvikns + - alequetzalli + - BOLT04 + - dan-r + - KieranM1999 + - JEFFLUFC + - thulieblack + - lewis-relph + - boyney123 + - Tenischev + - Samridhi-98 + - ron-debajyoti + - ivangsa + - Florence-Njeri + - whitlockjc + - char0n + - VisualBean + - Barbanio + - kennethaasan + - GreenRover + \ No newline at end of file From 2aa27ae346270193f613bdea44c2ea2884e15840 Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Thu, 28 Mar 2024 09:21:58 +0530 Subject: [PATCH 03/21] update' --- .github/workflows/vote-verifcation.yml | 4 +- tsc_members.yaml | 91 +++++++++++++------------- 2 files changed, 47 insertions(+), 48 deletions(-) diff --git a/.github/workflows/vote-verifcation.yml b/.github/workflows/vote-verifcation.yml index 1ff5da1ba..4bcf420e9 100644 --- a/.github/workflows/vote-verifcation.yml +++ b/.github/workflows/vote-verifcation.yml @@ -17,11 +17,11 @@ jobs: run: echo "IS_TSC_MEMBER=${{ steps.verify_member.outputs.isTSCMember }}" >> $GITHUB_ENV - name: Sending authorised - if: (contains(github.event.comment.body, '/vote') || contains(github.event.comment.body, '/cancel-vote')) && env.IS_TSC_MEMBER == 'false' + if: (contains(github.event.comment.body, '/cancel-vote')) && env.IS_TSC_MEMBER == 'false' uses: actions/github-script@v6 with: script: | - const commentText = `❌ @${{github.actor}} is not authorized to vote. + const commentText = `❌ @${{github.actor}} is not authorised to execute vote command. These commands can only be used by TSC members of the [TSC Members](https://github.com/asyncapi/community/blob/master/TSC_MEMBERS.json).`; console.log(`❌ @${{github.actor}} made an unauthorized attempt to use a vote command.`); github.rest.issues.createComment({ diff --git a/tsc_members.yaml b/tsc_members.yaml index 6605ea1d7..277fa7617 100644 --- a/tsc_members.yaml +++ b/tsc_members.yaml @@ -1,46 +1,45 @@ - - aayushmau5 - - imabp - - akshatnema - - anandsunderraman - - arjungarg07 - - CameronRushton - - dalelane - - emilianozublena - - fmvilas - - GeraldLoeffler - - jonaslagoni - - KhudaDad414 - - lbroudoux - - m3lkior - - derberg - - magicmatatjahu - - AceTheCreator - - damaru-inc - - mcturco - - NektariosFifes - - Pakisan - - theschles - - pratik2315 - - rcoppen - - smoya - - Souvikns - - alequetzalli - - BOLT04 - - dan-r - - KieranM1999 - - JEFFLUFC - - thulieblack - - lewis-relph - - boyney123 - - Tenischev - - Samridhi-98 - - ron-debajyoti - - ivangsa - - Florence-Njeri - - whitlockjc - - char0n - - VisualBean - - Barbanio - - kennethaasan - - GreenRover - \ No newline at end of file +-aayushmau5 +-imabp +-akshatnema +-anandsunderraman +-arjungarg07 +-CameronRushton +-dalelane +-emilianozublena +-fmvilas +-GeraldLoeffler +-jonaslagoni +-KhudaDad414 +-lbroudoux +-m3lkior +-derberg +-magicmatatjahu +-AceTheCreator +-damaru-inc +-mcturco +-NektariosFifes +-Pakisan +-theschles +-pratik2315 +-rcoppen +-smoya +-Souvikns +-alequetzalli +-BOLT04 +-dan-r +-KieranM1999 +-JEFFLUFC +-thulieblack +-lewis-relph +-boyney123 +-Tenischev +-Samridhi-98 +-ron-debajyoti +-ivangsa +-Florence-Njeri +-whitlockjc +-char0n +-VisualBean +-Barbanio +-kennethaasan +-GreenRover \ No newline at end of file From b5b28f63107db20f83a5b8eb92c50c24c2df440e Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Thu, 28 Mar 2024 09:32:29 +0530 Subject: [PATCH 04/21] update author variable --- .github/actions/verifyMember/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/verifyMember/action.yml b/.github/actions/verifyMember/action.yml index 9592d2c28..650eb127e 100644 --- a/.github/actions/verifyMember/action.yml +++ b/.github/actions/verifyMember/action.yml @@ -25,7 +25,7 @@ runs: script: | const yaml = require('js-yaml'); const fs = require('fs'); - const commenterName = 'AayushSaini101'; + const commenterName = '${{inputs.authorName}}'; let isTSCMember = false; try { // Load YAML file From d35401b2e2d1c1824a2a130cfd35a47956c0d4f4 Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Thu, 28 Mar 2024 09:36:33 +0530 Subject: [PATCH 05/21] remove variable --- .github/actions/verifyMember/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/verifyMember/action.yml b/.github/actions/verifyMember/action.yml index 650eb127e..6f91f2cbc 100644 --- a/.github/actions/verifyMember/action.yml +++ b/.github/actions/verifyMember/action.yml @@ -35,9 +35,10 @@ runs: // Check if the person is a TSC member or not if (person.isTscMember && person.github == commenterName) { isTSCMember = true; - core.setOutput('isTSCMember', isTSCMember); + } }); } catch (e) { console.log(e); - } \ No newline at end of file + } + core.setOutput('isTSCMember', isTSCMember); \ No newline at end of file From 603a058cacfac432662789631927279561288833 Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Thu, 28 Mar 2024 09:58:46 +0530 Subject: [PATCH 06/21] update message name --- .github/workflows/vote-verifcation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vote-verifcation.yml b/.github/workflows/vote-verifcation.yml index 4bcf420e9..636cbd942 100644 --- a/.github/workflows/vote-verifcation.yml +++ b/.github/workflows/vote-verifcation.yml @@ -16,7 +16,7 @@ jobs: - name: Set Output to Environment Variable run: echo "IS_TSC_MEMBER=${{ steps.verify_member.outputs.isTSCMember }}" >> $GITHUB_ENV - - name: Sending authorised + - name: Sending unauthorised Message if: (contains(github.event.comment.body, '/cancel-vote')) && env.IS_TSC_MEMBER == 'false' uses: actions/github-script@v6 with: From d7e79fda2376a8a1d590d95d5f96bd58de22599a Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Thu, 4 Apr 2024 16:22:34 +0530 Subject: [PATCH 07/21] Update suggestion --- .github/actions/verifyMember/action.yml | 44 -------------------- .github/actions/verifyTSCMember/action.yml | 48 ++++++++++++++++++++++ .github/workflows/vote-verifcation.yml | 33 +++++++++------ 3 files changed, 68 insertions(+), 57 deletions(-) delete mode 100644 .github/actions/verifyMember/action.yml create mode 100644 .github/actions/verifyTSCMember/action.yml diff --git a/.github/actions/verifyMember/action.yml b/.github/actions/verifyMember/action.yml deleted file mode 100644 index 6f91f2cbc..000000000 --- a/.github/actions/verifyMember/action.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Verify Member -outputs: - isTSCMember: - description: 'Verify Member' - value: ${{steps.verify_member.outputs.isTSCMember}} -inputs: - authorName: - description: 'Name of the Author' - required: true - -runs: - using: "composite" - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Install the dependencies - run: npm install js-yaml - shell: bash - - - name: Verify TSC Member - id: verify_member - uses: actions/github-script@v6 - with: - script: | - const yaml = require('js-yaml'); - const fs = require('fs'); - const commenterName = '${{inputs.authorName}}'; - let isTSCMember = false; - try { - // Load YAML file - const data = yaml.load(fs.readFileSync('MAINTAINERS.yaml', 'utf8')); - // Iterate over each person object - data.forEach(person => { - // Check if the person is a TSC member or not - if (person.isTscMember && person.github == commenterName) { - isTSCMember = true; - - } - }); - } catch (e) { - console.log(e); - } - core.setOutput('isTSCMember', isTSCMember); \ No newline at end of file diff --git a/.github/actions/verifyTSCMember/action.yml b/.github/actions/verifyTSCMember/action.yml new file mode 100644 index 000000000..e2d287834 --- /dev/null +++ b/.github/actions/verifyTSCMember/action.yml @@ -0,0 +1,48 @@ +name: Verify TCS Member + +outputs: + version: + description: 'true/false' + value: ${{ steps.verify_member.outputs.isTSCMember }} + +inputs: + authorName: + description: 'Name of the Commentor' + required: true + +runs: + using: "composite" + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install the dependencies + run: npm install js-yaml@^4.0.1 + shell: bash + + - name: Verify TSC Member + id: verify_member + uses: actions/github-script@v6 + with: + script: | + const yaml = require('js-yaml'); + const fs = require('fs'); + const commenterName = '${{ inputs.authorName }}'; + let isTSCMember = false; + try { + // Load YAML file + const data = yaml.load(fs.readFileSync('../../MAINTAINERS.yaml', 'utf8')); + + // Filter persons who are TSC members and whose GitHub username matches commenterName + const filteredPersons = data.filter(person => { + return (person.isTscMember === true || person.isTscMember === "true") && person.github === commenterName; + }); + // Log filtered persons + filteredPersons.forEach(person => { + isTSCMember = true; + }); + + core.setOutput('isTSCMember', isTSCMember); + } catch (e) { + console.log(e); + } diff --git a/.github/workflows/vote-verifcation.yml b/.github/workflows/vote-verifcation.yml index 636cbd942..39a1fb51e 100644 --- a/.github/workflows/vote-verifcation.yml +++ b/.github/workflows/vote-verifcation.yml @@ -1,10 +1,13 @@ name: Verification of the Vote + on: issue_comment: types: [created] + jobs: build: runs-on: ubuntu-latest + steps: - uses: actions/checkout@v3 - name: Verify the person @@ -12,25 +15,29 @@ jobs: uses: ./.github/actions/verifyMember with: authorName: "${{github.event.comment.user.login}}" - + - name: Set Output to Environment Variable - run: echo "IS_TSC_MEMBER=${{ steps.verify_member.outputs.isTSCMember }}" >> $GITHUB_ENV + run: echo "IS_TSC_MEMBER=${{ steps.verify_member.outputs.version }}" >> $GITHUB_ENV - - name: Sending unauthorised Message - if: (contains(github.event.comment.body, '/cancel-vote')) && env.IS_TSC_MEMBER == 'false' + - name: Checking the person authenticity for vote. + if: contains(github.event.comment.body, '/vote') || contains(github.event.comment.body, '/cancel-vote') uses: actions/github-script@v6 with: script: | - const commentText = `❌ @${{github.actor}} is not authorised to execute vote command. - These commands can only be used by TSC members of the [TSC Members](https://github.com/asyncapi/community/blob/master/TSC_MEMBERS.json).`; - console.log(`❌ @${{github.actor}} made an unauthorized attempt to use a vote command.`); - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, + const isTSCMember = ${{env.IS_TSC_MEMBER}}; + if (!isTSCMember) { + const commentText = `User ❌ @${{ github.actor }} is not a [TSC Member](https://github.com/asyncapi/community/blob/master/TSC_MEMBERS.json).`; + console.log(`User ❌ @${{ github.actor }} is not a TSC Member`); + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, body: commentText - }) - + }); + } else if('${{github.actor}}' != 'git-vote[bot]') { + console.log(`User ✅ @${{ github.actor }} is a TSC Member`); + } + - name: Add the label if: (contains(github.event.comment.body, '/cancel-vote') || contains(github.event.comment.body, '/vote')) && env.IS_TSC_MEMBER =='true' run: | From 1be21320280e6ce05342db1106f61b97ac050e3d Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Thu, 4 Apr 2024 21:18:56 +0530 Subject: [PATCH 08/21] improve suggestion --- .github/actions/verifyTSCMember/action.yml | 46 +++++++++++----------- .github/workflows/vote-verifcation.yml | 40 +++++++++---------- tsc_members.yaml | 45 --------------------- 3 files changed, 41 insertions(+), 90 deletions(-) delete mode 100644 tsc_members.yaml diff --git a/.github/actions/verifyTSCMember/action.yml b/.github/actions/verifyTSCMember/action.yml index e2d287834..e8e68b480 100644 --- a/.github/actions/verifyTSCMember/action.yml +++ b/.github/actions/verifyTSCMember/action.yml @@ -1,23 +1,21 @@ -name: Verify TCS Member - +name: Verify Member outputs: - version: - description: 'true/false' - value: ${{ steps.verify_member.outputs.isTSCMember }} - + isTSCMember: + description: 'Verify Member' + value: ${{steps.verify_member.outputs.isTSCMember}} inputs: authorName: - description: 'Name of the Commentor' + description: 'Name of the commentor' required: true runs: using: "composite" steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install the dependencies - run: npm install js-yaml@^4.0.1 + run: npm install js-yaml@4.1.0 shell: bash - name: Verify TSC Member @@ -30,19 +28,19 @@ runs: const commenterName = '${{ inputs.authorName }}'; let isTSCMember = false; try { - // Load YAML file - const data = yaml.load(fs.readFileSync('../../MAINTAINERS.yaml', 'utf8')); - - // Filter persons who are TSC members and whose GitHub username matches commenterName - const filteredPersons = data.filter(person => { - return (person.isTscMember === true || person.isTscMember === "true") && person.github === commenterName; - }); - // Log filtered persons - filteredPersons.forEach(person => { - isTSCMember = true; - }); - - core.setOutput('isTSCMember', isTSCMember); + // Load YAML file + const data = yaml.load(fs.readFileSync('MAINTAINERS.yaml', 'utf8')); + + // Filter persons who are TSC members and whose GitHub username matches commenterName + const isTscMember = data.find(person => { + return (person.isTscMember === true || person.isTscMember === "true") && person.github === commenterName; + }); + // Check if a TSC member was found + if (isTscMember) { + isTSCMember = true; + } + + core.setOutput('isTSCMember', isTSCMember); } catch (e) { - console.log(e); - } + console.log(e); + } \ No newline at end of file diff --git a/.github/workflows/vote-verifcation.yml b/.github/workflows/vote-verifcation.yml index 39a1fb51e..73cd7b50b 100644 --- a/.github/workflows/vote-verifcation.yml +++ b/.github/workflows/vote-verifcation.yml @@ -9,37 +9,35 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Verify the person id: verify_member - uses: ./.github/actions/verifyMember + uses: ./.github/actions/verifyTSCMember with: authorName: "${{github.event.comment.user.login}}" - - name: Set Output to Environment Variable - run: echo "IS_TSC_MEMBER=${{ steps.verify_member.outputs.version }}" >> $GITHUB_ENV - - - name: Checking the person authenticity for vote. + - name: Checking the person authenticity. if: contains(github.event.comment.body, '/vote') || contains(github.event.comment.body, '/cancel-vote') uses: actions/github-script@v6 with: - script: | - const isTSCMember = ${{env.IS_TSC_MEMBER}}; - if (!isTSCMember) { - const commentText = `User ❌ @${{ github.actor }} is not a [TSC Member](https://github.com/asyncapi/community/blob/master/TSC_MEMBERS.json).`; - console.log(`User ❌ @${{ github.actor }} is not a TSC Member`); - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: commentText - }); - } else if('${{github.actor}}' != 'git-vote[bot]') { - console.log(`User ✅ @${{ github.actor }} is a TSC Member`); - } + script : | + const isTSCMember = ${{ steps.verify_member.outputs.isTSCMember}} + if(!isTSCMember) { + const commentText = `User ❌ @${{ github.actor }} is not a [TSC Member](https://github.com/asyncapi/community/blob/master/TSC_MEMBERS.json).`; + console.log(`User ❌ @${{ github.actor }} is not a TSC Member`); + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: commentText + }); + } else if('${{github.actor}}' != 'git-vote[bot]') { + console.log(`User ✅ @${{ github.actor }} is a TSC Member`); + } + - name: Add the label - if: (contains(github.event.comment.body, '/cancel-vote') || contains(github.event.comment.body, '/vote')) && env.IS_TSC_MEMBER =='true' + if: (contains(github.event.comment.body, '/cancel-vote') || contains(github.event.comment.body, '/vote')) && ${{steps.verify_member.outputs.isTSCMember}} == true run: | if [ "${{ github.event.comment.body }}" == "/cancel-vote" ]; then if [ "${{ github.event_name }}" != "pull_request" ]; then diff --git a/tsc_members.yaml b/tsc_members.yaml deleted file mode 100644 index 277fa7617..000000000 --- a/tsc_members.yaml +++ /dev/null @@ -1,45 +0,0 @@ --aayushmau5 --imabp --akshatnema --anandsunderraman --arjungarg07 --CameronRushton --dalelane --emilianozublena --fmvilas --GeraldLoeffler --jonaslagoni --KhudaDad414 --lbroudoux --m3lkior --derberg --magicmatatjahu --AceTheCreator --damaru-inc --mcturco --NektariosFifes --Pakisan --theschles --pratik2315 --rcoppen --smoya --Souvikns --alequetzalli --BOLT04 --dan-r --KieranM1999 --JEFFLUFC --thulieblack --lewis-relph --boyney123 --Tenischev --Samridhi-98 --ron-debajyoti --ivangsa --Florence-Njeri --whitlockjc --char0n --VisualBean --Barbanio --kennethaasan --GreenRover \ No newline at end of file From bb074f5853b81db505c86f66e2cd273321945aff Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Thu, 4 Apr 2024 21:22:17 +0530 Subject: [PATCH 09/21] Improve description --- .github/actions/verifyTSCMember/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/verifyTSCMember/action.yml b/.github/actions/verifyTSCMember/action.yml index e8e68b480..261f34909 100644 --- a/.github/actions/verifyTSCMember/action.yml +++ b/.github/actions/verifyTSCMember/action.yml @@ -1,7 +1,7 @@ name: Verify Member outputs: isTSCMember: - description: 'Verify Member' + description: 'Check whether the person is TSCMember or not' value: ${{steps.verify_member.outputs.isTSCMember}} inputs: authorName: From eba881f9493547ee476f2da7c4a004c2cfbf1b9b Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Fri, 5 Apr 2024 15:12:16 +0530 Subject: [PATCH 10/21] update suggestion --- .github/workflows/vote-verifcation.yml | 25 +++++++++++++++---------- .gitvote.yml | 2 +- docs/voting.md => voting.md | 4 ++-- 3 files changed, 18 insertions(+), 13 deletions(-) rename docs/voting.md => voting.md (93%) diff --git a/.github/workflows/vote-verifcation.yml b/.github/workflows/vote-verifcation.yml index 73cd7b50b..0d440fd9b 100644 --- a/.github/workflows/vote-verifcation.yml +++ b/.github/workflows/vote-verifcation.yml @@ -23,7 +23,7 @@ jobs: script : | const isTSCMember = ${{ steps.verify_member.outputs.isTSCMember}} if(!isTSCMember) { - const commentText = `User ❌ @${{ github.actor }} is not a [TSC Member](https://github.com/asyncapi/community/blob/master/TSC_MEMBERS.json).`; + const commentText = `User ❌ @${{ github.actor }} is not a [TSC Member](https://www.asyncapi.com/community/tsc). Guidelines to become a [TSC Member](https://github.com/asyncapi/community/blob/master/TSC_MEMBERSHIP.md)`; console.log(`User ❌ @${{ github.actor }} is not a TSC Member`); github.rest.issues.createComment({ issue_number: context.issue.number, @@ -36,22 +36,27 @@ jobs: } - - name: Add the label - if: (contains(github.event.comment.body, '/cancel-vote') || contains(github.event.comment.body, '/vote')) && ${{steps.verify_member.outputs.isTSCMember}} == true + - name: Adding the vote label. + if: contains(github.event.comment.body, '/vote') && ${{steps.verify_member.outputs.isTSCMember}} == true run: | - if [ "${{ github.event.comment.body }}" == "/cancel-vote" ]; then + if [ "${{ github.event.comment.body }}" == "/vote" ]; then if [ "${{ github.event_name }}" != "pull_request" ]; then - gh issue edit ${{ github.event.issue.number }} --remove-label "vote" + gh issue edit ${{ github.event.issue.number }} --add-label "vote" else - gh pr edit ${{ github.event.issue.number }} --remove-label "vote" + gh pr edit ${{ github.event.issue.number }} --add-label "vote" fi fi - if [ "${{ github.event.comment.body }}" == "/vote" ]; then + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Removing the vote label. + if: contains(github.event.comment.body, '/cancel-vote') && ${{steps.verify_member.outputs.isTSCMember}} == true + run: | + if [ "${{ github.event.comment.body }}" == "/cancel-vote" ]; then if [ "${{ github.event_name }}" != "pull_request" ]; then - gh issue edit ${{ github.event.issue.number }} --add-label "vote" + gh issue edit ${{ github.event.issue.number }} --remove-label "vote" else - gh pr edit ${{ github.event.issue.number }} --add-label "vote" + gh pr edit ${{ github.event.issue.number }} --remove-label "vote" fi fi env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GH_TOKEN: ${{ secrets.GH_TOKEN}} \ No newline at end of file diff --git a/.gitvote.yml b/.gitvote.yml index 30bf2ce21..bdc388f2d 100644 --- a/.gitvote.yml +++ b/.gitvote.yml @@ -1,6 +1,6 @@ profiles: default: - duration: 1d + duration: 2m pass_threshold: 51 periodic_status_check: "1 week" allowed_voters: diff --git a/docs/voting.md b/voting.md similarity index 93% rename from docs/voting.md rename to voting.md index 99a744ae9..5fe3721c1 100644 --- a/docs/voting.md +++ b/voting.md @@ -7,7 +7,7 @@ Now we can easily listen the suggestions of the members via **git-vot** bot. ### Voting Rules * The voting will be done by only TSC Members. -* The duration of the voting will be 1 day. +* The duration of the voting will be 2 minutes. * The vote will be passed when more than 50% voting are in favour. ### How to vote on particular issue and pull request. @@ -67,7 +67,7 @@ When unauthorised member tries to execute the /vote command, he or she will get **Getting response for voting** -![image](https://hackmd.io/_uploads/rkjnS0bkA.png) +![Screenshot 2024-04-05 at 3.09.33 PM](https://hackmd.io/_uploads/HybSDBakA.png) From 369ac9a42743c1367316e99f6645a5a7654ea337 Mon Sep 17 00:00:00 2001 From: Zack_Aayush <60972989+AayushSaini101@users.noreply.github.com> Date: Mon, 8 Apr 2024 13:40:45 +0530 Subject: [PATCH 11/21] Update .github/workflows/vote-verifcation.yml Co-authored-by: Lukasz Gornicki --- .github/workflows/vote-verifcation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vote-verifcation.yml b/.github/workflows/vote-verifcation.yml index 0d440fd9b..4fe2933c1 100644 --- a/.github/workflows/vote-verifcation.yml +++ b/.github/workflows/vote-verifcation.yml @@ -23,7 +23,7 @@ jobs: script : | const isTSCMember = ${{ steps.verify_member.outputs.isTSCMember}} if(!isTSCMember) { - const commentText = `User ❌ @${{ github.actor }} is not a [TSC Member](https://www.asyncapi.com/community/tsc). Guidelines to become a [TSC Member](https://github.com/asyncapi/community/blob/master/TSC_MEMBERSHIP.md)`; + const commentText = `User ❌ @${{ github.actor }} is not a [TSC Member](https://www.asyncapi.com/community/tsc). Learn more from guidelines to become a [TSC Member](https://github.com/asyncapi/community/blob/master/TSC_MEMBERSHIP.md)`; console.log(`User ❌ @${{ github.actor }} is not a TSC Member`); github.rest.issues.createComment({ issue_number: context.issue.number, From ea9aeb8ddbf50cc234f30789c6d98e23006f2688 Mon Sep 17 00:00:00 2001 From: Zack_Aayush <60972989+AayushSaini101@users.noreply.github.com> Date: Mon, 8 Apr 2024 13:45:01 +0530 Subject: [PATCH 12/21] Update .github/workflows/vote-verifcation.yml Co-authored-by: Lukasz Gornicki --- .github/workflows/vote-verifcation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vote-verifcation.yml b/.github/workflows/vote-verifcation.yml index 4fe2933c1..d58e6c68b 100644 --- a/.github/workflows/vote-verifcation.yml +++ b/.github/workflows/vote-verifcation.yml @@ -23,7 +23,7 @@ jobs: script : | const isTSCMember = ${{ steps.verify_member.outputs.isTSCMember}} if(!isTSCMember) { - const commentText = `User ❌ @${{ github.actor }} is not a [TSC Member](https://www.asyncapi.com/community/tsc). Learn more from guidelines to become a [TSC Member](https://github.com/asyncapi/community/blob/master/TSC_MEMBERSHIP.md)`; + const commentText = `User ❌ @${{ github.actor }} is not a [TSC Member](https://www.asyncapi.com/community/tsc). Learn more from [guidelines to become a TSC Member](https://github.com/asyncapi/community/blob/master/TSC_MEMBERSHIP.md)`; console.log(`User ❌ @${{ github.actor }} is not a TSC Member`); github.rest.issues.createComment({ issue_number: context.issue.number, From e8443d0bb7a2d8b5e4a78f32675b7d39cca5412d Mon Sep 17 00:00:00 2001 From: Zack_Aayush <60972989+AayushSaini101@users.noreply.github.com> Date: Mon, 8 Apr 2024 13:55:22 +0530 Subject: [PATCH 13/21] Update voting.md Co-authored-by: Lukasz Gornicki --- voting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voting.md b/voting.md index 5fe3721c1..04563c6c8 100644 --- a/voting.md +++ b/voting.md @@ -2,7 +2,7 @@ There are many situation in the open source contribution, when we need to take suggestion of all the organsiation members, whether the particular issue is required or not, or the changes is valid in the specific pull request. -Now we can easily listen the suggestions of the members via **git-vot** bot. +Now we can easily listen the suggestions of the members via [**git-vote**](https://github.com/cncf/gitvote) bot. ### Voting Rules From b1ab7da0b07908148c9dd1fb94bbca35aac5887b Mon Sep 17 00:00:00 2001 From: Zack_Aayush <60972989+AayushSaini101@users.noreply.github.com> Date: Mon, 8 Apr 2024 13:55:42 +0530 Subject: [PATCH 14/21] Update .gitvote.yml Co-authored-by: Lukasz Gornicki --- .gitvote.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitvote.yml b/.gitvote.yml index bdc388f2d..bfe920128 100644 --- a/.gitvote.yml +++ b/.gitvote.yml @@ -1,6 +1,6 @@ profiles: default: - duration: 2m + duration: 4w pass_threshold: 51 periodic_status_check: "1 week" allowed_voters: From ba2a9656891b10c0ed9aa272f20941b285f66b33 Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Mon, 8 Apr 2024 21:54:17 +0530 Subject: [PATCH 15/21] Improve vote-verification.yml --- .github/workflows/vote-verifcation.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/vote-verifcation.yml b/.github/workflows/vote-verifcation.yml index d58e6c68b..6689a28a9 100644 --- a/.github/workflows/vote-verifcation.yml +++ b/.github/workflows/vote-verifcation.yml @@ -34,11 +34,10 @@ jobs: } else if('${{github.actor}}' != 'git-vote[bot]') { console.log(`User ✅ @${{ github.actor }} is a TSC Member`); } - - - name: Adding the vote label. - if: contains(github.event.comment.body, '/vote') && ${{steps.verify_member.outputs.isTSCMember}} == true + - name: Add the label run: | + if [ "${{steps.verify_member.outputs.isTSCMember}}" == "true" ]; then if [ "${{ github.event.comment.body }}" == "/vote" ]; then if [ "${{ github.event_name }}" != "pull_request" ]; then gh issue edit ${{ github.event.issue.number }} --add-label "vote" @@ -46,11 +45,12 @@ jobs: gh pr edit ${{ github.event.issue.number }} --add-label "vote" fi fi + fi env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Removing the vote label. - if: contains(github.event.comment.body, '/cancel-vote') && ${{steps.verify_member.outputs.isTSCMember}} == true + GH_TOKEN: ${{ github.token }} + - name: Remove the label run: | + if [ "${{steps.verify_member.outputs.isTSCMember}}" == "true" ]; then if [ "${{ github.event.comment.body }}" == "/cancel-vote" ]; then if [ "${{ github.event_name }}" != "pull_request" ]; then gh issue edit ${{ github.event.issue.number }} --remove-label "vote" @@ -58,5 +58,6 @@ jobs: gh pr edit ${{ github.event.issue.number }} --remove-label "vote" fi fi + fi env: - GH_TOKEN: ${{ secrets.GH_TOKEN}} \ No newline at end of file + GH_TOKEN: ${{ github.token }} \ No newline at end of file From 3c618ba7cb21144a13dc9bc23d441a9226274e16 Mon Sep 17 00:00:00 2001 From: Zack_Aayush <60972989+AayushSaini101@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:58:18 +0530 Subject: [PATCH 16/21] Update voting.md Co-authored-by: Lukasz Gornicki --- voting.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/voting.md b/voting.md index 04563c6c8..83445ef8c 100644 --- a/voting.md +++ b/voting.md @@ -1,9 +1,8 @@ -## Voting for TSC Members +## Overview -There are many situation in the open source contribution, when we need to take suggestion of all the organsiation members, whether the particular issue is required or not, or the changes is valid in the specific pull request. - -Now we can easily listen the suggestions of the members via [**git-vote**](https://github.com/cncf/gitvote) bot. +In the [search for the right governance model](https://www.asyncapi.com/blog/governance-motivation) we ended up defining Technical Steering Committee (TSC) that can help making decisions that are related to entire AsyncAPI Initiative and not only specific repository. TSC voting is described in official [Charter](https://github.com/asyncapi/community/blob/master/CHARTER.md#4-tsc-voting). +To make voting process easier with proper automation we use [**git-vote**](https://github.com/cncf/gitvote) bot. ### Voting Rules * The voting will be done by only TSC Members. From 7543cccc999877f0ab7c5cab57844def1ef204ae Mon Sep 17 00:00:00 2001 From: Zack_Aayush <60972989+AayushSaini101@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:58:26 +0530 Subject: [PATCH 17/21] Update .gitvote.yml Co-authored-by: Lukasz Gornicki --- .gitvote.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitvote.yml b/.gitvote.yml index bfe920128..c1dffc24b 100644 --- a/.gitvote.yml +++ b/.gitvote.yml @@ -3,6 +3,7 @@ profiles: duration: 4w pass_threshold: 51 periodic_status_check: "1 week" + close_on_passing: true allowed_voters: teams: - tsc_members \ No newline at end of file From 28a66feb6f7392877d4322c99a869d249eadb678 Mon Sep 17 00:00:00 2001 From: Zack_Aayush <60972989+AayushSaini101@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:58:35 +0530 Subject: [PATCH 18/21] Update voting.md Co-authored-by: Lukasz Gornicki --- voting.md | 79 +++++++++++-------------------------------------------- 1 file changed, 15 insertions(+), 64 deletions(-) diff --git a/voting.md b/voting.md index 83445ef8c..d2829847a 100644 --- a/voting.md +++ b/voting.md @@ -9,76 +9,27 @@ To make voting process easier with proper automation we use [**git-vote**](https * The duration of the voting will be 2 minutes. * The vote will be passed when more than 50% voting are in favour. -### How to vote on particular issue and pull request. +### Voting Process -You need to add only one command to start the voting process on the issue on in the particular PR. **Please not only TSC Members can participate in the voting process**. +#### Start Voting -*A **vote label** will be added on the issue after starting of the voting process.* +1. TSC member adds `/vote` comment to an Issue or a Pull Request. +2. Git Vote bot creates a comment with instruction on how the voting should be done. It is based on 👍🏼 , 👎🏼 and 👀 emojis. You can still put comments or suggestions. +3. AsyncAPI bot adds `vote` label so later it is easier for us to extract information about voted topics and participation. -**Command:** +#### Check Status -``` -/vote -``` +1. Anyone can add `/check-vote` comment to an Issue or a Pull Request. +2. Git Vote bot creates a comment with update on how many binding votes were provided and how much is missing to reach the quorum. -**TSC Member starting voting process:** +### Cancel Voting -![image](https://hackmd.io/_uploads/Sk_L-CWyR.png) +1. TSC member adds `/cancel-vote` comment to an Issue or a Pull Request. +2. Git Vote bot creates a comment. +3. AsyncAPI bot removes `vote` label. +### Finish Voting -**Reactions to participate in voting process** -* In favor of the changes. 👍 -* In against of the changes. 👎 -* Abstain from the voting. 👀 +There is no way to complete voting with a comment. It ends either when quorum is reached or duration deadline ends. - -**Example:** - -Member voted in the favor of the required changes - -![image](https://hackmd.io/_uploads/BybuXCZ1C.png) - - -**Result:** - - -![image](https://hackmd.io/_uploads/ByXBNRWJA.png) - - -### Checking status of the vote -If anyone wants to check the status of the vote can easily check by using following command: - -``` -/check-vote -``` -**Status of the vote** - -![image](https://hackmd.io/_uploads/ry3dOLGJ0.png) - -### Invalid vote execution - - -When unauthorised member tries to execute the /vote command, he or she will get a message related to unauthorised. - -**Starting unauthorised voting:** - -![image](https://hackmd.io/_uploads/BywW8AbkR.png) - - -**Getting response for voting** -![Screenshot 2024-04-05 at 3.09.33 PM](https://hackmd.io/_uploads/HybSDBakA.png) - - - -### Cancelling the vote - -TSC members can cancel the voting on the particular issue or PR, The cancelling vote removes the **vote** label from an issue. - -**Command:** -``` -cancel-vote -``` - -**Cancelling vote status:** - -![image](https://hackmd.io/_uploads/rkhgYUzkC.png) +Git Vote bot adds a comment that voting is completed. From 494ac73b4a27d75bd7c27a9b77652868121132ca Mon Sep 17 00:00:00 2001 From: Zack_Aayush <60972989+AayushSaini101@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:58:45 +0530 Subject: [PATCH 19/21] Update voting.md Co-authored-by: Lukasz Gornicki --- voting.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/voting.md b/voting.md index d2829847a..d3b1b97df 100644 --- a/voting.md +++ b/voting.md @@ -3,6 +3,15 @@ In the [search for the right governance model](https://www.asyncapi.com/blog/governance-motivation) we ended up defining Technical Steering Committee (TSC) that can help making decisions that are related to entire AsyncAPI Initiative and not only specific repository. TSC voting is described in official [Charter](https://github.com/asyncapi/community/blob/master/CHARTER.md#4-tsc-voting). To make voting process easier with proper automation we use [**git-vote**](https://github.com/cncf/gitvote) bot. +### Voting Location + +- Voting must take place only in [community](https://github.com/asyncapi/community) repository +- Voting automation works only with GitHub Issues and Pull Requests + +Discussions should be used only for initial discussion, to brainstorm ideas or get some initial support. + +In majority of cases topics we vote on introduce some new rules, some new ways of doing things. This means that in majority of cases the topic we vote on needs proper community documentation. We recommend that you use Pull Requests over Issues to run voting on topic where you provide context and final documentation. + ### Voting Rules * The voting will be done by only TSC Members. From e93b988396ce31ca758d705e557d0c13f17817fe Mon Sep 17 00:00:00 2001 From: Zack_Aayush <60972989+AayushSaini101@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:58:56 +0530 Subject: [PATCH 20/21] Update voting.md Co-authored-by: Lukasz Gornicki --- voting.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/voting.md b/voting.md index d3b1b97df..14c933574 100644 --- a/voting.md +++ b/voting.md @@ -14,9 +14,9 @@ In majority of cases topics we vote on introduce some new rules, some new ways o ### Voting Rules -* The voting will be done by only TSC Members. -* The duration of the voting will be 2 minutes. -* The vote will be passed when more than 50% voting are in favour. +* Only votes from [TSC members](https://www.asyncapi.com/community/tsc) are counted. You are still encouraged to participate in voting, even if your vote is not binding. +* TSC members have no less than 7 calendar days to vote. As community we did not set exact voting deadline and only have a rule that you can translate into: "just be nice and give people at least 7 days to get familiar with the topic so they can vote". Our automation is set for 4 weeks, to take into account all possible limitations related to holidays and other events. +* The vote completes when more than 50% voting are in favour. ### Voting Process From c8596991358a2a80fa42be99855ee67df29b005c Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Tue, 9 Apr 2024 17:04:30 +0530 Subject: [PATCH 21/21] Remove voting --- voting.md | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 voting.md diff --git a/voting.md b/voting.md deleted file mode 100644 index 14c933574..000000000 --- a/voting.md +++ /dev/null @@ -1,44 +0,0 @@ -## Overview - -In the [search for the right governance model](https://www.asyncapi.com/blog/governance-motivation) we ended up defining Technical Steering Committee (TSC) that can help making decisions that are related to entire AsyncAPI Initiative and not only specific repository. TSC voting is described in official [Charter](https://github.com/asyncapi/community/blob/master/CHARTER.md#4-tsc-voting). - -To make voting process easier with proper automation we use [**git-vote**](https://github.com/cncf/gitvote) bot. -### Voting Location - -- Voting must take place only in [community](https://github.com/asyncapi/community) repository -- Voting automation works only with GitHub Issues and Pull Requests - -Discussions should be used only for initial discussion, to brainstorm ideas or get some initial support. - -In majority of cases topics we vote on introduce some new rules, some new ways of doing things. This means that in majority of cases the topic we vote on needs proper community documentation. We recommend that you use Pull Requests over Issues to run voting on topic where you provide context and final documentation. - -### Voting Rules - -* Only votes from [TSC members](https://www.asyncapi.com/community/tsc) are counted. You are still encouraged to participate in voting, even if your vote is not binding. -* TSC members have no less than 7 calendar days to vote. As community we did not set exact voting deadline and only have a rule that you can translate into: "just be nice and give people at least 7 days to get familiar with the topic so they can vote". Our automation is set for 4 weeks, to take into account all possible limitations related to holidays and other events. -* The vote completes when more than 50% voting are in favour. - -### Voting Process - -#### Start Voting - -1. TSC member adds `/vote` comment to an Issue or a Pull Request. -2. Git Vote bot creates a comment with instruction on how the voting should be done. It is based on 👍🏼 , 👎🏼 and 👀 emojis. You can still put comments or suggestions. -3. AsyncAPI bot adds `vote` label so later it is easier for us to extract information about voted topics and participation. - -#### Check Status - -1. Anyone can add `/check-vote` comment to an Issue or a Pull Request. -2. Git Vote bot creates a comment with update on how many binding votes were provided and how much is missing to reach the quorum. - -### Cancel Voting - -1. TSC member adds `/cancel-vote` comment to an Issue or a Pull Request. -2. Git Vote bot creates a comment. -3. AsyncAPI bot removes `vote` label. - -### Finish Voting - -There is no way to complete voting with a comment. It ends either when quorum is reached or duration deadline ends. - -Git Vote bot adds a comment that voting is completed.