-
Notifications
You must be signed in to change notification settings - Fork 130
feat(key on repo url): support git hosts other than GitHub + multiple forks #1043
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Raimund Hook <[email protected]>
…que as its our new primary key
Signed-off-by: Raimund Hook <[email protected]>
…te non-specific db fns
Signed-off-by: Raimund Hook <[email protected]>
Typescript wasn't working on the DB classes due to their dependency imports with require.
…making github fns optional
…file-based DB implementation
…file-based DB implementation
…file-based DB implementation
…file-based DB implementation
Signed-off-by: Raimund Hook <[email protected]>
…que as its our new primary key
Signed-off-by: Raimund Hook <[email protected]>
…te non-specific db fns
Signed-off-by: Raimund Hook <[email protected]>
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.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1043 +/- ##
==========================================
- Coverage 70.29% 66.88% -3.42%
==========================================
Files 54 61 +7
Lines 2205 2449 +244
Branches 248 287 +39
==========================================
+ Hits 1550 1638 +88
- Misses 624 776 +152
- Partials 31 35 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…t-proxy into 950-key-on-repo-urls
Signed-off-by: Kris West <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after an initial scan through :) thanks for your contribution!
@@ -578,20 +578,24 @@ export default function Repositories(props) { | |||
getGitHubRepository(); | |||
}, [props.data.project, props.data.name]); | |||
|
|||
// TODO add support for GitLab API: https://docs.gitlab.com/api/projects/#get-a-single-project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagging for awareness
const router = Router(); | ||
|
||
getAllProxiedHosts().then((originsToProxy) => { | ||
// TODO: this will only happen on startup. We'll need to add routes at runtime when new origins are added? Or force a restart for the proxy to work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagging for awareness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was reading up on a solution for this... as we're using a router it can be reinitialized. The trick will be figuring out how to tell it to do so!
Picked up a couple of test failures after merging main - will resolve (and start working on the additional tests needed). |
…t-proxy into 950-key-on-repo-urls
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
name
field 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:
name
field in the API with the _id field generated by the database adaptors,names
to be repeated (multiple forks or clashing names from different organisations/repository hosts)organisation/repoName.git
in 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)