action #177817
opencoordination #162539: [saga][epic] future ideas version for version control features within openQA
coordination #162551: [epic] Extend needle version control handling - part 2
Add a way to show needles with correct version from remote forges e.g. github by hotlinking them from githubusercontent or equivalent configurable URL mappings size:S
0%
Description
- suggestions of popular forges
- github.com
- gitlab
- gitlab.com
- gitlab.suse.de
- gitea / forgejo
- codeberg.org
- src.opensuse.org
- cgit
- git.kernel.org
Allow the openqa instance admin to add additional custom mappings via openqa.ini / via the .d directory:
[gitprovider github.com]
host=github.com
regex=... # use a regex with named captures
rawurl=https://raw.githubusercontent.com/$USER/$REPO/$SHA/$FILE'
weburl=https://github.com/$USER/$REPO/blob/$SHA/$FILE
[gitprovider gitlab.suse.de]
...
Acceptance Criteria¶
- AC1: Needles from a remote GitHub instance are hotlinked in the steps view
- AC2: URL mappings for different forges can be customized
Suggestions¶
- Provide a default config in the code (which can be customized, see examples below)
- Fallback to current behavior if there's no mapping for a specific forge
- Proof of Concept: https://github.com/os-autoinst/openQA/pull/6210
- Document this behavior including how to configure forge mappings
- Document how to enable "raw" URLs on the remote (at least one easy example?)
- Consider improving the source view code which currently hardcodes how the link to github is put together
Updated by dheidler 4 days ago
- Copied from action #162035: Support development of "Use needles from correct ref of NEEDLES_DIR" https://github.com/os-autoinst/openQA/pull/5175 size:M added
Updated by dheidler 4 days ago
- Subject changed from Add a way to show needles with correct version from remote github by hotlinking them from githubusercontent to Add a way to show needles with correct version from remote forges e.g. github by hotlinking them from githubusercontent or equivalent configurable URL mappings [size:S]
- Description updated (diff)
Updated by dheidler 4 days ago
Another suggestion:
Consider if it makes sense to reuse parts of the code for URL generation that redirects the user here according to the CASEDIR setting:
https://openqa.opensuse.org/tests/4883300/modules/prepare/steps/1/src
Updated by okurz 4 days ago
- Subject changed from Add a way to show needles with correct version from remote forges e.g. github by hotlinking them from githubusercontent or equivalent configurable URL mappings [size:S] to Add a way to show needles with correct version from remote forges e.g. github by hotlinking them from githubusercontent or equivalent configurable URL mappings size:S
Updated by tinita 3 days ago
- Description updated (diff)
Consider if it makes sense to reuse parts of the code for URL generation that redirects the user here according to the CASEDIR setting:
Yeah. Actually that code is pretty limited to github.com currently, so it could probably be improved to use the new mapping as well