| Summary: | [webhook] Prioritize Github user name instead of email | ||
|---|---|---|---|
| Product: | Community | Reporter: | Denis Roy <denis.roy> |
| Component: | GitHub | Assignee: | Eclipse Webmaster <webmaster> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | joakim.erdfelt |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: | https://github.com/eclipse/eclipse-webhook/pull/19 | ||
| Whiteboard: | |||
|
Description
Denis Roy
https://github.com/eclipse/xtext/pull/264 is an example of two committers who effectively fail the validation. The Commits of a pull request look like this:
[
{
"sha": "4a9319c677015ddb5f2c60af2f9300e84623d22c",
"commit": {
"author": {
"name": "Sebastian Zarnekow",
"email": "(email)"
},
"committer": {
"name": "Sebastian Zarnekow",
"email": "(email)"
},
"message": "[466330] Provide straight f...\n\nSigned-off-by: szarnekow <Some.Email@email.com>
"author": {
"login": "szarnekow",
"id": 375492,
},
"committer": {
"login": "szarnekow",
"id": 375492,
},
}
]
So the "commit" section contains the pure-git info on the committer and author, as well as the commit message. The author and committer potion contain GitHub-specific info.
I will enhance the isCommitterOfRepo() check to accept an email address or a GitHub login name.
GitHub Pull Request 19 created by [eclipsewebmaster] https://github.com/eclipse/eclipse-webhook/pull/19 GitHub Pull Request 19 created by [eclipsewebmaster] https://github.com/eclipse/eclipse-webhook/pull/19 GitHub Pull Request 19 created by [eclipsewebmaster] https://github.com/eclipse/eclipse-webhook/pull/19 > I will enhance the isCommitterOfRepo() check to accept an email address or a
> GitHub login name.
I decided against that.
I've merged this in.
Something isn't working with this fix. Example: https://github.com/eclipse/jetty.project/pull/54 The user used their @gmail.com address in the PR, but the webhook is somehow getting a different email address for this github user. The users @gmail address is valid, per CLA lookup tool at https://projects.eclipse.org/user/cla/validate (In reply to Joakim Erdfelt from comment #7) > Something isn't working with this fix. > > Example: https://github.com/eclipse/jetty.project/pull/54 > > The user used their @gmail.com address in the PR, but the webhook is somehow > getting a different email address for this github user. This bug is about looking up the GitHUB ID (jentfoo in this case). I can't find any Eclipse account that has a GitHUB ID of jentfoo. So we're extracting the email address from the GitHub account, which does not match their Eclipse account. Anyone can write anything in the Commit message, whereas the GitHub credentials have at least been verified. In this case, they can log into https://dev.eclipse.org/site_login/ and configure their account to link to their GitHUB ID. There would then be no confusion. |