Skip to content

Commit d0849dc

Browse files
committed
Merge conflict fixes.
1 parent 1aef786 commit d0849dc

File tree

5 files changed

+3
-22
lines changed

5 files changed

+3
-22
lines changed

modules/gitrepo/blame.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ import (
1010
)
1111

1212
func LineBlame(ctx context.Context, repo Repository, revision, file string, line uint) (string, error) {
13-
<<<<<<< HEAD
14-
return runCmdString(ctx, repo,
15-
=======
1613
return RunCmdString(ctx, repo,
17-
>>>>>>> main
1814
gitcmd.NewCommand("blame").
1915
AddOptionFormat("-L %d,%d", line, line).
2016
AddOptionValues("-p", revision).

modules/gitrepo/command.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ import (
99
"code.gitea.io/gitea/modules/git/gitcmd"
1010
)
1111

12-
<<<<<<< HEAD
13-
func runCmdString(ctx context.Context, repo Repository, cmd *gitcmd.Command) (string, error) {
14-
res, _, err := cmd.RunStdString(ctx, &gitcmd.RunOpts{Dir: repoPath(repo)})
15-
return res, err
16-
}
17-
=======
1812
func RunCmd(ctx context.Context, repo Repository, cmd *gitcmd.Command) error {
1913
return cmd.WithDir(repoPath(repo)).WithParentCallerInfo().Run(ctx)
2014
}
@@ -27,4 +21,3 @@ func RunCmdString(ctx context.Context, repo Repository, cmd *gitcmd.Command) (st
2721
func RunCmdBytes(ctx context.Context, repo Repository, cmd *gitcmd.Command) ([]byte, []byte, error) {
2822
return cmd.WithDir(repoPath(repo)).WithParentCallerInfo().RunStdBytes(ctx)
2923
}
30-
>>>>>>> main

modules/gitrepo/compare.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ type DivergeObject struct {
2222
func GetDivergingCommits(ctx context.Context, repo Repository, baseBranch, targetBranch string) (*DivergeObject, error) {
2323
cmd := gitcmd.NewCommand("rev-list", "--count", "--left-right").
2424
AddDynamicArguments(baseBranch + "..." + targetBranch).AddArguments("--")
25-
<<<<<<< HEAD
26-
stdout, _, err1 := cmd.RunStdString(ctx, &gitcmd.RunOpts{Dir: repoPath(repo)})
27-
=======
2825
stdout, err1 := RunCmdString(ctx, repo, cmd)
29-
>>>>>>> main
3026
if err1 != nil {
3127
return nil, err1
3228
}

modules/gitrepo/diff.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ func GetDiffShortStatByCmdArgs(ctx context.Context, repo Repository, trustedArgs
2020
// we get:
2121
// " 9902 files changed, 2034198 insertions(+), 298800 deletions(-)\n"
2222
cmd := gitcmd.NewCommand("diff", "--shortstat").AddArguments(trustedArgs...).AddDynamicArguments(dynamicArgs...)
23-
<<<<<<< HEAD
24-
stdout, err := runCmdString(ctx, repo, cmd)
25-
=======
2623
stdout, err := RunCmdString(ctx, repo, cmd)
27-
>>>>>>> main
2824
if err != nil {
2925
return 0, 0, 0, err
3026
}

routers/api/v1/repo/actions_run.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func CancelWorkflowRun(ctx *context.APIContext) {
245245
return
246246
}
247247

248-
actions_service.CreateCommitStatus(ctx, jobs...)
248+
actions_service.CreateCommitStatusForRunJobs(ctx, jobs[0].Run, jobs...)
249249

250250
for _, job := range updatedJobs {
251251
_ = job.LoadAttributes(ctx)
@@ -342,7 +342,7 @@ func ApproveWorkflowRun(ctx *context.APIContext) {
342342
return
343343
}
344344

345-
actions_service.CreateCommitStatus(ctx, jobs...)
345+
actions_service.CreateCommitStatusForRunJobs(ctx, jobs[0].Run, jobs...)
346346

347347
if len(updatedJobs) > 0 {
348348
job := updatedJobs[0]
@@ -550,7 +550,7 @@ func rerunJob(ctx *context.APIContext, job *actions_model.ActionRunJob, shouldBl
550550
return err
551551
}
552552

553-
actions_service.CreateCommitStatus(ctx, job)
553+
actions_service.CreateCommitStatusForRunJobs(ctx, job.Run, job)
554554
actions_service.NotifyWorkflowRunStatusUpdateWithReload(ctx, job)
555555
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
556556

0 commit comments

Comments
 (0)