mirror of
https://github.com/harness/drone.git
synced 2025-05-09 18:30:51 +08:00
[fix] PR diff files api returns empty body (#285)
This commit is contained in:
parent
83c24913d3
commit
43bd045e47
@ -32,8 +32,8 @@ func (c *Controller) RawDiff(
|
||||
return fmt.Errorf("failed to get pull request by number: %w", err)
|
||||
}
|
||||
|
||||
headRef := pr.TargetBranch
|
||||
baseRef := pr.SourceBranch
|
||||
headRef := pr.SourceBranch
|
||||
baseRef := pr.TargetBranch
|
||||
if pr.State == enum.PullReqStateMerged {
|
||||
if pr.MergeBaseSHA != nil {
|
||||
baseRef = *pr.MergeBaseSHA
|
||||
|
Loading…
Reference in New Issue
Block a user