Skip to content

People don't wanna vote and I don't get why - #120

Open
shaeespring wants to merge 3 commits into
mainfrom
public_shaming
Open

shaeespring wants to merge 3 commits into
mainfrom
public_shaming

Conversation

@shaeespring

Copy link
Copy Markdown
Contributor

What

Outs people in announcements if they don't vote

Why

It's Friday and we still haven't hit quorum on a vote released last Saturday

Test Plan

How do I test slack pinging in announcements? Do we first have to grant the bot privileges to?

Env Vars

No

Documentation

Erm.... no

Checklist

  • Tested all changes locally

@shaeespring

Copy link
Copy Markdown
Contributor Author

It is not a new issue I'm pretty sure - I can fix with more functions but I don't think it's necessary

costowell
costowell previously approved these changes Oct 3, 2026
Comment thread constitutional.go Outdated
_, _, err = slackData.Client.PostMessage(slackData.AnnouncementsChannel,
slack.MsgOptionText("It has been past the default time required to vote on \""+poll.Title+
"\" These people have not completed their responsibility as a Voting Member of House. \n"+
strings.Join(notVotedString, ","), false))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: ", " instead?

Comment thread constitutional.go Outdated
logging.Logger.WithFields(logrus.Fields{"method": "EvaluatePolls dm"}).Error(err)
continue
}
notVotedString = append(notVotedString, "<@"+user.SlackUID+">")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: what if the user doesn't have a slack UID set?

@costowell costowell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

beep boop

Comment thread constitutional.go
Comment on lines +155 to +159
if user.SlackUID != "" {
notVotedString = append(notVotedString, "<@"+user.SlackUID+">")
} else {
notVotedString = append(notVotedString, user.Username)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the SlackUID is empty, I think the the slack message send will error first, and then this won't add the username.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think i fixed this? i don't know if I completely understand what you're asking for

@csh-sonarqube-community

Copy link
Copy Markdown

Failed Quality Gate failed

  • 1 New Issues (is greater than 0)
  • 0.00% Coverage on New Code (is less than 80.00%)

Project ID: ComputerScienceHouse_vote_c5ba863d-30d7-4fa9-97dd-4f2c58f8f5fa

View in SonarQube

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.

2 participants