| 1 |
title: | |
| 2 |
{{- if and .starred_at (eq .action "created")}} |
| 3 |
⭐ {{ .sender.login }} starred {{ .repository.name }} |
| 4 |
|
| 5 |
{{- else if and .repository (eq .action "started")}} |
| 6 |
👀 {{ .sender.login }} started watching {{ .repository.name }} |
| 7 |
|
| 8 |
{{- else if and .comment (eq .action "created") }} |
| 9 |
💬 New comment on issue #{{ .issue.number }} {{ .issue.title }} |
| 10 |
|
| 11 |
{{- else if .pull_request }} |
| 12 |
🔀 Pull request {{ .action }}: #{{ .pull_request.number }} {{ .pull_request.title }} |
| 13 |
|
| 14 |
{{- else if .issue }} |
| 15 |
🐛 Issue {{ .action }}: #{{ .issue.number }} {{ .issue.title }} |
| 16 |
|
| 17 |
{{- else }} |
| 18 |
{{ fail "Unsupported GitHub event type or action." }} |
| 19 |
{{- end }} |
| 20 |
message: | |
| 21 |
{{ if and .starred_at (eq .action "created")}} |
| 22 |
Stargazer: {{ .sender.html_url }} |
| 23 |
Repository: {{ .repository.html_url }} |
| 24 |
|
| 25 |
{{- else if and .repository (eq .action "started")}} |
| 26 |
Watcher: {{ .sender.html_url }} |
| 27 |
Repository: {{ .repository.html_url }} |
| 28 |
|
| 29 |
{{- else if and .comment (eq .action "created") }} |
| 30 |
Commenter: {{ .comment.user.html_url }} |
| 31 |
Repository: {{ .repository.html_url }} |
| 32 |
Comment link: {{ .comment.html_url }} |
| 33 |
{{ if .comment.body }} |
| 34 |
Comment: |
| 35 |
{{ .comment.body | trunc 2000 }}{{ end }} |
| 36 |
|
| 37 |
{{- else if .pull_request }} |
| 38 |
Branch: {{ .pull_request.head.ref }} → {{ .pull_request.base.ref }} |
| 39 |
{{ .action | title }} by: {{ .pull_request.user.html_url }} |
| 40 |
Repository: {{ .repository.html_url }} |
| 41 |
Pull request: {{ .pull_request.html_url }} |
| 42 |
{{ if .pull_request.body }} |
| 43 |
Description: |
| 44 |
{{ .pull_request.body | trunc 2000 }}{{ end }} |
| 45 |
|
| 46 |
{{- else if .issue }} |
| 47 |
{{ .action | title }} by: {{ .issue.user.html_url }} |
| 48 |
Repository: {{ .repository.html_url }} |
| 49 |
Issue link: {{ .issue.html_url }} |
| 50 |
{{ if .issue.labels }}Labels: {{ range .issue.labels }}{{ .name }} {{ end }}{{ end }} |
| 51 |
{{ if .issue.body }} |
| 52 |
Description: |
| 53 |
{{ .issue.body | trunc 2000 }}{{ end }} |
| 54 |
|
| 55 |
{{- else }} |
| 56 |
{{ fail "Unsupported GitHub event type or action." }} |
| 57 |
{{- end }} |