mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-17 08:20:16 +02:00
Properly translates GitHub attributes to GitLab
This commit is contained in:
parent
cd9d985732
commit
ec34d7fd29
@ -63,7 +63,7 @@
|
|||||||
<span class="badge bg-danger me-2">{% translate "Closed" %}</span>
|
<span class="badge bg-danger me-2">{% translate "Closed" %}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span class="badge bg-info me-2">{{ notif.app_name }}</span>
|
<span class="badge bg-info me-2">{{ notif.app_name }}</span>
|
||||||
<a href="{{ notif.web_url }}{{ notif.html_url }}" target="_blank">#{{ notif.iid }}{{ notif.number }} {{ notif.title }}</a>
|
<a href="{{ notif.web_url }}" target="_blank">#{{ notif.iid }} {{ notif.title }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -78,7 +78,14 @@ class AppAnnouncementHook:
|
|||||||
f"https://api.github.com/repos/{self.repository_namespace}/issues"
|
f"https://api.github.com/repos/{self.repository_namespace}/issues"
|
||||||
f"?labels={self.label}&state=all"
|
f"?labels={self.label}&state=all"
|
||||||
)
|
)
|
||||||
return [element for element in raw_list if not element.get("pull_request")]
|
# Translates GitHub attributes to GitLab and filters out pull requests
|
||||||
|
clean_list = []
|
||||||
|
for element in raw_list:
|
||||||
|
if not element.get("pull_request"):
|
||||||
|
element["web_url"] = element["html_url"]
|
||||||
|
element["iid"] = element["number"]
|
||||||
|
clean_list.append(element)
|
||||||
|
return clean_list
|
||||||
|
|
||||||
def _get_gitlab_announcement_list(self) -> list:
|
def _get_gitlab_announcement_list(self) -> list:
|
||||||
"""Return the issues list for a GitLab repository"""
|
"""Return the issues list for a GitLab repository"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user