mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-28 20:42:20 +08:00
copr-be: fix Pulp URLs for group projects like @copr/copr-dev
This commit is contained in:
@@ -268,14 +268,16 @@ if (count($path) >= 7) {
|
||||
$buildid = ltrim(explode('-', $path[5])[0], '0');
|
||||
$frontend_url = implode('/', [$frontend_baseurl, 'coprs', $owner, $project, 'build', $buildid]);
|
||||
$frontend_url_text = 'Go to COPR frontend build';
|
||||
$pulp_url = implode('/', [$pulp_baseurl, $owner, $project]);
|
||||
$pulp_owner = $path[2];
|
||||
$pulp_url = implode('/', [$pulp_baseurl, $pulp_owner, $project]);
|
||||
$pulp_url_text = 'Go to Pulp results for this project';
|
||||
} else if (count($path) >= 5) {
|
||||
$owner = preg_replace('/^(@|%40)(.*)$/', 'g/$2', $path[2]);
|
||||
$project = $path[3];
|
||||
$frontend_url = implode('/', [$frontend_baseurl, 'coprs', $owner, $project]);
|
||||
$frontend_url_text = 'Go to COPR frontend project';
|
||||
$pulp_url = implode('/', [$pulp_baseurl, $owner, $project]);
|
||||
$pulp_owner = $path[2];
|
||||
$pulp_url = implode('/', [$pulp_baseurl, $pulp_owner, $project]);
|
||||
$pulp_url_text = 'Go to Pulp results for this project';
|
||||
} else {
|
||||
$frontend_url = $frontend_baseurl;
|
||||
|
||||
Reference in New Issue
Block a user