Re-create the listener when GitHub secret is updated

This commit is contained in:
Nikola Jokic
2025-04-14 10:35:52 +02:00
parent 15990d492d
commit 8a8d279aba
9 changed files with 234 additions and 23 deletions

View File

@@ -49,3 +49,22 @@ func ComputeTemplateHash(template interface{}) string {
return rand.SafeEncodeString(fmt.Sprint(hasher.Sum32()))
}
func ComputeCombinedObjectsHash(first any, others ...any) string {
hasher := fnv.New32a()
hasher.Reset()
printer := spew.ConfigState{
Indent: " ",
SortKeys: true,
DisableMethods: true,
SpewKeys: true,
}
for _, obj := range append([]any{first}, others...) {
printer.Fprintf(hasher, "%#v", obj)
}
return rand.SafeEncodeString(fmt.Sprint(hasher.Sum32()))
}