Skip to content

Commit 89f71f6

Browse files
committed
Merge branch 'main' of https://github.com/go-gitea/gitea into refactor-user-service
2 parents 386fc5a + aa4d784 commit 89f71f6

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

models/fixtures/user.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,4 +1368,4 @@
13681368
visibility: 0
13691369
repo_admin_change_team_access: false
13701370
theme: ""
1371-
keep_activity_private: false
1371+
keep_activity_private: false

routers/api/v1/admin/user.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@ func RenameUser(ctx *context.APIContext) {
453453
// schema:
454454
// "$ref": "#/definitions/RenameUserOption"
455455
// responses:
456+
// "204":
457+
// "$ref": "#/responses/empty"
456458
// "403":
457459
// "$ref": "#/responses/forbidden"
458460
// "422":
@@ -484,5 +486,5 @@ func RenameUser(ctx *context.APIContext) {
484486
}
485487

486488
log.Trace("User name changed: %s -> %s", oldName, newName)
487-
ctx.Status(http.StatusOK)
489+
ctx.Status(http.StatusNoContent)
488490
}

services/pull/pull.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package pull
55

66
import (
7+
"bytes"
78
"context"
89
"fmt"
910
"io"
@@ -422,9 +423,11 @@ func checkIfPRContentChanged(ctx context.Context, pr *issues_model.PullRequest,
422423
return false, fmt.Errorf("unable to open pipe for to run diff: %w", err)
423424
}
424425

426+
stderr := new(bytes.Buffer)
425427
if err := cmd.Run(&git.RunOpts{
426428
Dir: prCtx.tmpBasePath,
427429
Stdout: stdoutWriter,
430+
Stderr: stderr,
428431
PipelineFunc: func(ctx context.Context, cancel context.CancelFunc) error {
429432
_ = stdoutWriter.Close()
430433
defer func() {
@@ -436,6 +439,7 @@ func checkIfPRContentChanged(ctx context.Context, pr *issues_model.PullRequest,
436439
if err == util.ErrNotEmpty {
437440
return true, nil
438441
}
442+
err = git.ConcatenateError(err, stderr.String())
439443

440444
log.Error("Unable to run diff on %s %s %s in tempRepo for PR[%d]%s/%s...%s/%s: Error: %v",
441445
newCommitID, oldCommitID, base,

0 commit comments

Comments
 (0)