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 updater confused by blank commit #176

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

jakecoffman
Copy link
Member

While debugging an issue I noticed that dependabot update github_actions dependabot/smoke-tests doesn't work. It tries to pull a blank ref which fails.

The cause of this is due to the --commit option defaulting to "" which gets passed into the updater via job.json. This makes the updater think there's a commit present, but when it goes to use it, it's blank and the update fails.

I swapped out the pointer on the type which simplifies a bunch of code, but adding the omitempty is what actually fixes the problem.

@jakecoffman jakecoffman requested a review from a team as a code owner September 7, 2023 20:00
@abdulapopoola
Copy link
Member

is there a way to add tests to catch this earlier in the future and/or prevent regressions?

@jakecoffman
Copy link
Member Author

I added a unit test for this case. It would be better to have integration tests around the different options, but it's probably overkill.

@jakecoffman jakecoffman enabled auto-merge (squash) September 7, 2023 21:11
@jakecoffman jakecoffman merged commit b3bb53e into main Sep 7, 2023
40 checks passed
@jakecoffman jakecoffman deleted the jakecoffman/fix-dependabot-update-github-actions branch September 7, 2023 21:11
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.

2 participants