summaryrefslogtreecommitdiff
path: root/pkg/common
diff options
context:
space:
mode:
authorjannfis <jann@mistrust.net>2021-04-14 11:11:48 +0200
committerGitHub <noreply@github.com>2021-04-14 11:11:48 +0200
commit93d76f91a8242421edf6300cabf86c9dac1ac028 (patch)
tree47a053e3f3c85eb49f50a9b145dee7dfa8641a2e /pkg/common
parente5ced9d7c1c70c5dd31377d9984e91440b6f65ea (diff)
feat: Allow setting custom Git commit messages (#193)
* feat: Support Git commit message templates Signed-off-by: jannfis <jann@mistrust.net> * More templating Signed-off-by: jannfis <jann@mistrust.net> * Update Signed-off-by: jannfis <jann@mistrust.net> * Make TemplateCommitMessage public Signed-off-by: jannfis <jann@mistrust.net> * Update Signed-off-by: jannfis <jann@mistrust.net> * Update Signed-off-by: jannfis <jann@mistrust.net> * Introduce git.CommitOptions{} Signed-off-by: jannfis <jann@mistrust.net> * Update documentation for commit message templates Signed-off-by: jannfis <jann@mistrust.net> * Add unit tests Signed-off-by: jannfis <jann@mistrust.net> * Update manifests Signed-off-by: jannfis <jann@mistrust.net> * Fix typo in docs Signed-off-by: jannfis <jann@mistrust.net> * Fix linter issues Signed-off-by: jannfis <jann@mistrust.net> * Fix linter issues Signed-off-by: jannfis <jann@mistrust.net>
Diffstat (limited to 'pkg/common')
-rw-r--r--pkg/common/constants.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/common/constants.go b/pkg/common/constants.go
index ba11d47..b42f1a9 100644
--- a/pkg/common/constants.go
+++ b/pkg/common/constants.go
@@ -45,3 +45,11 @@ const (
WriteBackMethodAnnotation = ImageUpdaterAnnotationPrefix + "/write-back-method"
GitBranchAnnotation = ImageUpdaterAnnotationPrefix + "/git-branch"
)
+
+// The default Git commit message's template
+const DefaultGitCommitMessage = `build: automatic update of {{ .AppName }}
+
+{{ range .AppChanges -}}
+updates image {{ .Image }} tag '{{ .OldTag }}' to '{{ .NewTag }}'
+{{ end -}}
+`