summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/cherry_pick.go
diff options
context:
space:
mode:
authorGusted <postmaster@gusted.xyz>2024-02-18 19:41:54 +0100
committerGusted <gusted@noreply.codeberg.org>2024-02-27 23:41:58 +0100
commit64a0d61aff6dd55ee61f600add4a06a8e5e16c7d (patch)
treeee2af7bdcabaa87ba978d85009eed26ea4495638 /routers/web/repo/cherry_pick.go
parentMerge pull request 'Disabling Stars should disable the routes too' (#2471) fr... (diff)
downloadforgejo-64a0d61aff6dd55ee61f600add4a06a8e5e16c7d.tar.xz
forgejo-64a0d61aff6dd55ee61f600add4a06a8e5e16c7d.zip
[BUG] Implement commit mail selection for other Git operations
- Implement the commit mail selection feature for the other supported Git operations that can be done trough the web UI. - Adds integration tests (goodluck reviewing this). - Ref: #1788 Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Diffstat (limited to 'routers/web/repo/cherry_pick.go')
-rw-r--r--routers/web/repo/cherry_pick.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/web/repo/cherry_pick.go b/routers/web/repo/cherry_pick.go
index 8de54d569f..63516bb4d9 100644
--- a/routers/web/repo/cherry_pick.go
+++ b/routers/web/repo/cherry_pick.go
@@ -115,11 +115,18 @@ func CherryPickPost(ctx *context.Context) {
message += "\n\n" + form.CommitMessage
}
+ gitIdentity := getGitIdentity(ctx, form.CommitMailID, tplCherryPick, &form)
+ if ctx.Written() {
+ return
+ }
+
opts := &files.ApplyDiffPatchOptions{
LastCommitID: form.LastCommit,
OldBranch: ctx.Repo.BranchName,
NewBranch: branchName,
Message: message,
+ Author: gitIdentity,
+ Committer: gitIdentity,
}
// First lets try the simple plain read-tree -m approach