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

Use the "clone_url" provided in the webhook response #3124

Closed
1 task
candidson opened this issue Feb 12, 2023 · 5 comments
Closed
1 task

Use the "clone_url" provided in the webhook response #3124

candidson opened this issue Feb 12, 2023 · 5 comments
Labels
feature New functionality/enhancement

Comments

@candidson
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Describe the user story
As a developer, I often want to use the "clone_url" provided in the webhook response. However, based on the different kinds of installations, the base path can be different.

Describe the solution you'd like
I would like to entirely remove the check for the clone_url here:

image

Describe the drawbacks of your solution

Describe alternatives you've considered

@candidson candidson added the feature New functionality/enhancement label Feb 12, 2023
@nitrocode
Copy link
Member

Please feel free to propose a PR

candidson added a commit to candidson/atlantis that referenced this issue Feb 13, 2023
@candidson
Copy link
Author

Please feel free to propose a PR

I just did: #3124

@nitrocode
Copy link
Member

nitrocode commented Feb 13, 2023

Please fill out the full issue template like the drawbacks. The purpose of this check, according to the comments, is to ensure "the clone url is the same as the repo to avoid something malicious".

  • What part of your proposal could continue that behavior?

Let's take a step back.

  • What problem are you trying to solve?
  • What are you trying to use the web hook's clone url for?
  • What vcs are you using?

@candidson
Copy link
Author

Hi @nitrocode

Thanks for the feedback. I like the idea of taking a step back. That's why I didn't propose a PR at the begining.

I am using Gitbucket as VCS. This is actually the same as Github with regards to webhooks and lot more. My issue in this case is the Webhook Call Response returns "/git/my_home_folder/myrepository.git" as "clone_url". The repository full name is "my_home/myrepository". What happens then is that the expected clone_url is then computed to "my_home/myrepository.git". This check fails since the real clone_url is "/git/my_home_folder/myrepository.git".

A similar issue has been described here: #1450

Does it help?

Regards

@candidson
Copy link
Author

I have now looked a bit deeper into the source code. What I intend to do wouldn't work at all, since there seems to be strong ties to the pre-defined vcs repos

@candidson candidson closed this as not planned Won't fix, can't repro, duplicate, stale Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants