Project

General

Profile

Actions

action #177817

open

coordination #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

Added by dheidler 4 days ago. Updated about 18 hours ago.

Status:
Workable
Priority:
Low
Assignee:
Category:
Feature requests
Target version:
Start date:
2024-06-10
Due date:
% Done:

0%

Estimated time:
Tags:

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

Related issues 1 (0 open1 closed)

Copied from openQA Project (public) - action #162035: Support development of "Use needles from correct ref of NEEDLES_DIR" https://github.com/os-autoinst/openQA/pull/5175 size:MResolveddheidler2024-06-10

Actions
Actions #1

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
Actions #2

Updated by dheidler 4 days ago

  • Due date deleted (2025-03-11)
  • Parent task deleted (#88561)
Actions #3

Updated by okurz 4 days ago

  • Priority changed from High to Low
Actions #5

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)
Actions #6

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

Actions #7

Updated by livdywan 4 days ago

  • Status changed from New to Workable

I suppose the ticket should be Workable.

Actions #8

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
Actions #9

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

Actions #10

Updated by okurz about 18 hours ago

  • Parent task set to #162551
Actions

Also available in: Atom PDF