Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PRStateFromString ¶
PRStateFromString converts a string state to the Bitbucket API state format
Types ¶
type Comment ¶
type Comment struct {
ID int `json:"id"`
CreatedOn string `json:"created_on"`
UpdatedOn string `json:"updated_on"`
Content struct {
Raw string `json:"raw"`
Markup string `json:"markup"`
HTML string `json:"html"`
} `json:"content"`
User User `json:"user"`
Inline *struct {
Path string `json:"path"`
From *int `json:"from"`
To *int `json:"to"`
} `json:"inline,omitempty"`
Parent *struct {
ID int `json:"id"`
} `json:"parent,omitempty"`
Deleted bool `json:"deleted"`
Links Links `json:"links"`
}
Comment represents a Bitbucket pull request comment
type CommentList ¶
type CommentList struct {
Size int `json:"size"`
Page int `json:"page"`
PageLen int `json:"pagelen"`
Next string `json:"next"`
Previous string `json:"previous"`
Values []Comment `json:"values"`
}
CommentList represents a paginated list of comments
type PullRequest ¶
type PullRequest struct {
ID int `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
State string `json:"state"` // OPEN, MERGED, DECLINED, SUPERSEDED
Author User `json:"author"`
Source Branch `json:"source"`
Destination Branch `json:"destination"`
CreatedOn string `json:"created_on"`
UpdatedOn string `json:"updated_on"`
CloseSource bool `json:"close_source_branch"`
Links Links `json:"links"`
Reviewers []User `json:"reviewers"`
MergeCommit *struct {
Hash string `json:"hash"`
} `json:"merge_commit,omitempty"`
CommentCount int `json:"comment_count"`
TaskCount int `json:"task_count"`
}
PullRequest represents a Bitbucket pull request
func (*PullRequest) BaseBranch ¶
func (pr *PullRequest) BaseBranch() string
BaseBranch returns the destination branch name
func (*PullRequest) HTMLURL ¶
func (pr *PullRequest) HTMLURL() string
HTMLURL returns the web URL for the PR
func (*PullRequest) HeadBranch ¶
func (pr *PullRequest) HeadBranch() string
HeadBranch returns the source branch name
func (*PullRequest) StateDisplay ¶
func (pr *PullRequest) StateDisplay() string
StateDisplay returns a human-readable state
type PullRequestList ¶
type PullRequestList struct {
Size int `json:"size"`
Page int `json:"page"`
PageLen int `json:"pagelen"`
Next string `json:"next"`
Previous string `json:"previous"`
Values []PullRequest `json:"values"`
}
PullRequestList represents a paginated list of pull requests
Click to show internal directories.
Click to hide internal directories.