Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
77531b1948
|
|||
![]() |
2bf2fa235f | ||
![]() |
87a0d37953 | ||
![]() |
4210a46f9a | ||
![]() |
bd4d50b84e | ||
![]() |
fcd473608c | ||
74bfaed558 | |||
![]() |
4e25b014e4 |
@@ -11,6 +11,18 @@
|
||||
"testing": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 15,
|
||||
"model": "main.repo",
|
||||
"fields": {
|
||||
"bugs_category": 33,
|
||||
"staging": true,
|
||||
"name": "Extra-Staging",
|
||||
"bugs_project": 5,
|
||||
"svn_root": "packages",
|
||||
"testing": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "main.repo",
|
||||
@@ -118,5 +130,17 @@
|
||||
"svn_root": "packages",
|
||||
"testing": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 16,
|
||||
"model": "main.repo",
|
||||
"fields": {
|
||||
"bugs_category": 10,
|
||||
"staging": true,
|
||||
"name": "Core-Staging",
|
||||
"bugs_project": 1,
|
||||
"svn_root": "packages",
|
||||
"testing": false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@@ -52,7 +52,7 @@ def create_specification(package, log, finder):
|
||||
return spec
|
||||
|
||||
|
||||
def get_last_log(repo, pkgbase):
|
||||
def get_tag_info(repo, pkgbase, version):
|
||||
# Gitlab requires the path to the gitlab repo to be html encoded and project name encoded in a different special way
|
||||
pkgrepo = urllib.parse.quote_plus(f'{settings.GITLAB_PACKAGE_REPO}/') + gitlab_project_name_to_path(pkgbase)
|
||||
url = f'https://{settings.GITLAB_INSTANCE}/api/v4/projects/{pkgrepo}/repository/tags'
|
||||
@@ -65,8 +65,12 @@ def get_last_log(repo, pkgbase):
|
||||
return None
|
||||
|
||||
tags = r.json()
|
||||
|
||||
# filter out unrelated tags
|
||||
tags = [tag for tag in tags if tag["name"] == version]
|
||||
|
||||
if len(tags) == 0:
|
||||
logger.error("No tags found for pkgbase %s (%s)", pkgbase, repo)
|
||||
logger.error("No tags found for pkgbase %s (%s) version %s", pkgbase, repo, version)
|
||||
return None
|
||||
|
||||
tag = tags[0]
|
||||
@@ -89,7 +93,7 @@ def add_signoff_comments():
|
||||
if not group.default_spec:
|
||||
continue
|
||||
|
||||
log = get_last_log(group.repo, group.pkgbase)
|
||||
log = get_tag_info(group.repo, group.pkgbase, group.version)
|
||||
if log is None:
|
||||
continue
|
||||
|
||||
|
@@ -26,9 +26,9 @@ class RematchDeveloperTest(TransactionTestCase):
|
||||
self.package.delete()
|
||||
|
||||
def test_basic(self):
|
||||
with mock.patch('packages.management.commands.populate_signoffs.get_last_log') as get_last_log:
|
||||
with mock.patch('packages.management.commands.populate_signoffs.get_tag_info') as get_tag_info:
|
||||
comment = 'upgpkg: 0.1-1: rebuild'
|
||||
get_last_log.return_value = {'message': f'{comment}\n', 'author': 'foo@archlinux.org'}
|
||||
get_tag_info.return_value = {'message': f'{comment}\n', 'author': 'foo@archlinux.org'}
|
||||
call_command('populate_signoffs')
|
||||
|
||||
signoff_spec = SignoffSpecification.objects.first()
|
||||
@@ -36,8 +36,8 @@ class RematchDeveloperTest(TransactionTestCase):
|
||||
assert signoff_spec.pkgbase == self.package.pkgbase
|
||||
|
||||
def test_invalid(self):
|
||||
with mock.patch('packages.management.commands.populate_signoffs.get_last_log') as get_last_log:
|
||||
get_last_log.return_value = None
|
||||
with mock.patch('packages.management.commands.populate_signoffs.get_tag_info') as get_tag_info:
|
||||
get_tag_info.return_value = None
|
||||
call_command('populate_signoffs')
|
||||
|
||||
assert SignoffSpecification.objects.count() == 0
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-e git+https://github.com/fredj/cssmin.git@master#egg=cssmin
|
||||
Django==5.0.9
|
||||
Django==5.0.10
|
||||
IPy==1.1
|
||||
Markdown==3.3.7
|
||||
bencode.py==4.0.0
|
||||
@@ -7,14 +7,14 @@ django-countries==7.6.1
|
||||
django-extensions==3.2.3
|
||||
jsmin==3.0.1
|
||||
pgpdump==1.5
|
||||
parse==1.19.0
|
||||
parse==1.20.2
|
||||
sqlparse==0.5.0
|
||||
django-csp==3.7
|
||||
django-csp==3.8
|
||||
ptpython==2.0.4
|
||||
feedparser==6.0.10
|
||||
feedparser==6.0.11
|
||||
bleach==6.0.0
|
||||
requests==2.32.0
|
||||
xtarfile==0.1.0
|
||||
zstandard==0.17.0
|
||||
whitenoise==6.7.0
|
||||
requests==2.32.3
|
||||
xtarfile==0.2.1
|
||||
zstandard==0.23.0
|
||||
whitenoise==6.8.2
|
||||
django-prometheus==2.3.1
|
||||
|
@@ -754,6 +754,10 @@ table.results {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.results [hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* pkglist: layout */
|
||||
#pkglist-about {
|
||||
margin-top: 1.5em;
|
||||
@@ -1056,12 +1060,12 @@ table td.country {
|
||||
background: #ffd;
|
||||
}
|
||||
|
||||
.results tr:nth-child(even),
|
||||
.results tr:nth-child(even of :not([hidden])),
|
||||
#article-list tr:nth-child(even) {
|
||||
background: #e4eeff;
|
||||
}
|
||||
|
||||
.results tr:nth-child(odd),
|
||||
.results tr:nth-child(odd of :not([hidden])),
|
||||
#article-list tr:nth-child(odd) {
|
||||
background: #fff;
|
||||
}
|
||||
|
@@ -212,8 +212,14 @@ function filter_pkgs_list(filter_ele, tbody_ele) {
|
||||
rows = rows.has('.incomplete');
|
||||
}
|
||||
/* hide all rows, then show the set we care about */
|
||||
all_rows.hide();
|
||||
rows.show();
|
||||
// note that we don't use .hide() from jQuery because it adds display:none
|
||||
// which is very expensive to query in CSS ([style*="display: none"])
|
||||
all_rows.each(function() {
|
||||
$(this).attr('hidden', true);
|
||||
});
|
||||
rows.each(function() {
|
||||
$(this).removeAttr('hidden');
|
||||
});
|
||||
$('#filter-count').text(rows.length);
|
||||
/* make sure we update the odd/even styling from sorting */
|
||||
$('.results').trigger('applyWidgets', [false]);
|
||||
@@ -330,8 +336,14 @@ function filter_signoffs() {
|
||||
rows = rows.has('td.signoff-no');
|
||||
}
|
||||
/* hide all rows, then show the set we care about */
|
||||
all_rows.hide();
|
||||
rows.show();
|
||||
// note that we don't use .hide() from jQuery because it adds display:none
|
||||
// which is very expensive to query in CSS ([style*="display: none"])
|
||||
all_rows.each(function() {
|
||||
$(this).attr('hidden', true);
|
||||
});
|
||||
rows.each(function() {
|
||||
$(this).removeAttr('hidden');
|
||||
});
|
||||
$('#filter-count').text(rows.length);
|
||||
/* make sure we update the odd/even styling from sorting */
|
||||
$('.results').trigger('applyWidgets', [false]);
|
||||
|
@@ -36,8 +36,8 @@
|
||||
{% endif %}{% endwith %}</td>
|
||||
<td>{{ pkg.repo.name }}</td>
|
||||
<td>{{ pkg.arch.name }}</td>
|
||||
<td>{{ pkg.flag_date|date }}</td>
|
||||
<td>{{ pkg.last_update|date }}</td>
|
||||
<td>{{ pkg.flag_date|date:"Y-m-d" }}</td>
|
||||
<td>{{ pkg.last_update|date:"Y-m-d" }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr class="empty"><td colspan="7"><em>No flagged packages to display</em></td></tr>
|
||||
@@ -68,7 +68,7 @@
|
||||
<td>{{ group.version }}</td>
|
||||
<td>{{ group.arch.name }}</td>
|
||||
<td>{{ group.target_repo }}</td>
|
||||
<td>{{ group.last_update|date }}</td>
|
||||
<td>{{ group.last_update|date:"Y-m-d" }}</td>
|
||||
{% if group.specification.known_bad %}
|
||||
<td class="approval signoff-bad">Bad</td>
|
||||
{% else %}
|
||||
@@ -138,7 +138,7 @@
|
||||
<tr>
|
||||
<td class="wrap"><a href="{{ todo.get_absolute_url }}"
|
||||
title="View todo list: {{ todo.name }}">{{ todo.name }}</a></td>
|
||||
<td>{{ todo.created|date }}</td>
|
||||
<td>{{ todo.created|date:"Y-m-d" }}</td>
|
||||
<td>{{ todo.creator.get_full_name }}</td>
|
||||
<td>{{ todo.pkg_count }}</td>
|
||||
<td>{{ todo.incomplete_count }}</td>
|
||||
|
@@ -60,9 +60,9 @@
|
||||
{% else %}
|
||||
<td>{{ pkg.full_version }}</td>
|
||||
{% endif %}
|
||||
<td>{{ pkg.last_update|date }}</td>
|
||||
<td>{{ pkg.build_date|date }}</td>
|
||||
<td>{{ pkg.flag_date|date }}</td>
|
||||
<td>{{ pkg.last_update|date:"Y-m-d" }}</td>
|
||||
<td>{{ pkg.build_date|date:"Y-m-d" }}</td>
|
||||
<td>{{ pkg.flag_date|date:"Y-m-d" }}</td>
|
||||
{% for attr in column_attrs %}
|
||||
<td>{{ pkg|attribute:attr }}</td>
|
||||
{% endfor %}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
<tbody>
|
||||
{% for item in news_list %}
|
||||
<tr>
|
||||
<td>{{ item.postdate|date }}</td>
|
||||
<td>{{ item.postdate|date:"Y-m-d" }}</td>
|
||||
<td class="wrap"><a href="{{ item.get_absolute_url }}"
|
||||
title="View: {{ item.title }}">{{ item.title }}</a></td>
|
||||
<td>{{ item.author.get_full_name }}</td>
|
||||
|
@@ -25,7 +25,7 @@
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<p class="article-info">{{ news.postdate|date }} - {{ news.author.get_full_name }}</p>
|
||||
<p class="article-info">{{ news.postdate|date:"Y-m-d" }} - {{ news.author.get_full_name }}</p>
|
||||
|
||||
<div class="article-content" itemprop="articleBody">{{ news.html }}</div>
|
||||
</div>
|
||||
|
@@ -29,8 +29,8 @@
|
||||
<td><span{% if pkg2.flag_date %} class="flagged"{% endif %}>{{ pkg2.full_version }}</span></td>
|
||||
<td>{% pkg_details_link pkg2 %}</td>
|
||||
<td>{{ pkg2.repo }}</td>
|
||||
<td>{{ pkg1.last_update|date }}</td>
|
||||
<td>{{ pkg2.last_update|date }}</td>
|
||||
<td>{{ pkg1.last_update|date:"Y-m-d" }}</td>
|
||||
<td>{{ pkg2.last_update|date:"Y-m-d" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@@ -23,7 +23,7 @@
|
||||
<td><a href="/groups/{{ grp.arch }}/{{ grp.name }}/"
|
||||
title="Group details for {{ grp.name }}">{{ grp.name }}</a></td>
|
||||
<td>{{ grp.count }}</td>
|
||||
<td>{{ grp.last_update|date }}</td>
|
||||
<td>{{ grp.last_update|date:"Y-m-d" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@@ -30,7 +30,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if pkg.flag_date %}
|
||||
<li><span class="flagged">Flagged out-of-date on {{ pkg.flag_date|date }}</span></li>
|
||||
<li><span class="flagged">Flagged out-of-date on {{ pkg.flag_date|date:"Y-m-d" }}</span></li>
|
||||
{% with tp=pkg.in_testing %}{% if tp %}
|
||||
<li><span class="flagged">Version
|
||||
<a href="{{ tp.get_absolute_url }}"
|
||||
@@ -213,7 +213,7 @@
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}{% with flag_request=pkg.flag_request %}{% if flag_request %}<tr>
|
||||
<th>Last Flag Request:</th>
|
||||
<td class="wrap">From {{ flag_request.who }} on {{ flag_request.created|date }}:<br/>
|
||||
<td class="wrap">From {{ flag_request.who }} on {{ flag_request.created|date:"Y-m-d" }}:<br/>
|
||||
<div class="userdata">{{ flag_request.message|linebreaksbr|default:"{no message}" }}</div></td>
|
||||
</tr>{% endif %}{% endwith %}{% endif %}
|
||||
</table>
|
||||
|
@@ -33,8 +33,8 @@
|
||||
<td>{{ pkg.full_version }}</td>
|
||||
{% endif %}
|
||||
<td class="wrap">{{ pkg.pkgdesc }}</td>
|
||||
<td>{{ pkg.last_update|date }}</td>
|
||||
<td>{{ pkg.flag_date|date }}</td>
|
||||
<td>{{ pkg.last_update|date:"Y-m-d" }}</td>
|
||||
<td>{{ pkg.flag_date|date:"Y-m-d" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@@ -70,8 +70,8 @@
|
||||
<td>{{ pkg.full_version }}</td>
|
||||
{% endif %}
|
||||
<td class="wrap">{{ pkg.pkgdesc }}</td>
|
||||
<td>{{ pkg.last_update|date }}</td>
|
||||
<td>{{ pkg.flag_date|date }}</td>
|
||||
<td>{{ pkg.last_update|date:"Y-m-d" }}</td>
|
||||
<td>{{ pkg.flag_date|date:"Y-m-d" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@@ -117,8 +117,8 @@
|
||||
<td>{{ pkg.full_version }}</td>
|
||||
{% endif %}
|
||||
<td class="wrap">{{ pkg.pkgdesc }}</td>
|
||||
<td>{{ pkg.last_update|date }}</td>
|
||||
<td>{{ pkg.flag_date|date }}</td>
|
||||
<td>{{ pkg.last_update|date:"Y-m-d" }}</td>
|
||||
<td>{{ pkg.flag_date|date:"Y-m-d" }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr class="empty"><td colspan="{% if perms.main.change_package %}8{% else %}7{% endif %}"><em>No matching packages found</em></td></tr>
|
||||
|
@@ -56,7 +56,7 @@
|
||||
<td>{{ group.target_repo }}</td>
|
||||
<td>{{ group.packager|default:"Unknown" }}</td>
|
||||
<td>{{ group.packages|length }}</td>
|
||||
<td class="epoch-{{ group.last_update|date:'U' }}">{{ group.last_update|date }}</td>
|
||||
<td class="epoch-{{ group.last_update|date:'U' }}">{{ group.last_update|date:"Y-m-d" }}</td>
|
||||
{% if group.specification.known_bad %}
|
||||
<td class="approval signoff-bad">Bad</td>
|
||||
{% else %}
|
||||
|
@@ -24,7 +24,7 @@
|
||||
<a href="{{ entry.url }}"
|
||||
title="View full article: {{ entry.title }}">{{ entry.title }}</a>
|
||||
</h4>
|
||||
<p class="timestamp">{{ entry.publishdate|date }}</p>
|
||||
<p class="timestamp">{{ entry.publishdate|date:"Y-m-d" }}</p>
|
||||
<div class="article-content">
|
||||
{{ entry.summary |safe }}
|
||||
</div>
|
||||
|
@@ -50,7 +50,7 @@
|
||||
<a href="{{ news.get_absolute_url }}"
|
||||
title="View full article: {{ news.title }}">{{ news.title }}</a>
|
||||
</h4>
|
||||
<p class="timestamp">{{ news.postdate|date }}</p>
|
||||
<p class="timestamp">{{ news.postdate|date:"Y-m-d" }}</p>
|
||||
<div class="article-content">
|
||||
{% if forloop.counter0 == 0 %}{{ news.html|truncatewords_html:300 }}
|
||||
{% else %}{{ news.html|truncatewords_html:100 }}{% endif %}
|
||||
@@ -63,7 +63,7 @@
|
||||
</h3>
|
||||
<dl class="newslist">
|
||||
{% endif %}
|
||||
<dt>{{ news.postdate|date }}</dt>
|
||||
<dt>{{ news.postdate|date:"Y-m-d" }}</dt>
|
||||
<dd>
|
||||
<a href="{{ news.get_absolute_url }}"
|
||||
title="View full article: {{ news.title }}">{{ news.title }}</a>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<h2>{{ release.version }}</h2>
|
||||
|
||||
<ul>
|
||||
<li><strong>Release Date:</strong> {{ release.release_date|date }}</li>
|
||||
<li><strong>Release Date:</strong> {{ release.release_date|date:"Y-m-d" }}</li>
|
||||
{% if release.kernel_version %}<li><strong>Kernel Version:</strong> {{ release.kernel_version }}</li>{% endif %}
|
||||
<li><strong>Available:</strong> {{ release.available|yesno|capfirst }}</li>
|
||||
{% if release.torrent_data %}
|
||||
|
@@ -42,7 +42,7 @@
|
||||
<a href="{{ item.magnet_uri }}"
|
||||
title="Get magnet link for {{ item.version }}"><img width="12" height="12" src="{% static "magnet.png" %}" alt="Magnet"/></a>
|
||||
{% endif %}</td>
|
||||
<td>{{ item.release_date|date }}</td>
|
||||
<td>{{ item.release_date|date:"Y-m-d" }}</td>
|
||||
<td><a href="{{ item.get_absolute_url }}" title="Release details for {{ item.version }}">{{ item.version }}</a></td>
|
||||
<td>{{ item.kernel_version|default:"" }}</td>
|
||||
<td class="available-{{ item.available|yesno }}">{{ item.available|yesno|capfirst }}</td>
|
||||
|
@@ -37,7 +37,7 @@
|
||||
<tr>
|
||||
<td class="wrap"><a href="{{ list.get_absolute_url }}"
|
||||
title="View todo list: {{ list.name }}">{{ list.name }}</a></td>
|
||||
<td>{{ list.created|date }}</td>
|
||||
<td>{{ list.created|date:"Y-m-d" }}</td>
|
||||
<td>{{ list.creator.get_full_name }}</td>
|
||||
<td>{{ list.pkg_count }}</td>
|
||||
<td>{{ list.incomplete_count }}</td>
|
||||
|
@@ -23,7 +23,7 @@
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<div class="todo-info">{{ list.created|date }} - {{ list.creator.get_full_name }}</div>
|
||||
<div class="todo-info">{{ list.created|date:"Y-m-d" }} - {{ list.creator.get_full_name }}</div>
|
||||
|
||||
<div class="todo-description">
|
||||
{{list.stripped_description|default:'(no description)'|urlize|linebreaks}}
|
||||
|
Reference in New Issue
Block a user