Skip to content

Commit

Permalink
feat: Add branches for single, multiple, and non-existent repo sources
Browse files Browse the repository at this point in the history
Signed-off-by: KangManJoo <[email protected]>
  • Loading branch information
eogns47 committed Oct 3, 2024
1 parent 8a3d253 commit 0cd122c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
11 changes: 10 additions & 1 deletion notifications_catalog/templates/app-deployed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@ teams:
},
{
"name": "Repository",
"value": "{{range .app.spec.sources}}{{.repoURL}} {{end}}"
"value":
{{- if .app.spec.source }}
"{{ .app.spec.source.repoURL }}"
{{- else if .app.spec.sources }}
{{- range .app.spec.sources }}
"{{ .repoURL }}"
{{- end }}
{{- else }}
"no repoURL"
{{- end }}
},
{
"name": "Revision",
Expand Down
11 changes: 10 additions & 1 deletion notifications_catalog/templates/app-health-degraded.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,16 @@ teams:
},
{
"name": "Repository",
"value": "{{range .app.spec.sources}}{{.repoURL}} {{end}}"
"value":
{{- if .app.spec.source }}
"{{ .app.spec.source.repoURL }}"
{{- else if .app.spec.sources }}
{{- range .app.spec.sources }}
"{{ .repoURL }}"
{{- end }}
{{- else }}
"no repoURL"
{{- end }}
}
{{range $index, $c := .app.status.conditions}}
,
Expand Down
11 changes: 10 additions & 1 deletion notifications_catalog/templates/app-sync-failed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@ teams:
},
{
"name": "Repository",
"value": "{{range .app.spec.sources}}{{.repoURL}} {{end}}"
"value":
{{- if .app.spec.source }}
"{{ .app.spec.source.repoURL }}"
{{- else if .app.spec.sources }}
{{- range .app.spec.sources }}
"{{ .repoURL }}"
{{- end }}
{{- else }}
"no repoURL"
{{- end }}
}
{{range $index, $c := .app.status.conditions}}
,
Expand Down
11 changes: 10 additions & 1 deletion notifications_catalog/templates/app-sync-running.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,16 @@ teams:
},
{
"name": "Repository",
"value": "{{range .app.spec.sources}}{{.repoURL}} {{end}}"
"value":
{{- if .app.spec.source }}
"{{ .app.spec.source.repoURL }}"
{{- else if .app.spec.sources }}
{{- range .app.spec.sources }}
"{{ .repoURL }}"
{{- end }}
{{- else }}
"no repoURL"
{{- end }}
}
{{range $index, $c := .app.status.conditions}}
,
Expand Down

0 comments on commit 0cd122c

Please sign in to comment.