~sircmpwn/dispatch.sr.ht

ref: 3a56828e48216d66de8fa71fc4db5270e009eb75 dispatch.sr.ht/dispatchsrht/templates/github/select-repo.html -rw-r--r-- 1.6 KiB View raw
3a56828eDrew DeVault Support running builds.sr.ht CI for GitLab commits 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{% extends "layout.html" %}
{% block body %}
<div class="container">
  <div class="row">
    <div class="col-md-4">
      <p>
        This task will run a builds.sr.ht job for each commit pushed to a
        GitHub repository. The repository should provide the build manifest in
        the same manner as a git.sr.ht repo (<a
         href="https://man.sr.ht/builds.sr.ht/#gitsrht">docs</a>).
      </p>
    </div>
    <div class="col-md-8">
      <form>
        <input
          name="search"
          type="text"
          placeholder="Search your GitHub repos"
          class="form-control"
          value="{{ search if search else "" }}" />
      </form>

      <div class="event-list configure">
      {% for repo in repos %}
        <form class="event" method="POST">
          {{csrf_token()}}
          <input type="hidden" name="repo" value="{{ repo.full_name }}" />
          <h4>
            {{icon("github")}}
            {% if repo.full_name not in existing %}
            <button
              type="submit"
              class="pull-right btn btn-primary btn-lg"
            >Add task {{icon("caret-right")}}</button>
            {% else %}
            <button
              class="pull-right btn btn-default btn-lg"
              disabled
            >Already configured</button>
            {% endif %}
            {{ repo.full_name }}
            <a
              href="{{ repo.html_url }}"
              target="_blank"
              rel="noopener"
            >{{icon("external-link-alt")}}</a>
          </h4>
        </form>
      {% endfor %}
    </div>
  </div>
</div>
{% endblock %}