Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

hub create ORGANIZATION/NAME cannot set team_id #431

Open
hkdobrev opened this Issue Nov 13, 2013 · 25 comments

Comments

Projects
None yet
8 participants
$ hub create ORGANIZATION/NAME
Error creating repository: Unprocessable Entity (HTTP 422)
Invalid value for "team_id": ""

I know the team_id which should be assigned to the new repo, but I cannot set it using hub create.

Member

mislav commented Nov 13, 2013

I wasn't aware that this field is required now. It's a sudden change in GH's API. However, there was problem with hub create and teams before as well. What I need to add is a method of passing in the team ID, perhaps by referencing it by its name on the command-line?

@mislav BTW the team is not required to set when creating the repo via github.com so perhaps this is a mistake in the API.

👍

👍

@mislav Sorry to bother, but any news on this one? Should something be changed in hub or this should be taken care of in the GitHub API? Thanks!

Member

mislav commented May 27, 2014

I didn't do any work on this. PR welcome. If someone wants to take a stab at our Go version instead of Ruby, base your work off the "gh" branch which will become the next implementation of hub ;)

I would also like if you could pass a team name in place of a team ID. These should be equivalent:

$ hub create org/repo --team myteam
$ hub create org/repo --team 123

ar4mirez commented Jul 2, 2014

Hi there, any news about this issue or any workaround ?

Member

mislav commented Jul 2, 2014

Nope, no news yet. My above invitation still stands, though.

Member

mislav commented Jul 14, 2014

/cc @jbarnette 😞

@mislav mislav added this to the v2.3 milestone Jul 26, 2014

Member

mislav commented Jul 26, 2014

We will revisit this after we release the Go version really soon. Ruby implementation of hub will stop getting new features.

I just ran into this as well - for what it's worth, I'm not an owner of the organization for which I'm attempting to create a repo, although I do have permission to create them. Perhaps the default team_id is for organization owners, and this only comes up for non-owners?

I was able to create repos in organizations for which I am an owner.

scamden commented May 15, 2015

+1, would be amazing to specify team_id and better yet set a default team @mislav it looked from the readme that you guys have the go impl going?

Member

mislav commented Jun 29, 2015

it looked from the readme that you guys have the go impl going?

@scamden Yes, hub is now entirely in Go (except for some test setup which still runs on Ruby)

scamden commented Jun 29, 2015

@mislav you mentioned you would revisit this after go release, any thoughts yet?

Member

mislav commented Jun 29, 2015

@scamden Yes we need to revisit this. It's in our 2.3 milestone, and we'll get to it eventually.

scamden commented Jun 29, 2015

awesome good to hear

On 29 June 2015 at 15:11, Mislav Marohnić notifications@github.com wrote:

@scamden https://github.com/scamden Yes we need to revisit this. It's
in our 2.3 milestone, and we'll get to it eventually.


Reply to this email directly or view it on GitHub
#431 (comment).

Sterling Camden
Software Engineer
502 Emerson Street | Palo Alto, CA 94301
303.520.2968 | sterling@relateiq.com

@mislav mislav added the feature label Sep 27, 2015

@mislav mislav referenced this issue Aug 17, 2016

Open

List of features for the next big release #1232

11 of 38 tasks complete

joaosa commented Nov 7, 2016

@mislav Sounds like a good solution. Any news? :)

Member

mislav commented Nov 7, 2016

@joaosa No code yet to solve this issue, sorry. I accept contributions. Although, I'm not sure in a scenario where you belong to multiple teams, which team should be picked as a default team to create the repo in?

scamden commented Nov 7, 2016

@mislav at least being able to set a team would be huge regardless of the default, but maybe for default team you could ask and store it in a config file or something?

Member

mislav commented Nov 9, 2016

@scamden Agreed. I think being able to set a team explicitly is more important feature than configuring a default team.

hkdobrev commented Nov 9, 2016 edited

@mislav What do you think of my earlier comment?

@mislav BTW the team is not required to set when creating the repo via github.com so perhaps this is a mistake in the API.

I think this still stands. You don't need to choose a team when creating an organisation repo on GitHub.com. Why should we do this in hub through the API then?

Member

mislav commented Nov 9, 2016 edited

@hkdobrev From what I can see while inspecting our API validation, it looks like a user can only create a repository without a team if they have adminable rights on the org. Any other user will have to supply team_id.

Does this make sense?

hkdobrev commented Nov 9, 2016

@mislav Fair enough. But I can do that on the web for my organisations as well as any other core dev in the team. Why not be able to do it via hub?

Member

mislav commented Nov 9, 2016

Have you tried it recently? The API has changed since you reported this in 2013.

hkdobrev commented Nov 9, 2016 edited

@mislav You are indeed correct! This is now possible in an organisation where you have admin rights. Great! I was actually refraining from using that and I was always creating org repos through the website. Your comment just made my day! 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment