|
|
@ -1091,6 +1091,24 @@ func (err ErrPullRequestAlreadyExists) Error() string { |
|
|
|
err.ID, err.IssueID, err.HeadRepoID, err.BaseRepoID, err.HeadBranch, err.BaseBranch) |
|
|
|
err.ID, err.IssueID, err.HeadRepoID, err.BaseRepoID, err.HeadBranch, err.BaseBranch) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ErrPullRequestHeadRepoMissing represents a "ErrPullRequestHeadRepoMissing" error
|
|
|
|
|
|
|
|
type ErrPullRequestHeadRepoMissing struct { |
|
|
|
|
|
|
|
ID int64 |
|
|
|
|
|
|
|
HeadRepoID int64 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// IsErrErrPullRequestHeadRepoMissing checks if an error is a ErrPullRequestHeadRepoMissing.
|
|
|
|
|
|
|
|
func IsErrErrPullRequestHeadRepoMissing(err error) bool { |
|
|
|
|
|
|
|
_, ok := err.(ErrPullRequestHeadRepoMissing) |
|
|
|
|
|
|
|
return ok |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Error does pretty-printing :D
|
|
|
|
|
|
|
|
func (err ErrPullRequestHeadRepoMissing) Error() string { |
|
|
|
|
|
|
|
return fmt.Sprintf("pull request head repo missing [id: %d, head_repo_id: %d]", |
|
|
|
|
|
|
|
err.ID, err.HeadRepoID) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ErrInvalidMergeStyle represents an error if merging with disabled merge strategy
|
|
|
|
// ErrInvalidMergeStyle represents an error if merging with disabled merge strategy
|
|
|
|
type ErrInvalidMergeStyle struct { |
|
|
|
type ErrInvalidMergeStyle struct { |
|
|
|
ID int64 |
|
|
|
ID int64 |
|
|
|