public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adam Williamson <awilliam@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/openqa] rawhide: Backport PR #7688 to add forge.fp.o bugurl/bugref support
Date: Wed, 29 Jul 2026 20:38:09 GMT [thread overview]
Message-ID: <178535748920.1.9446622073523530386.rpms-openqa-aaa59f615748@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/openqa
Branch : rawhide
Commit : aaa59f615748645c2203dbd3e79e1e844d4754e6
Author : Adam Williamson <awilliam@redhat.com>
Date : 2026-07-29T13:37:13-07:00
Stats : +67/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/openqa/c/aaa59f615748645c2203dbd3e79e1e844d4754e6?branch=rawhide
Log:
Backport PR #7688 to add forge.fp.o bugurl/bugref support
---
diff --git a/0001-fix-Add-forge.fedoraproject.org-to-the-bugurl-bugref.patch b/0001-fix-Add-forge.fedoraproject.org-to-the-bugurl-bugref.patch
new file mode 100644
index 0000000..0b0c78f
--- /dev/null
+++ b/0001-fix-Add-forge.fedoraproject.org-to-the-bugurl-bugref.patch
@@ -0,0 +1,64 @@
+From d940a1a5152c49b8ad90585c41eec53e6922b8ea Mon Sep 17 00:00:00 2001
+From: Adam Williamson <awilliam@redhat.com>
+Date: Wed, 29 Jul 2026 11:40:17 -0700
+Subject: [PATCH] fix: Add forge.fedoraproject.org to the bugurl/bugref complex
+
+This is Fedora's new forge (replacing pagure.io). It follows
+github behavior for issues/pull requests (they're interchangeable).
+The URL for pull requests is `pulls/`, not `pull/`, so we need to
+handle this in the regex.
+
+Signed-off-by: Adam Williamson <awilliam@redhat.com>
+---
+ lib/OpenQA/Utils.pm | 4 +++-
+ t/16-utils.t | 5 +++++
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/lib/OpenQA/Utils.pm b/lib/OpenQA/Utils.pm
+index 52d246a01..988771dc8 100644
+--- a/lib/OpenQA/Utils.pm
++++ b/lib/OpenQA/Utils.pm
+@@ -55,6 +55,7 @@ BEGIN {
+ pio => 'https://pagure.io/',
+ ggo => 'https://gitlab.gnome.org/',
+ gfs => 'https://gitlab.com/fedora/sigs/',
++ ffo => 'https://forge.fedoraproject.org/',
+ );
+ %BUGURLS = (
+ 'https://bugzilla.novell.com/show_bug.cgi?id=' => 'bsc',
+@@ -73,6 +74,7 @@ BEGIN {
+ $BUGREFS{pio} => 'pio',
+ $BUGREFS{ggo} => 'ggo',
+ $BUGREFS{gfs} => 'gfs',
++ $BUGREFS{ffo} => 'ffo',
+ );
+
+ $MARKER_REFS = join '|', keys %BUGREFS;
+@@ -473,7 +475,7 @@ sub href_to_bugref ($text) {
+ # gitlab URLs have an odd /-/ after the repo name, e.g.
+ # https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5244
+ $regex
+- = qr{(?<!["\(\[])(?<url_root>$regex)((?<repo>.*?)/(-/)?(issues?|pull|work_items)/)?(?<id>([A-Z]+-)?\d+)(?![\w])};
++ = qr{(?<!["\(\[])(?<url_root>$regex)((?<repo>.*?)/(-/)?(issues?|pulls?|work_items)/)?(?<id>([A-Z]+-)?\d+)(?![\w])};
+ $text =~ s{$regex}{@{[$BUGURLS{$+{url_root}} . ($+{repo} ? '#' . $+{repo} : '')]}#$+{id}}gi;
+ return $text;
+ }
+diff --git a/t/16-utils.t b/t/16-utils.t
+index 6bac52886..e9e938575 100644
+--- a/t/16-utils.t
++++ b/t/16-utils.t
+@@ -144,6 +144,11 @@ is href_to_bugref('https://gitlab.com/fedora/sigs/flatpak/fedora-flatpaks/-/issu
+ 'Fedora SIGs gitlab url to bugref';
+ is href_to_bugref('https://invent.kde.org/plasma/systemsettings/-/work_items/49'), 'kdi#plasma/systemsettings#49',
+ 'KDE Invent gitlab url to bugref (with newer "work_items" name)';
++is bugurl('ffo#foo/bar#1234'), 'https://forge.fedoraproject.org/foo/bar/issues/1234', 'forge.fp.o bugurl';
++is href_to_bugref('https://forge.fedoraproject.org/foo/bar/issues/1234'), 'ffo#foo/bar#1234',
++ 'forge.fp.o url to bugref';
++is href_to_bugref('https://forge.fedoraproject.org/foo/bar/pulls/1235'), 'ffo#foo/bar#1235',
++ 'forge.fp.o PR url to bugref';
+ is find_bug_number('yast_roleconf-ntp-servers-empty-bsc1114818-20181115.png'), 'bsc1114818',
+ 'find the bug number from the needle name';
+
+--
+2.55.0
+
diff --git a/openqa.spec b/openqa.spec
index 8962b0f..06c28ab 100644
--- a/openqa.spec
+++ b/openqa.spec
@@ -150,6 +150,9 @@ Patch: 0001-fix-Support-invent.kde.org-and-work_items-in-bug-URL.patch
# https://github.com/os-autoinst/openQA/pull/7634
# Drop token equality test that is invalid with Mojolicious 9.48+
Patch: 0001-fix-test-Drop-test-for-token-equality.patch
+# https://github.com/os-autoinst/openQA/pull/7688
+# Add forge.fp.o support for bugurl/bugref stuff
+Patch: 0001-fix-Add-forge.fedoraproject.org-to-the-bugurl-bugref.patch
BuildRequires: make
BuildRequires: %{python_scripts_requires}
reply other threads:[~2026-07-29 20:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178535748920.1.9446622073523530386.rpms-openqa-aaa59f615748@fedoraproject.org \
--to=awilliam@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox