-
Notifications
You must be signed in to change notification settings - Fork 21
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
GitHub handles should not be case sensitive in voters.yaml for eligibility #84
Comments
The GitHub API is case insensitive.
|
I've been doing some work on this, and it is WIP. Unfortunately, comparing the IDs with the list happens in every individual model and template where it's needed; there's no utility comparison function. So I'm having to go through every function where we make use of the ID (most of them) and check them individually. This is gonna take a while to fix. |
If someone wants to take this on, here's what's required:
|
The way we've handled this in the Kubernetes GitHub tooling is using a function that whenever we pull a github username from a data source (when we make an API call, or when we read in data from a YAML source file) we normalize it by stripping the leading "@" if it exists, and forcing it to lower case internally: That way you're always comparing a lowercase username string no matter where the data comes from. |
I can start working on this - I may stumble a bit on part 3, but I'll raise any knowledge gaps I think I have on the PR. |
Heh, we just ran into this again with this year's Kubernetes steering election, can someone review #99 ? |
In the Knative SC 2022 election, we just ran into a case where in voters.yaml, the user "pierdipi" in voters.yaml showed up as ineligible to vote. After updating voters.yaml to use "pierDipi", the user became eligible to vote. I don't think that GH handles should be treated as case sensitive in Elekto unless this is a limitation into how the GH Auth handles logins?
The text was updated successfully, but these errors were encountered: