Skip to content

Conversation

@guidorice
Copy link

Add bash scripts for add+remove of organizations, org owners, and org managers.

Closes #177

test in local dev environment

export DSN=postgres://postgres@localhost/osm-teams?sslmode=disable
./organizations ...
./owners ...
./managers ...

@guidorice guidorice requested a review from kamicut May 4, 2020 23:18
@kamicut
Copy link
Member

kamicut commented May 5, 2020

@guidorice this looks good! I actually have never seen this bash pattern for arguments (I don't write a lot of bash) so I learned something new. I'm wondering if there should be a "show" command, because if we add an organization we don't necessarily know the id of the organization that's added.

Two possible options:

  • Make the default (without remove) be a "show org with this id" and add a --add to mirror the --remove
  • Make the default command to add an organization return the id using RETURNING id

What do you think?

@guidorice
Copy link
Author

I'm wondering if there should be a "show" command, because if we add an organization we don't necessarily know the id of the organization that's added.

Yes, good point. I added the RETURNING clause.

I actually have never seen this bash pattern for arguments (I don't write a lot of bash) so I learned something new.

I cribbed it from stackoverflow and I'm not 100% sure what all the syntax does. Looks horrible but it works!

@guidorice guidorice merged commit ae92234 into master May 6, 2020
@guidorice guidorice deleted the feature/shell-script-177 branch May 6, 2020 15:48
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.

Add shell script for new organization, owner, manager

3 participants