Skip to content

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

Merged
BigSpaceships merged 4 commits into
devfrom
public_shaming
Oct 5, 2026
Merged

BigSpaceships merged 4 commits into
devfrom
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

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.

I guess it's sorta fixed? It's a little odd to do X, do Y, and then check if X errored...

@tallen42 tallen42 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.

ship it. ship it ship it ship it. hollllyyy ship it.

@BigSpaceships
BigSpaceships changed the base branch from main to dev October 5, 2026 03:49
@csh-sonarqube-community

Copy link
Copy Markdown

Failed Quality Gate failed

  • 0.00% Coverage on New Code (is less than 80.00%)

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

View in SonarQube

@BigSpaceships
BigSpaceships merged commit 6406fcd into dev Oct 5, 2026
2 of 3 checks passed
@BigSpaceships
BigSpaceships deleted the public_shaming branch October 5, 2026 03:53
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.

4 participants