Skip to content

Commit

Permalink
Removed Username from BitBucket representation
Browse files Browse the repository at this point in the history
Uses UUID in requests instead

Bitbucket made a breaking change, removing the support
for referencing (and returning) usernames directly.

Naiive fix for issue hashicorp#37
  • Loading branch information
slhabity authored and mescam committed Nov 11, 2019
1 parent 6e4126d commit 46922fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bitbucket/resource_default_reviewers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
type Reviewer struct {
DisplayName string `json:"display_name,omitempty"`
UUID string `json:"uuid,omitempty"`
Username string `json:"username,omitempty"`
Type string `json:"type,omitempty"`
}

Expand Down Expand Up @@ -98,7 +97,7 @@ func resourceDefaultReviewersRead(d *schema.ResourceData, m interface{}) error {
}

for _, reviewer := range reviewers.Values {
terraformReviewers = append(terraformReviewers, reviewer.Username)
terraformReviewers = append(terraformReviewers, reviewer.UUID)
}

if reviewers.Next != "" {
Expand Down

0 comments on commit 46922fa

Please sign in to comment.