fossas / fossa-cli

Fast, portable and reliable dependency analysis for any codebase. Supports license & vulnerability scanning for large monoliths. Language-agnostic; integrates with 20+ build systems.
https://fossa.com
Other
1.28k stars 173 forks source link

Release group commands #1394

Closed JeffreyHuynh1 closed 7 months ago

JeffreyHuynh1 commented 7 months ago

Overview

The CLI should offer a way to create release groups from the command line. Creating and deleting other org-level objects should be done through their own command.

Acceptance criteria

Testing plan

example .fossa.yml:

releaseGroup:
  title: example-title
  release: example-release-title
  releaseGroupProjects:
    - projectId: custom+1/git@github.com/example
      projectRevision:   12345 
      projectBranch: main
  licensePolicy: license-policy-name 
  securityPolicy: security-policy-name
  teams:
      - team1
      - team2

Create a release group:

Add projects to a release group:

Delete a release group:

Delete a release group release:

Risks

Metrics

References

Checklist

JeffreyHuynh1 commented 7 months ago

CORE wanted me to use their existing endpoints for the release group commands. As a result I baked in a lot of logic from the my pr in CORE into this one. There were a lot of additional endpoints added to retrieve policy ids, team ids, and to validate the existence of release existing release groups with the same name.

With the addition of all the endpoints I added, I can see a future where we just tell the user to pass in the release group id and release id for commands such as (add-projects, delete, delete-release). We would do this by creating new subcommands (retrieve-release-groups, retrieve-releases) and with that users would be able to straight up retrieve the id's that they need. For now, I would like to keep the implementation as is as adding these additional commands will require much more work.