mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-07-20 10:04:08 +00:00
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
title: |
|
|
{{- if and .starred_at (eq .action "created")}}
|
|
⭐ {{ .sender.login }} starred {{ .repository.name }}
|
|
|
|
{{- else if and .repository (eq .action "started")}}
|
|
👀 {{ .sender.login }} started watching {{ .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 GitHub event type or action." }}
|
|
{{- end }}
|
|
message: |
|
|
{{ if and .starred_at (eq .action "created")}}
|
|
Stargazer: {{ .sender.html_url }}
|
|
Repository: {{ .repository.html_url }}
|
|
|
|
{{- else if and .repository (eq .action "started")}}
|
|
Watcher: {{ .sender.html_url }}
|
|
Repository: {{ .repository.html_url }}
|
|
|
|
{{- else if and .comment (eq .action "created") }}
|
|
Commenter: {{ .comment.user.html_url }}
|
|
Repository: {{ .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: {{ .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: {{ .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 GitHub event type or action." }}
|
|
{{- end }}
|
|
|