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

Update project management endpoints #1442

Merged
merged 4 commits into from
Aug 31, 2024
Merged

Update project management endpoints #1442

merged 4 commits into from
Aug 31, 2024

Conversation

cd-work
Copy link
Contributor

@cd-work cd-work commented Jun 10, 2024

This patch updates the endpoints used for the project management
subcommands to avoid the soon-to-be deprecated overview endpoint.

The phylum project update subcommand has been updated to make use of
the new default_label field, which can now be updated.

The phylum project list subcommand now lists all projects by default,
including group projects. To still allow listing only non-group projects
the new --no-group flag has been added to this subcommand
specifically. The repository_url has been removed from the command
output, since it is not included in the API response.

The group name has been removed from phylum project status, since the
new endpoint used by the subcommand does not return this information.
However the default_label field was added instead.

Closes #1439.

@cd-work cd-work requested a review from a team as a code owner June 10, 2024 21:34
@maxrake
Copy link
Contributor

maxrake commented Jun 10, 2024

CHANGELOG entry requested.

mathew-horner
mathew-horner previously approved these changes Jun 10, 2024
Copy link
Contributor

@mathew-horner mathew-horner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if in the future we will want to allow users to update any of their prefs, or at least some select ones.

The main one I could see is policy. e.g. cat my-policy.rego | xargs phylum project update --policy (syntax?)

cli/src/api/mod.rs Outdated Show resolved Hide resolved
Copy link
Contributor Author

@cd-work cd-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holding off on this PR until the default label can be changed through the /data/projects/{project_id}.

@cd-work
Copy link
Contributor Author

cd-work commented Jun 13, 2024

Stalled due to https://github.com/phylum-dev/api/issues/1390.

@cd-work cd-work changed the title Add argument for setting a project's default label Update project management endpoints Aug 29, 2024
@cd-work
Copy link
Contributor Author

cd-work commented Aug 29, 2024

Stalled due to https://github.com/phylum-dev/api/pull/1559.

@cd-work cd-work marked this pull request as draft August 29, 2024 18:34
This patch updates the endpoints used for the project management
subcommands to avoid the soon-to-be deprecated overview endpoint.

The `phylum project update` subcommand has been updated to make use of
the new `default_label` field, which can now be updated.

The `phylum project list` subcommand now lists all projects by default,
including group projects. To still allow listing only non-group projects
the new `--no-group` flag has been added to this subcommand
specifically. The `repository_url` has been removed from the command
output, since it is not included in the API response.

The group name has been removed from `phylum project status`, since the
new endpoint used by the subcommand does not return this information.
However the `default_label` field was added instead.

Closes #1439.
@cd-work cd-work marked this pull request as ready for review August 29, 2024 21:05
@cd-work
Copy link
Contributor Author

cd-work commented Aug 29, 2024

Tested locally against the latest staging API and everything seems to be working as I intended now.

@cd-work cd-work self-assigned this Aug 29, 2024
@cd-work cd-work enabled auto-merge (squash) August 29, 2024 21:46
cli/src/api/mod.rs Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
cli/src/commands/project.rs Show resolved Hide resolved
@cd-work cd-work merged commit 2682fa3 into main Aug 31, 2024
15 checks passed
@cd-work cd-work deleted the default_label branch August 31, 2024 03:16
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.

Command to set default label
3 participants