-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Enable projects of self-managed GitLab instances #7125
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
Conversation
Tested it and documented in this thread. Works well! Some follow-up issues are documented in the thread too. |
This looks good to me! Approving while waiting for @gtsiolis' review. |
3c3ef50
to
c9d10fb
Compare
@gtsiolis, please help me with the GIt Provder selection |
@AlexTugarev I added a unit test for the remoteURL parsing if that's okay with you? Sorry didn't mean to hijack, but I didn't want to take too much time from your hands. Let me know if it looks okay 🙏🏽 |
Looking at this now! 👀 |
OK, really looking at this now! 😇 |
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.
@AlexTugarev Flawless! 🧙
issue(non-blocking): There's on more edge case when users don't have any access to the linked repository but this is certainly out of the scope of this PR and can be tackled in a future iteration. These users even after authorizing with the self hosted GitLab instance they run into empty Branches and Prebuilds page and opening a workspace leads to an error. Added #7159 to track this.
Let's merge this! 💯
import { toRemoteURL } from './render-utils' | ||
|
||
test('parse clone URL', () => { | ||
expect(toRemoteURL("https://gitlab.com/laushinka/my-node-project")).toEqual("gitlab.com/laushinka/my-node-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.
praise: Thank you for adding thesse tests here, @AlexTugarev! 🌟
return ( | ||
<div className="mt-8 border rounded-t-xl border-gray-100 dark:border-gray-800 flex-col"> | ||
<div className="p-6 p-b-0"> | ||
<div className="text-center text-gray-500"> | ||
Select a Git provider first and continue with your repositories. | ||
</div> | ||
<div className="mt-6 flex flex-col space-y-3 items-center pb-8"> | ||
{authProviders.map(ap => { | ||
{filteredProviders().map(ap => { | ||
return ( | ||
<button key={"button" + ap.host} className="btn-login flex-none w-56 h-10 p-0 inline-flex" onClick={() => selectProvider(ap)}> |
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.
thought: Regarding the button label mentioned in #7125 (comment), I think it's ok to ship this as is as this will probably get better also with #7061.
@@ -295,7 +300,7 @@ export default function NewProject() { | |||
const showSearchInput = !!repoSearchFilter || filteredRepos.length > 0; | |||
|
|||
const renderRepos = () => (<> | |||
{!isBitbucket() && <p className="text-gray-500 text-center text-base">Select a Git repository on <strong>{provider}</strong>. (<a className="gp-link cursor-pointer" onClick={() => setShowGitProviders(true)}>change</a>)</p>} | |||
{!isBitbucket() && <p className="text-gray-500 text-center text-base">Select a Git repository on <strong>{selectedProviderHost}</strong>. (<a className="gp-link cursor-pointer" onClick={() => setShowGitProviders(true)}>change</a>)</p>} | |||
<div className={`mt-10 border rounded-xl border-gray-100 dark:border-gray-800 flex-col`}> | |||
<div className="px-8 pt-8 flex flex-col space-y-2" data-analytics='{"label":"Identity"}'> | |||
<ContextMenu classes="w-full left-0 cursor-pointer" menuEntries={getDropDownEntries(accounts)}> |
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.
issue(non-blockIng): Cross-posting #5330 for the missing group avatars for visibility which is certainly out of the scope of this PR. Cc @laushinka @jldec
LGTM label has been added. Git tree hash: 317494af9fd1d479afc83c23dbcc15d6965c03a7
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gtsiolis, laushinka Associated issue: #5115 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This change allows to create projects based on repositories of self-managed GitLab instances.
how to test
Select Git Provider
, select the authorized GitLab provider, choose repository (from a group, otherwise it always lands in your account, but we want to have it in the team), and create a project.
2. using another team member's account, navigate to the created project and see the option to authorize with the provider of the self-managed GitLab instance.Resolves #5115