diff options
author | Unknwon <u@gogs.io> | 2015-09-02 05:09:12 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-02 05:09:12 -0400 |
commit | 1abfe4e05f2c936ab43c8188003a33213b245a56 (patch) | |
tree | 38cec881f7ce3e1a60d47ced5d68be6563dd853f /models/error.go | |
parent | 37e0cee8770fc4f14857e16eabe83ab7e93a0646 (diff) | |
download | gitea-1abfe4e05f2c936ab43c8188003a33213b245a56.tar.gz gitea-1abfe4e05f2c936ab43c8188003a33213b245a56.zip |
PR: nothing to commit and has pull request check
Diffstat (limited to 'models/error.go')
-rw-r--r-- | models/error.go | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/models/error.go b/models/error.go index 92cc187b43..1986c59026 100644 --- a/models/error.go +++ b/models/error.go @@ -308,18 +308,23 @@ func (err ErrIssueNotExist) Error() string { // |____| |____/|____/____/____|_ /\___ >__ |____/ \___ >____ > |__| // \/ \/ |__| \/ \/ -type ErrPullRepoNotExist struct { - ID int64 - PullID int64 +type ErrPullRequestNotExist struct { + ID int64 + PullID int64 + HeadRepoID int64 + BaseRepoID int64 + HeadBarcnh string + BaseBranch string } -func IsErrPullRepoNotExist(err error) bool { - _, ok := err.(ErrPullRepoNotExist) +func IsErrPullRequestNotExist(err error) bool { + _, ok := err.(ErrPullRequestNotExist) return ok } -func (err ErrPullRepoNotExist) Error() string { - return fmt.Sprintf("pull repo does not exist [id: %d, pull_id: %d]", err.ID, err.PullID) +func (err ErrPullRequestNotExist) Error() string { + return fmt.Sprintf("pull request does not exist [id: %d, pull_id: %d, head_repo_id: %d, base_repo_id: %d, head_branch: %s, base_branch: %s]", + err.ID, err.PullID, err.HeadRepoID, err.BaseRepoID, err.HeadBarcnh, err.BaseBranch) } // _________ __ |