mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-17 08:20:16 +02:00
Ignore closed issues
This commit is contained in:
parent
9cc3283399
commit
92d8c699eb
@ -57,19 +57,13 @@
|
||||
<ul class="list-group">
|
||||
{% for notif in application_notifications %}
|
||||
<li class="list-group-item">
|
||||
{% if 'open' in notif.state %}
|
||||
<span class="badge bg-success me-2">{% translate "Open" %}</span>
|
||||
{% else %}
|
||||
<span class="badge bg-danger me-2">{% translate "Closed" %}</span>
|
||||
{% endif %}
|
||||
<span class="badge bg-info me-2">{{ notif.app_name }}</span>
|
||||
<a href="{{ notif.web_url }}" target="_blank">#{{ notif.iid }} {{ notif.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{# TODO maybe add some disclaimer that those are managed by application devs? #}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -20,7 +20,7 @@ register = template.Library()
|
||||
|
||||
# cache timers
|
||||
TAG_CACHE_TIME = 3600 # 1 hours
|
||||
NOTIFICATION_CACHE_TIME = 300 # 5 minutes
|
||||
NOTIFICATION_CACHE_TIME = 10 # 5 minutes
|
||||
# timeout for all requests
|
||||
REQUESTS_TIMEOUT = 5 # 5 seconds
|
||||
# max pages to be fetched from gitlab
|
||||
@ -86,7 +86,7 @@ class AppAnnouncementHook:
|
||||
"""
|
||||
raw_list = _fetch_list_from_github(
|
||||
f"https://api.github.com/repos/{self.repository_namespace}/issues"
|
||||
f"?labels={self.label}&state=all"
|
||||
f"?labels={self.label}"
|
||||
)
|
||||
# Translates GitHub attributes to GitLab and filters out pull requests
|
||||
clean_list = []
|
||||
@ -101,7 +101,7 @@ class AppAnnouncementHook:
|
||||
"""Return the issues list for a GitLab repository"""
|
||||
return _fetch_list_from_gitlab(
|
||||
f"https://gitlab.com/api/v4/projects/{quote_plus(self.repository_namespace)}/issues"
|
||||
f"?labels={self.label}")
|
||||
f"?labels={self.label}&state=opened")
|
||||
|
||||
@register.simple_tag()
|
||||
def decimal_widthratio(this_value, max_value, max_width) -> str:
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 29 KiB |
Loading…
x
Reference in New Issue
Block a user