diff --git a/playbooks/roles/static/templates/git-redirects.conf.j2 b/playbooks/roles/static/templates/git-redirects.conf.j2 index 9dda0b47d5..fbed8fa430 100644 --- a/playbooks/roles/static/templates/git-redirects.conf.j2 +++ b/playbooks/roles/static/templates/git-redirects.conf.j2 @@ -103,7 +103,7 @@ RewriteCond %{QUERY_STRING} h=([\w/]+) RewriteRule "^/cgit/(.*?)/(.*?)/plain/?(.*)" "https://opendev.org/$1/$2/raw/branch/%1/$3" [L,QSD] # if there's no args: -RewriteRule "^cgit/(.*?)/(.*?)/plain/?(.*)" "https://opendev.org/$1/$2/raw/branch/master/$3" [L,QSD] +RewriteRule "^/cgit/(.*?)/(.*?)/plain/?(.*)" "https://opendev.org/$1/$2/raw/branch/master/$3" [L,QSD] ###################### # commit tab (with file) -> commit screen (without file) diff --git a/testinfra/test_static.py b/testinfra/test_static.py index f6f08946a8..aa0bb9b1aa 100644 --- a/testinfra/test_static.py +++ b/testinfra/test_static.py @@ -138,7 +138,9 @@ git_redirects = ( 'https://opendev.org/openstack/tripleo-ansible/commit/a6f9b1551baf5f680c05f4fa69ac926f8a0a3f81'), ('git.starlingx.io/stx-tools', 'https://opendev.org/openstack/stx-tools'), ('git.zuul-ci.org/zuul', 'https://opendev.org/openstack-infra/zuul'), - ('git.airshipit.org/airship-in-a-bottle', 'https://opendev.org/openstack/airship-in-a-bottle') + ('git.airshipit.org/airship-in-a-bottle', 'https://opendev.org/openstack/airship-in-a-bottle'), + ('git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt', + 'https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt') ) @pytest.mark.parametrize("url,target", git_redirects)