refactor work handling

This commit is contained in:
Matthew Ryan Dillon 2025-09-23 19:15:55 -04:00
parent 7f09b9fab4
commit 4a65f1304f
8 changed files with 30 additions and 98 deletions

View file

@ -1,12 +1,20 @@
[user]
name = {{ .name | quote }}
{{- if eq .hosttype "work" }}
email = {{ .email_work | quote }}
{{ else }}
email = {{ .email_personal | quote }}
{{- end }}
[git]
private-commits = "description(glob:'private:*') | bookmarks('merge')"
[templates]
{{- if eq .hosttype "work" }}
git_push_bookmark = '"2025_{{ .github_work }}_jj_" ++ change_id.short()'
{{ else }}
git_push_bookmark = '"{{ .github_personal }}_jj_" ++ change_id.short()'
{{- end }}
[colors]
"diff removed token" = { fg = "red", underline = false }
@ -26,9 +34,11 @@ bdiff = ["diff", "-r", "(trunk()..@)::"]
default-command = ["log"]
diff-formatter = ":git"
{{- if eq .hosttype "work" }}
[[--scope]]
--when.repositories = ["~/Klaviyo", "~/.klaviyocli", "~/projects/work"]
--when.repositories = ["~/projects/personal", "~/.local/share/chezmoi"]
[--scope.user]
email = {{ .email_work | quote }}
email = {{ .email_personal | quote }}
[--scope.templates]
git_push_bookmark = '"2025_{{ .github_work }}_jj_" ++ change_id.short()'
git_push_bookmark = '"{{ .github_personal }}_jj_" ++ change_id.short()'
{{- end }}