-
Notifications
You must be signed in to change notification settings - Fork 19
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
Max assignments #9
Max assignments #9
Conversation
@Keyrxng & @gentlementlegen Not sure which Issue to open this PR against. Should I open it against this command-start-stop repo. The changes that I made are very few |
@jordan-ae Please rebase, I just merged #1 in. |
Thanks @gentlementlegen all good now |
I will review this today @jordan-ae |
It would be nice to have related unit tests regarding the configuration settings. Also, the max value should be configurable based on the user's association level (collaborator, contributor, member etc.). |
+1 to the above comments. I'd also keep in mind that custom roles can be defined within an org so it should be able to cover those too |
Hummm interesting do we have like standard user roles that Ubiquity uses, or we do I have to account for all the possible custom roles that can possibly be |
Ubiquity tends to use the pre-defined roles.
Yeah just I'd just pass in an iterable type and parse whatever it defines, you don't need to know the roles/limits as you write the code if the config does the heavy lifting It's best to add defaults into |
Unused files (2)
Unused dependencies (2)
Unused exports (1)
Unused types (1)
|
@gentlementlegen re: #9 (comment) Are we sticking with Knip in CI when it's error prone like this? I know rndquu has mentioned it before also If we are then are we just manually ignoring the erroneous problem files? |
@jordan-ae one thing I had trouble with building plugins at first is the mental model. While Ubiquity is currently the primary user of the bot and it's plugins, we are not the intended demographic for either. Plugins are built with the "Partner" and their needs in mind which is why configurability needs to be handled in such a way that it's either real easy (on/off or a specific value(s)) or we handle it elegantly under-the-hood. 0x4007 plans to have complete configurability right down to the |
I think the only valid file to ignore is the entry point. I actually solve that by mentioning the entry point within the |
I've been dreading sending in these changes because I'm unsure if what I've done makes sense. Essentially, I've modified the |
Thanks @Keyrxng this helped a lot |
It does make sense yeah you have the right approach now. The code is starting to look acceptable, it would be good to see some QA of the changes in action but if not definitely some unit tests covering the added configurables QA might be difficult here without an enterprise trial for custom roles. Also I have an alt GH account I use for this sort of live QA because if your the only member of your test org it's hard to test various roles etc |
@jordan-ae You should enable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me, here is my QA: Meniole#20
Yaaayyyyy 🎉 |
README.md
Outdated
@@ -38,7 +38,10 @@ To configure your Ubiquibot to run this plugin, add the following to the `.ubiqu | |||
with: | |||
reviewDelayTolerance: "3 Days" | |||
taskStaleTimeoutDuration: "30 Days" | |||
maxConcurrentTasks: 3 | |||
maxConcurrentTasks: # Default concurrent task limits per role. | |||
admin: 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like admins shouldn't have limits but to be honest I feel this feature has no teeth because we can just use the GitHub UI.
It would be more interesting if it unassigns when collaborators self assign and they hit the limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0x4007 we can change UI assignments to follow the same logic as /start
so user would get unassigned if they are doing too many tasks, even when forcing it through the UI.
According to the original conversation on the issue, admins should not have limits. Please remove from the default. |
@0x4007 i tried using infinity for admins in the yaml config. But it didn't seem to be too reliable. And to the best of my knowledge that's the easiest way to define unlimited task to admins. Other than that I think it will just make sense and be much easier to give admins a larger task limit. Like 100 maybe? To represent infinity |
Just delete the admin related config. Remove any logic related to admins. It makes no sense to limit admins, that's the purpose of an admin |
Okay got it I've set admin to Infinity by default. So admins will no longer have any limits |
@@ -16,7 +16,7 @@ export const startStopSchema = T.Object( | |||
reviewDelayTolerance: T.String({ default: "1 Day" }), | |||
taskStaleTimeoutDuration: T.String({ default: "30 Days" }), | |||
startRequiresWallet: T.Boolean({ default: true }), | |||
maxConcurrentTasks: T.Record(T.String(), T.Integer(), { default: { admin: 20, member: 10, contributor: 2 } }), | |||
maxConcurrentTasks: T.Record(T.String(), T.Integer(), { default: { admin: Infinity, member: 10, contributor: 2 } }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you totally remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming that Infinity works
Resolves #8
This functionality prevents new or less experienced contributors from overcommitting and blocking progress by self-assigning too many tasks. If the user is a core team member there's no max task limit.
QA: ubq-test-jordan