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