mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-05 07:28:31 +00:00
Use new 'nickname' field for bitbucket cloud
Bitbucket is deprecating the username field. See: https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr
This commit is contained in:
@@ -320,12 +320,12 @@ func (e *EventParser) parseCommonBitbucketCloudEventData(event bitbucketcloud.Co
|
||||
URL: *event.PullRequest.Links.HTML.HREF,
|
||||
HeadBranch: *event.PullRequest.Source.Branch.Name,
|
||||
BaseBranch: *event.PullRequest.Destination.Branch.Name,
|
||||
Author: *event.Actor.Username,
|
||||
Author: *event.Actor.Nickname,
|
||||
State: prState,
|
||||
BaseRepo: baseRepo,
|
||||
}
|
||||
user = models.User{
|
||||
Username: *event.Actor.Username,
|
||||
Username: *event.Actor.Nickname,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -235,6 +235,7 @@
|
||||
},
|
||||
"actor": {
|
||||
"username": "lkysow",
|
||||
"nickname": "lkysow",
|
||||
"display_name": "Luke",
|
||||
"account_id": "557058:dc3817de-68b5-45cd-b81c-5c39d2560090",
|
||||
"links": {
|
||||
@@ -289,4 +290,4 @@
|
||||
"is_private": false,
|
||||
"uuid": "{94189367-116b-436a-9f77-2314b97a6067}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,6 +183,7 @@
|
||||
},
|
||||
"actor": {
|
||||
"username": "lkysow",
|
||||
"nickname": "lkysow",
|
||||
"display_name": "Luke",
|
||||
"account_id": "557058:dc3817de-68b5-45cd-b81c-5c39d2560090",
|
||||
"links": {
|
||||
@@ -237,4 +238,4 @@
|
||||
"is_private": false,
|
||||
"uuid": "{94189367-116b-436a-9f77-2314b97a6067}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ type DiffStatFile struct {
|
||||
}
|
||||
|
||||
type Actor struct {
|
||||
Username *string `json:"username,omitempty" validate:"required"`
|
||||
Nickname *string `json:"nickname,omitempty" validate:"required"`
|
||||
}
|
||||
type Repository struct {
|
||||
FullName *string `json:"full_name,omitempty" validate:"required"`
|
||||
|
||||
Reference in New Issue
Block a user