This commit is contained in:
2024-07-10 11:41:34 +02:00
parent 262cc0ff91
commit fe58462b59
2 changed files with 19 additions and 8 deletions

View File

@@ -12,7 +12,6 @@ const (
GitAuthor = "GiteaBot - AutoStaging"
PrReview = "pr-review"
)
func processPullRequestOpened(h *common.RequestHandler) error {
@@ -45,7 +44,15 @@ PullRequest: %s#%d`, req.Repository.Name, GitAuthor, req.Repository.Name, req.Pu
h.GitExec(common.DefaultGitPrj, "commit", "-a", "-m", commitMsg)
h.GitExec(common.DefaultGitPrj, "push", "-f", "origin", branchName)
PR := h.CreatePullRequest(prjGit, branchName, prjGit.DefaultBranch)
PR := h.CreatePullRequest(prjGit, branchName, prjGit.DefaultBranch,
fmt.Sprintf("Forwarded PR: %s", req.Repository.Name),
fmt.Sprintf(`This is a forwarded pull request by %s
referencing the following pull request:
PullRequest: %s#%d
`, GitAuthor, req.Repository.Name, req.Pull_Request.Number),
)
if h.HasError() {
return h.Error
}