tofuutils / tenv

OpenTofu / Terraform / Terragrunt and Atmos version manager
https://tofuutils.github.io/tenv/
Apache License 2.0
662 stars 32 forks source link

fix: Improve type checks in extractReleases #167

Closed Abhinavcode13 closed 3 months ago

Abhinavcode13 commented 3 months ago
Abhinavcode13 commented 3 months ago

CC : @kvendingoldo

kvendingoldo commented 3 months ago

Looks fine from my side, @dvaumoron please check it.

kvendingoldo commented 3 months ago

@Abhinavcode13 btw. you also need to fix CI DCO check.

Abhinavcode13 commented 3 months ago

Still DCO CI - failed.

kvendingoldo commented 3 months ago

yep. You can fix it by the following commands: $ git rebase HEAD~3 --signoff $ git push --force-with-lease origin main

Abhinavcode13 commented 3 months ago

I understand that the default nil values prevent a panic. However, I included explicit type assertions for map[string]any to make the function's behavior more predictable.

dvaumoron commented 3 months ago

Hi @Abhinavcode13,

Among my commit today, I changed to create a versions variable in place of reassigning object, to make the code more understandable, however I still did not want to add unnecessary line for an earlier return.

If you are willing to contribute officially, take care of the DCO check, it would have allowed me to merge your proposal and modify the code afterward.

thanks for pointing out