Skip to content

Commit

Permalink
BugFix: Update type PullRequest GetMergeCommit() to return commit Hash (
Browse files Browse the repository at this point in the history
#9)

* Add hash for merge_commit returned object to struct.

* Update GetMergeCommit() to return commit Hash

* Add PullRequestMergeCommit struct for merge_commit of PullRequest object.

* Add changes after running gen-accessors
  • Loading branch information
blacs30 authored Mar 11, 2020
1 parent 52c1d14 commit 25c9874
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 26 deletions.
18 changes: 13 additions & 5 deletions bitbucket/bitbucket-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 26 additions & 21 deletions bitbucket/pull_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,32 @@ type PullRequests struct {

// PullRequest represents a Bitbucket pull request on a repository.
type PullRequest struct {
Body *PullRequestBody `json:"rendered,omitempty"`
Type *string `json:"type,omitempty"`
Description *string `json:"description,omitempty"`
Links *PullRequestLinks `json:"links,omitempty"`
Title *string `json:"title,omitempty"`
CloseSourceBranch *bool `json:"close_source_branch,omitempty"`
Reviewers []*User `json:"reviewers,omitempty"`
ID *int64 `json:"id,omitempty"`
Destination *PullRequestBranch `json:"destination,omitempty"`
CreatedOn *time.Time `json:"created_on,omitempty"`
Summary *Content `json:"summary,omitempty"`
Source *PullRequestBranch `json:"source,omitempty"`
CommentCount *int64 `json:"comment_count,omitempty"`
State *string `json:"state,omitempty"`
TaskCount *int64 `json:"task_count,omitempty"`
Participants []*Participant `json:"participants,omitempty"`
Reason *string `json:"reason,omitempty"`
UpdatedOn *string `json:"updated_on,omitempty"`
Author *User `json:"author,omitempty"`
MergeCommit *string `json:"merge_commit,omitempty"`
ClosedBy *User `json:"closed_by,omitempty"`
Body *PullRequestBody `json:"rendered,omitempty"`
Type *string `json:"type,omitempty"`
Description *string `json:"description,omitempty"`
Links *PullRequestLinks `json:"links,omitempty"`
Title *string `json:"title,omitempty"`
CloseSourceBranch *bool `json:"close_source_branch,omitempty"`
Reviewers []*User `json:"reviewers,omitempty"`
ID *int64 `json:"id,omitempty"`
Destination *PullRequestBranch `json:"destination,omitempty"`
CreatedOn *time.Time `json:"created_on,omitempty"`
Summary *Content `json:"summary,omitempty"`
Source *PullRequestBranch `json:"source,omitempty"`
CommentCount *int64 `json:"comment_count,omitempty"`
State *string `json:"state,omitempty"`
TaskCount *int64 `json:"task_count,omitempty"`
Participants []*Participant `json:"participants,omitempty"`
Reason *string `json:"reason,omitempty"`
UpdatedOn *string `json:"updated_on,omitempty"`
Author *User `json:"author,omitempty"`
MergeCommit *PullRequestMergeCommit `json:"merge_commit,omitempty"`
ClosedBy *User `json:"closed_by,omitempty"`
}

// PullRequestMergeCommit represents the "merge_commit" object in a Bitbucket pull request.
type PullRequestMergeCommit struct {
Hash *string `json:"hash,omitempty"`
}

// PullRequestLinks represents the "links" object in a Bitbucket pull request.
Expand Down

0 comments on commit 25c9874

Please sign in to comment.