-
Notifications
You must be signed in to change notification settings - Fork 237
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
Update Bitbucket PR author login #326
Conversation
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.
We have an ID
field that is meant to hold the unique identifier. Let's use this instead for the author account id.
User struct {
ID string
Login string
Name string
Email string
Avatar string
Created time.Time
Updated time.Time
}
Author: scm.User{
+ ID: from.Author.AccountID,
Login: from.Author.Nickname,
Name: from.Author.DisplayName,
Avatar: from.Author.Links.Avatar.Href,
},
EDIT as an aside, the Login
is currently being set to the Nickname. The Login
field should only be set to the username, and if no username is available, it should be empty. We should probably revert this because it will result in a bug for anyone that uses it.
Author: scm.User{
- Login: from.Author.Nickname,
Name: from.Author.DisplayName,
Avatar: from.Author.Links.Avatar.Href,
},
Done. |
Currently Bitbucket PR author login field uses user's nickname which is not unique. I suggest to use accountID or UUID instead as explained here:
https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/