From e12aec4ccdef7752fb87bd857a48eb4587016573 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 24 Jan 2020 23:19:06 +0000 Subject: Add automatic GitHub webhook creation --- app/templates/base.html | 2 +- app/templates/github/setup_webhook.html | 23 +++++++++++++++++++++++ app/templates/packages/view.html | 9 +++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 app/templates/github/setup_webhook.html (limited to 'app/templates') 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 @@
  • - {{ message|safe }} + {{ message }}
  • 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 %} +

    {{ self.title() }}

    + +
    + {{ _("You can delete the webhook at any time by going into Settings > Webhooks on the repository.") }} +
    + +
    + {{ form.hidden_tag() }} + + {{ render_field(form.event) }} + + {{ render_submit_field(form.submit) }} +
    +{% 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 @@ + {% if package.getIsOnGitHub() %} +

    + + Set up a webhook + + to create releases automatically. +

    + {% endif %} +
    {% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %} -- cgit v1.2.3