diff options
author | zeripath <art27@cantab.net> | 2019-12-13 22:21:06 +0000 |
---|---|---|
committer | Antoine GIRARD <sapk@users.noreply.github.com> | 2019-12-13 23:21:06 +0100 |
commit | 74179d1b5e739b3fa0d0915bb35d6b7596fd13af (patch) | |
tree | fd8eb776c254b716a4e2d416bb6903f1c4c90ea7 /services/pull/check.go | |
parent | 8f16a2c37b4f2650f5e9623a92eb368db9564c6f (diff) | |
download | gitea-74179d1b5e739b3fa0d0915bb35d6b7596fd13af.tar.gz gitea-74179d1b5e739b3fa0d0915bb35d6b7596fd13af.zip |
Remove SavePatch and generate patches on the fly (#9302)
* Save patches to temporary files
* Remove SavePatch and generate patches on the fly
* Use ioutil.TempDir
* fixup! Use ioutil.TempDir
* fixup! fixup! Use ioutil.TempDir
* RemoveAll LocalCopyPath() in initIntergrationTest
* Default to status checking on PR creation
* Remove unnecessary set to StatusChecking
* Protect against unable to load repo
* Handle conflicts
* Restore original conflict setting
* In TestPullRequests update status to StatusChecking before running TestPatch
Diffstat (limited to 'services/pull/check.go')
-rw-r--r-- | services/pull/check.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/services/pull/check.go b/services/pull/check.go index 0fd3e2a76f..fc2ac927b8 100644 --- a/services/pull/check.go +++ b/services/pull/check.go @@ -170,7 +170,7 @@ func TestPullRequests() { if manuallyMerged(pr) { continue } - if err := pr.TestPatch(); err != nil { + if err := TestPatch(pr); err != nil { log.Error("testPatch: %v", err) continue } @@ -194,7 +194,13 @@ func TestPullRequests() { continue } else if manuallyMerged(pr) { continue - } else if err = pr.TestPatch(); err != nil { + } + pr.Status = models.PullRequestStatusChecking + if err := pr.Update(); err != nil { + log.Error("testPatch[%d]: Unable to update status to Checking Status %v", pr.ID, err) + continue + } + if err = TestPatch(pr); err != nil { log.Error("testPatch[%d]: %v", pr.ID, err) continue } |