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

Create an admin task when votes are 2 weeks old #2226

Open
ChrisLovering opened this issue Jul 17, 2022 · 3 comments · May be fixed by #2553
Open

Create an admin task when votes are 2 weeks old #2226

ChrisLovering opened this issue Jul 17, 2022 · 3 comments · May be fixed by #2553
Assignees
Labels
a: recruitment Related to recruitment: (talentpool) s: planning Discussing details t: enhancement Changes or improvements to existing features

Comments

@ChrisLovering
Copy link
Member

ChrisLovering commented Jul 17, 2022

Description

We want a way to notify admins when helper votes are 2 weeks old, so that they can step in and get it over the line.

This should be done via a call to GitHub issues API to create an issue. The github org name, repo name, and the auth token should be constants to allow the values to be different in dev & prod.

Suggested implementation

Have a discord.py task that runs daily to check if there are any votes that meet the stale threshold, if so create the issue and add an emoji to that vote.

The emoji will allow us to make sure we don't create duplicate issues for the same vote.

Messages with a 🎫 reaction should also be ignored, as that means they have already passed and are awaiting actioning.

@ChrisLovering ChrisLovering added s: planning Discussing details t: enhancement Changes or improvements to existing features a: recruitment Related to recruitment: (talentpool) labels Jul 17, 2022
@shtlrs
Copy link
Member

shtlrs commented Nov 11, 2022

I can take this one up if approved!

I think the idea
@ChrisLovering proposed is simple and enough.

IIRC the api doesn't allow filtering on the creation date, but we could fetch the active ones and treat them in memory.

The rest should be quite simple.

Idk if we already interact with the Github API or not, and whether this should be in Python Bot or in Bot-core, meaning idk if the Github interaction is something we want ( if we don't already have it) as a core feature

However, what I'm wondering about is the visibility.of this issue as I don't think we want to have a public issue that says X has been nominated, right?

@ChrisLovering
Copy link
Member Author

You can use https://github.com/python-discord/bot/blob/main/bot/exts/recruitment/talentpool/_api.py#L34 to get a lsit of active nominations (if you set active=True) then you can look to see which are stale and then archive the votes.

We don't have generic helpers for interacting with the GitHub API as far as I know. We've got a few cogs that interact with GitHub though.

@shtlrs
Copy link
Member

shtlrs commented Nov 11, 2022

Yes that's the endpoint I was referring to.

And that's also what I meant by there isn't a way to get active nominations based on a certain date and thus, we treat them in memory.

Do you have an example in mind of these cogs? Otherwise I can look them up myself.

For the emoji, is the one you mentioned up for discussion? ( just curious to see if there's one that might fit better)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: recruitment Related to recruitment: (talentpool) s: planning Discussing details t: enhancement Changes or improvements to existing features
Projects
No open projects
Status: In Progress - Issues
2 participants