-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithub.json
10 lines (10 loc) · 3.48 KB
/
github.json
1
2
3
4
5
6
7
8
9
10
{
"token": "your-appservice-webhooks-token",
"url": "https://matrix.example.org/appservice-webhooks/api/v1/matrix/hook/",
"displayName": "GitHub",
"avatar": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
"template": "{% if pusher is defined or release is defined or discussion is defined or issue is defined or hook is defined or zen is defined or pull_request is defined %}[<strong><a href=\"{{ repository.html_url }}\">{{ repository.full_name }}</a></strong>]<br>{% if pusher is defined %}{% if sender.login == pusher.name %}<a href=\"{{ sender.html_url }}\">{{ sender.login }}</a>{% else %}{{ pusher.name }}{% endif %}{% if forced %} force{% endif %} pushed <code>{{ after[:7] }}</code> to {% if 'refs/heads/' in ref %}branch <a href=\"{{ repository.html_url }}/tree/{{ ref|replace('refs/heads/', '') }}\"><strong>{{ ref|replace('refs/heads/', '') }}</strong></a>{% else %}{{ ref }}{% endif %}:<br><ul>{% for c in commits %}<li>{{ c.author.name }}: <a href=\"{{ c.url }}\">{{ c.message }}</a></li>{% endfor %}</ul>{% elif release is defined %}{% if sender.id == release.author.id %}<a href=\"{{ sender.html_url }}\">{{ sender.login }}</a>{% else %}{{ release.author.name }}{% endif %} <strong>{{ action }} <a href=\"{{ release.html_url }}\">{{ release.tag_name }}</a></strong>{% if prerelease %} (prerelease){% endif %} based on {{ release.target_commitish }}<br>{% elif discussion is defined %}<a href=\"{{ discussion.user.html_url }}\">{{ discussion.user.login }}</a> {{ action }} <strong>discussion </strong><a href=\"{{ discussion.html_url }}\"><strong>#{{ discussion.number }}</strong> {{ discussion.title }}</a> [{{ state }}]{% if discussion.answer_html_url %} (<a href=\"{{ discussion.answer_html_url }}\">go to answer</a>){% endif %}<br>{% elif issue is defined %}{% if comment is defined %}<a href=\"{{ comment.user.html_url }}\">{{ comment.user.login }}</a>{% else %}<a href=\"{{ issue.user.html_url }}\">{{ issue.user.login }}</a>{% endif %} {{action}}{% if action in ['assigned', 'unassigned'] %} <a href=\"{{ issue.assignee.html_url }}\">{{ issue.assignee.login }}</a> to{% elif comment is defined %} a <a href=\"{{ comment.html_url }}\">comment</a> on {% endif %} <strong>issue </strong><a href=\"{{ issue.html_url }}\"><strong>#{{ issue.number }}</strong> {{ issue.title }} [{{ issue.state }}]</a>{% if action in ['labeled', 'unlabeled'] %} <font color=\"#{{ issue.label.color }}\">{{ issue.label.name }}</font>{% endif %}<br>{% elif hook is defined %}{% if action == 'deleted' %}<a href=\"{{ sender.html_url }}\">{{ sender.login }}</a> {{ action }} webhook \"{{ hook.name }}\"<br>{% elif zen is defined %}<a href=\"{{ sender.html_url }}\">{{ sender.login }}</a> created webhook \"{{ hook.name }}\"<br>{{ zen }}<br>{% elif pull_request is defined %}{% if review is defined %}<a href=\"{{ review.user.html_url }}\">{{ review.user.login }}</a> {{ action }} a <href=\"{{ review.html_url }}\">review</a> of{% elif comment is defined %}<a href=\"{{ comment.user.html_url }}\">{{ comment.user.login }}</a> {{ action }} a <href=\"{{ comment.html_url }}\">comment to a review</a> of{% else %}<a href=\"{{ pull_request.user.html_url }}\">{{ pull_request.user.login }}</a> {{ action }} {% if merged is sameas true %}(merged) {% endif %}{% endif %}<strong><a href=\"{{ pull_request.html_url }}\">PR #{{ pull_request.number }}</a> {{ pull_request.title }} [{{ pull_request.state }}]<br>{% endif %}{% endif %}{% endif %}",
"defaultFormat": "html",
"defaultEmoji": false,
"defaultMsgtype": "notice"
}