mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-29 00:02:33 -04:00
Compare commits
2 Commits
9865aa2394
...
bce27d0a31
Author | SHA1 | Date | |
---|---|---|---|
|
bce27d0a31 | ||
|
12f418a7e8 |
@ -4,6 +4,7 @@
|
||||
package pull
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
@ -423,9 +424,11 @@ func checkIfPRContentChanged(ctx context.Context, pr *issues_model.PullRequest,
|
||||
return false, fmt.Errorf("unable to open pipe for to run diff: %w", err)
|
||||
}
|
||||
|
||||
stderr := new(bytes.Buffer)
|
||||
if err := cmd.Run(&git.RunOpts{
|
||||
Dir: prCtx.tmpBasePath,
|
||||
Stdout: stdoutWriter,
|
||||
Stderr: stderr,
|
||||
PipelineFunc: func(ctx context.Context, cancel context.CancelFunc) error {
|
||||
_ = stdoutWriter.Close()
|
||||
defer func() {
|
||||
@ -437,6 +440,7 @@ func checkIfPRContentChanged(ctx context.Context, pr *issues_model.PullRequest,
|
||||
if err == util.ErrNotEmpty {
|
||||
return true, nil
|
||||
}
|
||||
err = git.ConcatenateError(err, stderr.String())
|
||||
|
||||
log.Error("Unable to run diff on %s %s %s in tempRepo for PR[%d]%s/%s...%s/%s: Error: %v",
|
||||
newCommitID, oldCommitID, base,
|
||||
|
@ -94,7 +94,7 @@
|
||||
{{if .Attachments}}
|
||||
{{range .Attachments}}
|
||||
<li>
|
||||
<a target="_blank" rel="nofollow" href="{{.DownloadURL}}">
|
||||
<a target="_blank" rel="nofollow" href="{{.DownloadURL}}" download>
|
||||
<strong>{{svg "octicon-package" 16 "gt-mr-2"}}{{.Name}}</strong>
|
||||
</a>
|
||||
<div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user