Add automatic GitHub webhook creation
This commit is contained in:
@@ -111,7 +111,7 @@
|
||||
<li class="alert alert-{{category}} container">
|
||||
<span class="icon_message"></span>
|
||||
|
||||
{{ message|safe }}
|
||||
{{ message }}
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
</li>
|
||||
|
||||
23
app/templates/github/setup_webhook.html
Normal file
23
app/templates/github/setup_webhook.html
Normal file
@@ -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 %}
|
||||
@@ -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") %}
|
||||
|
||||
Reference in New Issue
Block a user