-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: change clone URL check for gitlab to account for possible subpath #5177
Open
philslab-ninja
wants to merge
7
commits into
runatlantis:main
Choose a base branch
from
philslab-ninja:update_gitlab_cloneurl_check
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix: change clone URL check for gitlab to account for possible subpath #5177
philslab-ninja
wants to merge
7
commits into
runatlantis:main
from
philslab-ninja:update_gitlab_cloneurl_check
+29
−2
Conversation
This file contains 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
…ted with subpath Signed-off-by: Philipp Winkler <[email protected]>
philslab-ninja
requested review from
GenPage,
lukemassa and
nitrocode
and removed request for
a team
December 17, 2024 13:05
chenrui333
previously approved these changes
Dec 31, 2024
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.
make sense, can you add a test for it?
jamengual
added
waiting-on-response
Waiting for a response from the user
and removed
waiting-on-review
Waiting for a review from a maintainer
labels
Dec 31, 2024
…ab instances hosted with subpath Signed-off-by: Philipp Winkler <[email protected]>
Hi @chenrui333 - thanks for your review and apololgies for taking so long. I have now added a test for the new functionality |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
go
Pull requests that update Go code
lgtm
This PR has been approved by a maintainer
provider/gitlab
waiting-on-response
Waiting for a response from the user
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.
what
This change allows GitLab URLs that include a subpath in the hostname while maintaining the security checks for repository path validation. The validation will pass as long as the full URL path ends with the expected repository path, which accommodates the case where ATLANTIS_GITLAB_HOSTNAME includes a path component.
why
In one of my projects github enterprise unfortunately was setup with a basepath (like git.acme.com/gitlab). Setting ATLANTIS_GITLAB_HOSTNAME to git.acme.com/gitlab results in an error like:
expected clone url to have path "/path/to/repo.git" but had "/gitlab/path/to/repo.git"
tests
references
closes #1450