Use embeding
This commit is contained in:
parent
9b5f7a8148
commit
2979c5fc4c
1 changed files with 2 additions and 6 deletions
|
|
@ -50,11 +50,7 @@ type PullRequest struct {
|
|||
}
|
||||
|
||||
type NotFoundError struct {
|
||||
message string
|
||||
}
|
||||
|
||||
func (e *NotFoundError) Error() string {
|
||||
return e.message
|
||||
error
|
||||
}
|
||||
|
||||
func (pr PullRequest) HeadLabel() string {
|
||||
|
|
@ -376,7 +372,7 @@ func PullRequestForBranch(client *Client, ghRepo Repo, branch string) (*PullRequ
|
|||
}
|
||||
}
|
||||
|
||||
return nil, &NotFoundError{message: fmt.Sprintf("no open pull requests found for branch %q", branch)}
|
||||
return nil, &NotFoundError{fmt.Errorf("no open pull requests found for branch %q", branch)}
|
||||
}
|
||||
|
||||
func CreatePullRequest(client *Client, ghRepo Repo, params map[string]interface{}) (*PullRequest, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue