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

fix(terraform): support github repo source url with underscores #9661

Merged
merged 15 commits into from Apr 23, 2021

Conversation

raspy8766
Copy link
Contributor

Changes:

Adds underscore to the list of whitelisted characters for the githubRefMatchRegex so that repositories with an underscore don't get truncated for Terraform and Terragrunt managers.

Context:

Our repo has an underscore and was getting truncated like below which resulted in us getting the "Failed to look up dependency" warning message:

Before

image

After

image

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added unit tests, or
  • No new tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@CLAassistant
Copy link

CLAassistant commented Apr 21, 2021

CLA assistant check
All committers have signed the CLA.

@raspy8766 raspy8766 changed the title Support Github Repos with an Underscore for Terraform and Terragrunt managers fix(Terraform): support github repo source url with underscores Apr 21, 2021
@raspy8766 raspy8766 changed the title fix(Terraform): support github repo source url with underscores fix(terraform): support github repo source url with underscores Apr 21, 2021
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

Should have new tests.

lib/manager/terraform/modules.ts Outdated Show resolved Hide resolved
lib/manager/terragrunt/modules.ts Outdated Show resolved Hide resolved
@raspy8766
Copy link
Contributor Author

raspy8766 commented Apr 21, 2021

Should have new tests.

@viceice Added some unit tests for the github source regex

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

My expectation was to add tests for the function which are suing the regexes and not the regex directly 🤔

@rarkins Should we ok with only testing the regex directly?

@rarkins
Copy link
Collaborator

rarkins commented Apr 22, 2021

I think that's ok, thanks

@viceice viceice enabled auto-merge (squash) April 23, 2021 16:45
@viceice viceice merged commit 108a00b into renovatebot:main Apr 23, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 25.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

rarkins added a commit that referenced this pull request Apr 24, 2021
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants