diff options
Diffstat (limited to 'services/agit/agit.go')
-rw-r--r-- | services/agit/agit.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/agit/agit.go b/services/agit/agit.go index 32fc3cba4a..208ea109f4 100644 --- a/services/agit/agit.go +++ b/services/agit/agit.go @@ -48,7 +48,7 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git. continue } - if !strings.HasPrefix(opts.RefFullNames[i], git.PullRequestPrefix) { + if !opts.RefFullNames[i].IsFor() { results = append(results, private.HookProcReceiveRefResult{ IsNotMatched: true, OriginalRef: opts.RefFullNames[i], @@ -56,7 +56,7 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git. continue } - baseBranchName := opts.RefFullNames[i][len(git.PullRequestPrefix):] + baseBranchName := opts.RefFullNames[i].ForBranchName() curentTopicBranch := "" if !gitRepo.IsBranchExist(baseBranchName) { // try match refs/for/<target-branch>/<topic-branch> |