mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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 | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user