mongodb / openapi

MongoDB OpenAPI specs
Apache License 2.0
5 stars 7 forks source link

feat: add `changelog metadata create` command #184

Closed andreaangiolillo closed 2 months ago

andreaangiolillo commented 2 months ago

Proposed changes

This PR creates the changelog metadata create to help with the generation of the metadata file during the release process

./bin/foascli changelog metadata create --help                                                                                         
Generate the changelog for the OpenAPI spec.

Usage:
  foascli changelog metadata create [flags]

Aliases:
  create, generate

Flags:
  -h, --help               help for create
  -o, --output string      File name or path where the command will store the output.
  -d, --run-date string    Date when the changelog was generated. (Format: YYYY-MM-DD)
      --sha string         SHA of the commit of the openapi specification used to generate the changelog.
  -v, --versions strings   List of versions to consider when generating the changelog. (Format: YYYY-MM-DD)
./bin/foascli changelog metadata create --sha e624d716e86f6910757b60cefdf3aa3181582d38 --versions=2024-01-01,2024-09-22             
{
  "runDate": "2024-08-20",
  "specRevision": "e624d716e86f6910757b60cefdf3aa3181582d38",
  "specRevisionShort": "e624d716e86",
  "versions": [
    "2024-01-01",
    "2024-09-22"
  ]
}