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 team org role crud #1296

Merged
merged 5 commits into from
Jul 11, 2023
Merged

Add team org role crud #1296

merged 5 commits into from
Jul 11, 2023

Conversation

aliotta
Copy link
Contributor

@aliotta aliotta commented Jul 5, 2023

Description

  • modifies create team cmd to take in org role
  • adds a mutate org role cmd
  • modifies team list and get to return the org role

🎟 Issue(s)

Related #14652

🧪 Functional Testing

Tested against the pr preview of https://github.com/astronomer/astro/pull/14609

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Patch coverage: 92.20% and project coverage change: +0.03 🎉

Comparison is base (4fbffff) 87.31% compared to head (6b8db36) 87.34%.

❗ Current head 6b8db36 differs from pull request most recent head 45bf145. Consider uploading reports for the commit 45bf145 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1296      +/-   ##
==========================================
+ Coverage   87.31%   87.34%   +0.03%     
==========================================
  Files         113      113              
  Lines       13255    13327      +72     
==========================================
+ Hits        11573    11641      +68     
- Misses        992      994       +2     
- Partials      690      692       +2     
Impacted Files Coverage Δ
cloud/team/team.go 85.10% <86.36%> (-0.01%) ⬇️
cmd/cloud/organization.go 96.56% <100.00%> (+0.71%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -327,6 +330,41 @@ func teamUpdate(cmd *cobra.Command, out io.Writer, args []string) error {
return team.UpdateTeam(id, teamName, teamDescription, out, astroCoreClient)
}

func newOrganizationTeamUpdateRoleCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "update-org-role [team-id]",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm open to other cmd names lmk what you think

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be part of the team update command because the org role is sort of property for the org team resource, and also it is a flag for the team create command, so it should also be the same flag for the team update command, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah makes sense done

@aliotta aliotta merged commit 51445d8 into main Jul 11, 2023
@aliotta aliotta deleted the addTeamOrgRoleCrud branch July 11, 2023 19:22
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.

2 participants