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