Vote after new mainterer added #725
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Vote Tracker | |
on: | |
issue_comment: | |
types: [created] | |
workflow_dispatch: | |
inputs: | |
bot_comment_url: | |
description: | | |
Provide URL pointing to gitvote bot comment that contains closing voting update. It looks like `https://github.com/asyncapi/community/issues/1313#issuecomment-2247595858`. We use this to update the voting summary in cases when we see errors in the voting status, when for example TSC member voted, but did a mistake and voted by adding emoji to main description or other bot comment instead of the correct way: which is adding an emoji to a comment from bot that opens the vote. | |
required: true | |
jobs: | |
track-vote: | |
if: ${{ github.actor == 'git-vote[bot]' && contains(github.event.comment.body, 'Vote closed') || github.event_name == 'workflow_dispatch' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Installing Module | |
run: npm install @octokit/rest [email protected] --no-save | |
shell: bash | |
- name: Run GitHub Script | |
id: vote_tracker | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const script = require('./.github/scripts/vote_tracker.js'); | |
const botCommentURL = "${{ github.event.inputs.bot_comment_url || '' }}"; | |
await script({ github, context, botCommentURL }); | |
- name: Configure Git | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: debug | |
run: | | |
git status | |
- name: Commit VotingTracking.json | |
run: | | |
git add TSC_VOTING_OVERVIEW.md voteTrackingFile.json | |
git commit -m "Update vote tracking details" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |