mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-17 15:48:15 +00:00
Fix #29763 Backport #29783 This PR fixes 2 problems with CodeOwner in the pull request. - Don't use the pull request base branch but merge-base as a diff base to detect the code owner. - CodeOwner detection in fork repositories will be disabled because almost all the fork repositories will not change CODEOWNERS files but it should not be used on fork repositories' pull requests. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -260,13 +260,13 @@ func TestPullRequest_IsWorkInProgress(t *testing.T) {
|
||||
pr := unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: 2})
|
||||
pr.LoadIssue(db.DefaultContext)
|
||||
|
||||
assert.False(t, pr.IsWorkInProgress())
|
||||
assert.False(t, pr.IsWorkInProgress(db.DefaultContext))
|
||||
|
||||
pr.Issue.Title = "WIP: " + pr.Issue.Title
|
||||
assert.True(t, pr.IsWorkInProgress())
|
||||
assert.True(t, pr.IsWorkInProgress(db.DefaultContext))
|
||||
|
||||
pr.Issue.Title = "[wip]: " + pr.Issue.Title
|
||||
assert.True(t, pr.IsWorkInProgress())
|
||||
assert.True(t, pr.IsWorkInProgress(db.DefaultContext))
|
||||
}
|
||||
|
||||
func TestPullRequest_GetWorkInProgressPrefixWorkInProgress(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user