-
-
Notifications
You must be signed in to change notification settings - Fork 109
45 lines (38 loc) · 1.99 KB
/
vote-tracker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 [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: Create Pull Request to update Vote Tracking Details
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # uses 5.0.2 https://github.com/peter-evans/create-pull-request/releases/tag/v5.0.2
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'chore: update vote tracking details'
committer: asyncapi-bot <[email protected]>
author: asyncapi-bot <[email protected]>
title: 'chore: vote tracking details'
body: 'Update the TSC_VOTING_OVERVIEW.md and voteTrackingFile.json'
branch: vote-trackingupdate/${{ github.job }}