Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(settings): custom shortcuts #1941

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

noirbizarre
Copy link
Contributor

This PR is based on and includes #1940

It makes the prefixes (currently gh: and gl:) customizable, allowing to:

  • add your own (remote and local)
  • override the existing ones (especially to force ssh access on private repositories)
  • benefit from specific github and gitlab behavior on alternative, private or corporate instances

It moves URL normalization into the settings to benefit from custom shortcuts.

It is a draft has some info and decisions are required on the vcs.get_repo() behavior:
it currently only assumes https://gitlab and https://github are http git repositories, unless prefixed with git+.
However, non git remotes are not supported, so I wonder if it would be simpler to consider all https:// as git repositories (it would fail if this is not the case, whatever this method returns)

Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.88%. Comparing base (71358ed) to head (e98bb4f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1941      +/-   ##
==========================================
- Coverage   98.05%   97.88%   -0.18%     
==========================================
  Files          53       53              
  Lines        5511     5539      +28     
==========================================
+ Hits         5404     5422      +18     
- Misses        107      117      +10     
Flag Coverage Δ
unittests 97.88% <100.00%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick initial review 🙂

docs/settings.md Outdated Show resolved Hide resolved
docs/settings.md Outdated Show resolved Hide resolved
docs/settings.md Show resolved Hide resolved
docs/settings.md Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants