diff options
Diffstat (limited to 'models/pull.go')
-rw-r--r-- | models/pull.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/models/pull.go b/models/pull.go index 1edd890035..fcfcd221c4 100644 --- a/models/pull.go +++ b/models/pull.go @@ -742,3 +742,8 @@ func (pr *PullRequest) IsHeadEqualWithBranch(branchName string) (bool, error) { } return baseCommit.HasPreviousCommit(headCommit.ID) } + +// IsSameRepo returns true if base repo and head repo is the same +func (pr *PullRequest) IsSameRepo() bool { + return pr.BaseRepoID == pr.HeadRepoID +} |