common patch submit function

This commit is contained in:
Jeff Carr 2025-08-21 14:28:23 -05:00
parent e928cee038
commit 43c6af4a8b
1 changed files with 7 additions and 6 deletions

View File

@ -27,11 +27,7 @@ func doCommit() {
okExit("") okExit("")
} }
if newpatches { if newpatches {
// if there are enw patches, autocommit them patchSubmitAndExit()
_, err := me.forge.SubmitDevelPatchSet("forge auto commit")
if err != nil {
badExit(err)
}
} }
okExit("") okExit("")
} }
@ -74,6 +70,10 @@ func doCommit() {
badExit(err) badExit(err)
} }
patchSubmitAndExit()
}
func patchSubmitAndExit() {
_, err := me.forge.SubmitDevelPatchSet("forge auto commit") _, err := me.forge.SubmitDevelPatchSet("forge auto commit")
if err != nil { if err != nil {
// TRY different URL // TRY different URL
@ -85,7 +85,8 @@ func doCommit() {
if err != nil { if err != nil {
badExit(err) badExit(err)
} }
log.Info("git commit ok. forge done")
okExit("git commit ok. forge done")
} }
func doCommitRepo(repo *gitpb.Repo) error { func doCommitRepo(repo *gitpb.Repo) error {