Skip to content

Commit

Permalink
feat: handle archived repos, use color depending on status
Browse files Browse the repository at this point in the history
  • Loading branch information
netomi committed Feb 29, 2024
1 parent f3bdb96 commit 654b828
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions otterdog/webapp/templates/home/organization.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ <h3 class="card-title">General</h3>
</div>
</div>
<div class="col-sm-3">
<div class="card card-warning">
<div class="card card-{{ 'warning' if secret_scanning_data[0] != 0 else 'success' }}">
<div class="card-header">
<h3 class="card-title">Secret Scanning</h3>
</div>
Expand All @@ -148,7 +148,7 @@ <h3 class="card-title">Secret Scanning</h3>
</div>
</div>
<div class="col-sm-3">
<div class="card card-warning">
<div class="card card-{{ 'warning' if branch_protection_data[0] != 0 else 'success' }}">
<div class="card-header">
<h3 class="card-title">Branch Protections</h3>
</div>
Expand Down Expand Up @@ -300,11 +300,16 @@ <h3 class="card-title">Branch Protections</h3>
{% for repo in config.repositories|sort(attribute='name') %}
<tr>
<td>
{% if repo.archived == true %}
<i class="fa-solid fa-box-archive"></i>
{% endif %}
<a href="/projects/{{ project_name }}/repos/{{ repo.name }}">{{ repo.name }}</a>
<a href="https://github.com/{{ config.github_id }}/{{ repo.name }}" target="_blank"><i class="fa-solid fa-up-right-from-square"></i></a>
</td>
<td class="text-center">
{% if repo.branch_protection_rules|length > 0 or repo.rulesets|length > 0 %}
{% if repo.archived == true %}
<i class="text-muted fa-solid fa-circle"></i>
{% elif repo.branch_protection_rules|length > 0 or repo.rulesets|length > 0 %}
<i class="text-success fa-solid fa-circle-check"></i>
{% else %}
<i class="text-danger fa-solid fa-circle-xmark"></i>
Expand Down Expand Up @@ -340,7 +345,9 @@ <h3 class="card-title">Branch Protections</h3>
{% endif %}
</td>
<td class="text-center">
{% if repo.secret_scanning_push_protection == "enabled" %}
{% if repo.archived == true %}
<i class="text-muted fa-solid fa-circle"></i>
{% elif repo.secret_scanning_push_protection == "enabled" %}
<i class="text-success fa-solid fa-circle-check"></i>
{% elif repo.secret_scanning == "enabled" %}
<i class="text-warning fa-solid fa-circle-check"></i>
Expand Down

0 comments on commit 654b828

Please sign in to comment.