title: | {{- if and .run.workflow_id (eq .action "success") }} ✅ Workflow {{ .run.workflow_id }} success in {{ .run.repository.name }} {{- else if and .run.workflow_id (eq .action "failure") }} ❌ Workflow {{ .run.workflow_id }} failed in {{ .run.repository.name }} {{- else if and .run.workflow_id (eq .action "recover") }} â„šī¸ Workflow {{ .run.workflow_id }} recovered in {{ .run.repository.name }} {{- else if and .run.repository (eq .action "started")}} 👀 {{ .sender.login }} started watching {{ .run.repository.name }} {{- else if and .comment (eq .action "created") }} đŸ’Ŧ New comment on issue #{{ .issue.number }} {{ .issue.title }} {{- else if .pull_request }} 🔀 Pull request {{ .action }}: #{{ .pull_request.number }} {{ .pull_request.title }} {{- else if .issue }} 🐛 Issue {{ .action }}: #{{ .issue.number }} {{ .issue.title }} {{- else }} {{ fail "Unsupported Forgejo event type or action." }} {{- end }} message: | {{- if and .run.workflow_id (eq .action "success") }} Triggered by: {{ .run.trigger_event }} Repository: {{ .run.repository.html_url }} {{- else if and .run.workflow_id (eq .action "failure") }} Triggered by: {{ .run.trigger_event }} Repository: {{ .run.repository.html_url }} {{- else if and .run.workflow_id (eq .action "recover") }} Triggered by: {{ .run.trigger_event }} Repository: {{ .run.repository.html_url }} {{ else if and .starred_at (eq .action "created")}} Stargazer: {{ .sender.html_url }} Repository: {{ .run.repository.html_url }} {{- else if and .run.repository (eq .action "started")}} Watcher: {{ .sender.html_url }} Repository: {{ .run.repository.html_url }} {{- else if and .comment (eq .action "created") }} Commenter: {{ .comment.user.html_url }} Repository: {{ .run.repository.html_url }} Comment link: {{ .comment.html_url }} {{ if .comment.body }} Comment: {{ .comment.body | trunc 2000 }}{{ end }} {{- else if .pull_request }} Branch: {{ .pull_request.head.ref }} → {{ .pull_request.base.ref }} {{ .action | title }} by: {{ .pull_request.user.html_url }} Repository: {{ .run.repository.html_url }} Pull request: {{ .pull_request.html_url }} {{ if .pull_request.body }} Description: {{ .pull_request.body | trunc 2000 }}{{ end }} {{- else if .issue }} {{ .action | title }} by: {{ .issue.user.html_url }} Repository: {{ .run.repository.html_url }} Issue link: {{ .issue.html_url }} {{ if .issue.labels }}Labels: {{ range .issue.labels }}{{ .name }} {{ end }}{{ end }} {{ if .issue.body }} Description: {{ .issue.body | trunc 2000 }}{{ end }} {{- else }} {{ fail "Unsupported Forgejo event type or action." }} {{- end }}