Support git hosts other than GitHub + multiple forks#1042
Closed
kriswest wants to merge 35 commits intofinos:mainfrom
Closed
Support git hosts other than GitHub + multiple forks#1042kriswest wants to merge 35 commits intofinos:mainfrom
kriswest wants to merge 35 commits intofinos:mainfrom
Conversation
…file-based DB implementation
…file-based DB implementation
…file-based DB implementation
…file-based DB implementation
Signed-off-by: Raimund Hook <rhook@gitlab.com>
…que as its our new primary key
Signed-off-by: Raimund Hook <rhook@gitlab.com>
…te non-specific db fns
Signed-off-by: Raimund Hook <rhook@gitlab.com>
Typescript wasn't working on the DB classes due to their dependency imports with require.
…making github fns optional
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
| const repoBranch = row.branch.replace('refs/heads/', ''); | ||
| const repoUrl = row.url; | ||
| const repoWebUrl = repoUrl.replace('.git', ''); | ||
| const isGitHub = repoUrl.startsWith('https://github.com'); |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High
| const repoBranch = data.branch.replace('refs/heads/', ''); | ||
| const repoUrl = data.url; | ||
| const repoWebUrl = repoUrl.replace('.git', ''); | ||
| const isGitHub = repoUrl.startsWith('https://github.com'); |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1042 +/- ##
==========================================
+ Coverage 53.80% 57.67% +3.87%
==========================================
Files 53 60 +7
Lines 2171 2443 +272
Branches 244 289 +45
==========================================
+ Hits 1168 1409 +241
- Misses 952 995 +43
+ Partials 51 39 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #950
resolves #511
resolves #66
Refactor (api, proxy & UI) to remove the assumption of GitHub as the git repository host and the use of the repository
namefield as the id of the repository (as this prevents git-proxy instances from supporting multiple forks of a project or projects from multiple hosts with the same name).Based on #979 - I'll rebase after that merges which should drop the number of affected files down some.
This PR:
namefield in the API with the _id field generated by the database adaptors,namesto be repeated (multiple forks or clashing names from different organisations/repository hosts)organisation/repoName.gitin the proxy URLs with the repository urlbecomes
https://myGitProxyInstance.com:8443/github.com/finos/git-proxy.git
To Do:
(contributed as part of a GitLab CoCreate collaboration with help from @StingRayZA)