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

Add org support for init/project/analyze/history #1490

Merged
merged 7 commits into from
Sep 10, 2024
Merged

Add org support for init/project/analyze/history #1490

merged 7 commits into from
Sep 10, 2024

Conversation

cd-work
Copy link
Contributor

@cd-work cd-work commented Sep 6, 2024

This patch uses the Config::org function to add support for org
support in all subcommands that were still missing org support.

Generally when an org is linked, the org mode is always preferred. Only
in scenarios where no group is present at all, like phylum project delete <NAME>, the personal projects will be used instead.

Since this could potentially lead to a lot of confusion with the project
management subcommands, all project subcommands have been changed to
print projects in a fixed format that lists the corresponding org and
group:

✅ Successfully deleted project cli (org: phylum, group: org-group)
✅ Successfully deleted project demo (org: -, group: -)

Closes #1482.

This patch uses the `Config::org` function to add support for org
support in all subcommands that were still missing org support.

Generally when an org is linked, the org mode is always preferred. Only
in scenarios where no group is present at all, like `phylum project
delete <NAME>`, the personal projects will be used instead.

Since this could potentially lead to a lot of confusion with the project
management subcommands, all project subcommands have been changed to
print projects in a fixed format that lists the corresponding org and
group:

```
✅ Successfully deleted project cli (org: phylum, group: org-group)
```

```
✅ Successfully deleted project demo (org: -, group: -)
```

Closes #1482.
This introduces a new type which allows providing static API guarantees
for org and group combinations.
@cd-work cd-work requested a review from a team as a code owner September 6, 2024 18:35
@cd-work cd-work self-assigned this Sep 6, 2024
cli/src/api/mod.rs Outdated Show resolved Hide resolved
cli/src/api/mod.rs Outdated Show resolved Hide resolved
cli/src/api/mod.rs Outdated Show resolved Hide resolved
cli/src/api/mod.rs Outdated Show resolved Hide resolved
cli/src/api/mod.rs Outdated Show resolved Hide resolved
cli/src/commands/extensions/api.rs Outdated Show resolved Hide resolved
cli/src/commands/extensions/api.rs Outdated Show resolved Hide resolved
cli/src/commands/project.rs Show resolved Hide resolved
cli/src/format.rs Show resolved Hide resolved
extensions/phylum.d.ts Show resolved Hide resolved
matt-phylum
matt-phylum previously approved these changes Sep 10, 2024
cli/src/api/mod.rs Outdated Show resolved Hide resolved
extensions/phylum.d.ts Show resolved Hide resolved
cli/src/commands/extensions/api.rs Outdated Show resolved Hide resolved
cli/src/commands/project.rs Outdated Show resolved Hide resolved
@cd-work cd-work enabled auto-merge (squash) September 10, 2024 18:36
@cd-work cd-work merged commit f890fea into main Sep 10, 2024
15 checks passed
@cd-work cd-work deleted the org_init branch September 10, 2024 18:37
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.

Org support for non-org subcommands
2 participants