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

additional git url validations #402

Merged
merged 1 commit into from
Feb 18, 2025
Merged

Conversation

rcerven
Copy link
Contributor

@rcerven rcerven commented Feb 7, 2025

allow trailing '/' in git url and strip it in the code

for github allow only 2 parts in the path:
https://github.com/owner/reponame
when creating repo in github and repo name contains '/' github converts it to '-'

for gitlab don't allow '-' in the path because that is used for
commits/tree/blob etc
but allow more than 2 parts in the path as gitlab allows that

STONEBLD-3181
STONEBLD-3215

Checklist:

  • PR has reference to the issue(s) it resolves
  • Write / update unit tests
  • Write / update integration (envtest) tests
  • Ensure there is an issue for e2e tests if needed
  • Ensure make test passes
  • Ensure test coverage hasn't decreased
  • Test code changes manually
  • Update readme and documentation
  • Write PR description that highlights overall changes and add usage examples if applicable

@rcerven rcerven requested a review from a team as a code owner February 7, 2025 19:23
@rcerven rcerven force-pushed the git_url_validation branch from 0bde138 to 20b2c36 Compare February 7, 2025 20:58
@rcerven rcerven changed the title [WIP] additional git url validations additional git url validations Feb 7, 2025
allow trailing '/' in git url, and strip it in the code

for github allow only 2 parts in the path:
    https://github.com/owner/reponame
when creating repo in github and repo name contains '/' github converts
it to '-'

for gitlab don't allow '-' in the path because that is used for
    commits/tree/blob etc
but allow more than 2 parts in the path as gitlab allows that

STONEBLD-3181
STONEBLD-3215

Signed-off-by: Robert Cerven <[email protected]>
@rcerven rcerven merged commit 77b4e80 into konflux-ci:main Feb 18, 2025
7 checks passed
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.

3 participants