action #177817
Updated by tinita 3 days ago
* 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 Documment how to enable "raw" URLs on the remote (at least one easy example?)
* Consider improving the [source view](https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI/Controller/Step.pm#L359) code which currently hardcodes how the link to github is put together
Back