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: update changelog metadata create command to save the correct struct #194

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

andreaangiolillo
Copy link
Collaborator

Proposed changes

This PR fixes a bug with the changelog metadata create command where the command was saving bytes into the output file when the -o flag was used.

I tested my changes locally.

Bug

 ./bin/foascli changelog metadata create --sha e624d716e86f6910757b60cefdf3aa3181582d38 --versions=2024-01-01,2024-09-22 --output metadata.json
2024/08/22 12:06:24
File was saved in 'metadata.json'.

 cat metadata.json  
"ewogICJydW5EYXRlIjogIjIwMjQtMDgtMjIiLAogICJzcGVjUmV2aXNpb24iOiAiZTYyNGQ3MTZlODZmNjkxMDc1N2I2MGNlZmRmM2FhMzE4MTU4MmQzOCIsCiAgInNwZWNSZXZpc2lvblNob3J0IjogImU2MjRkNzE2ZTg2IiwKICAidmVyc2lvbnMiOiBbCiAgICAiMjAyNC0wMS0wMSIsCiAgICAiMjAyNC0wOS0yMiIKICBdCn0="

With PR changes:

 ./bin/foascli changelog metadata create --sha e624d716e86f6910757b60cefdf3aa3181582d38 --versions=2024-01-01,2024-09-22 --output metadata.json
2024/08/22 12:06:24
File was saved in 'metadata.json'.

 cat metadata.json                                                                                                                         
{
  "runDate": "2024-08-22",
  "specRevision": "e624d716e86f6910757b60cefdf3aa3181582d38",
  "specRevisionShort": "e624d716e86",
  "versions": [
    "2024-01-01",
    "2024-09-22"
  ]
}

@andreaangiolillo andreaangiolillo marked this pull request as ready for review August 22, 2024 11:09
@andreaangiolillo andreaangiolillo requested a review from a team as a code owner August 22, 2024 11:09
@andreaangiolillo andreaangiolillo merged commit bc4623e into main Aug 22, 2024
8 checks passed
@andreaangiolillo andreaangiolillo deleted the fix_changelog_metadata_output branch August 22, 2024 12: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.

3 participants