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: add workflow for automated vote notification #1337

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Shurtu-gal
Copy link
Contributor

Description

  • Checks current votes and sends weekly notification to pending members.

Related issue(s)
Closes #1163

@Shurtu-gal
Copy link
Contributor Author

/u

@Shurtu-gal Shurtu-gal self-assigned this Aug 15, 2024
@Shurtu-gal
Copy link
Contributor Author

Sample message:
image

@Shurtu-gal Shurtu-gal marked this pull request as ready for review August 15, 2024 06:58
@Shurtu-gal
Copy link
Contributor Author

/ptal

@asyncapi-bot
Copy link
Contributor

@derberg @thulieblack Please take a look at this PR. Thanks! 👋

for (const member of leftToVote) {
console.log(`Notifying ${member.name} about issue #${issue.number}`);

const message = `👋 Hi ${member.name},\nYour vote is required on the following issue: *#${issue.number}*.\n*Issue Details*: <${issue.html_url}|View and cast your vote here>\nYour input is crucial to our decision-making process. Please take a moment to review the issue and share your thoughts.\nThank you for your contribution! 🙏`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const message = `👋 Hi ${member.name},\nYour vote is required on the following issue: *#${issue.number}*.\n*Issue Details*: <${issue.html_url}|View and cast your vote here>\nYour input is crucial to our decision-making process. Please take a moment to review the issue and share your thoughts.\nThank you for your contribution! 🙏`;
const message = `👋 Hi ${member.name},\nWe need your vote on the following topic: *${issue.title}*.\n*Issue Details*: ${issue.html_url}\nYour input is crucial to our decision-making process. Please take a moment to review the voting topic and share your thoughts.\nThank you for your contribution! 🙏`;

small suggestion above:

  • it is not always issue
  • issue.title I invented this one, not sure if property like this is there, so yeah please just make sure we provide the title of issue/pr
  • I tried to suggest a change to show the link without alt

id: list
with:
script: |
const { data: issues } = await github.rest.issues.listForRepo({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it list PRs as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so does gitvote allow PR voting as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Facing a problem with PRs though, getting filtered results by vote-open label is not possible. Should I go ahead with manually filtering the whole list of PRs.

- name: Fetch Current State
id: fetch
run: |
cd .vote_state
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where it comes from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text: message,
}, {
headers: {
'Authorization': `Bearer ${{ secrets.SLACK_TOKEN }}`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use existing one, no need to do anything here, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, regarding this I don't know which secret has access to post messages. Need chat:write to be specific. For more info:
https://api.slack.com/methods/chat.postMessage

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shurtu-gal left few comments, thanks a lot!

I think it is ok to make first version based on slack, and in the meantime we need to discuss with TSC if they feel fine sharing emails openly in maintainers.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Create a new notification workflow that notifies the TSC Members to particpate in voting process
3 participants