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: support self-hosted git repositories #417

Merged
merged 3 commits into from
Oct 31, 2022

Conversation

Almighty-Alpaca
Copy link
Contributor

@Almighty-Alpaca Almighty-Alpaca commented Oct 27, 2022

Description

This PR implements support for self-hosted git repositories. This configuration syntax for this is as follows:

repository:
  type: gitlab
  origin: https://gitlab.example.dev
  owner: invertase
  name: melos

I initially tried to use RegEx to extract this information from only the URL, but GitLab supports both subgroups and hosting not on the root of a domain. This means that https://example.com/gitlab/invertase/melos could be both a GitLab instance on https://example.com/gitlab with a group named invertase or an instance on https://example.com/ with a group/subgroup of gitlab/invertase. I was also tempted to validate the owner/name fields using RegEx, but at least for GitLab the patterns are unnecessary complicated and use features that aren't available in Dart.

I've also gone ahead and mirrored the syntax for GitHub, but since I lack knowledge of GitHub Enterprise as much as access to an instance of it this is currently untested. I'd appreciate if anyone here has the resources to help out with this.

Closes #392

Type of Change

  • feat -- New feature (non-breaking change which adds functionality)
  • 🛠️ fix -- Bug fix (non-breaking change which fixes an issue)
  • ! -- Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 refactor -- Code refactor
  • ci -- Build configuration change
  • 📝 docs -- Documentation
  • 🗑️ chore -- Chore

Copy link
Collaborator

@blaugold blaugold left a comment

Choose a reason for hiding this comment

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

Very nice! Just some minor issues.

docs/configuration/overview.mdx Outdated Show resolved Hide resolved
packages/melos/lib/src/common/git_repository.dart Outdated Show resolved Hide resolved
packages/melos/lib/src/common/git_repository.dart Outdated Show resolved Hide resolved
@Almighty-Alpaca
Copy link
Contributor Author

Very nice! Just some minor issues.

Should be all fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

request: add support for self-hosted gitlab
3 participants