diff options
| author | rubenwardy <rw@rubenwardy.com> | 2020-01-24 23:19:06 +0000 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2020-01-24 23:19:06 +0000 |
| commit | e12aec4ccdef7752fb87bd857a48eb4587016573 (patch) | |
| tree | 2a1feae67fb204b0f308258ce70bd8e4ac26d887 /app/templates | |
| parent | d4936e18ee93f8ee8aedce4bc732af5068974536 (diff) | |
| download | cheatdb-e12aec4ccdef7752fb87bd857a48eb4587016573.tar.xz | |
Add automatic GitHub webhook creation
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/base.html | 2 | ||||
| -rw-r--r-- | app/templates/github/setup_webhook.html | 23 | ||||
| -rw-r--r-- | app/templates/packages/view.html | 9 |
3 files changed, 33 insertions, 1 deletions
diff --git a/app/templates/base.html b/app/templates/base.html index cfe2dfc..4db84d7 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -111,7 +111,7 @@ <li class="alert alert-{{category}} container"> <span class="icon_message"></span> - {{ message|safe }} + {{ message }} <div style="clear: both;"></div> </li> diff --git a/app/templates/github/setup_webhook.html b/app/templates/github/setup_webhook.html new file mode 100644 index 0000000..d0012e2 --- /dev/null +++ b/app/templates/github/setup_webhook.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} + +{% block title %} + {{ _("Setup GitHub webhook") }} +{% endblock %} + +{% from "macros/forms.html" import render_field, render_submit_field, render_radio_field %} + +{% block content %} + <h1 class="mt-0">{{ self.title() }}</h1> + + <div class="alert alert-info"> + {{ _("You can delete the webhook at any time by going into Settings > Webhooks on the repository.") }} + </div> + + <form method="POST" action="" enctype="multipart/form-data"> + {{ form.hidden_tag() }} + + {{ render_field(form.event) }} + + {{ render_submit_field(form.submit) }} + </form> +{% endblock %} diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index 77b84da..e5ab1e4 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -364,6 +364,15 @@ </ul> </div> + {% if package.getIsOnGitHub() %} + <p class="small text-centered"> + <a href="{{ url_for('github.setup_webhook', pid=package.id) }}"> + Set up a webhook + </a> + to create releases automatically. + </p> + {% endif %} + <div class="card my-4"> <div class="card-header"> {% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %} |
