Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Private assignment with no private repositories available #46

Closed
johndbritton opened this issue Jun 24, 2015 · 6 comments
Closed

Private assignment with no private repositories available #46

johndbritton opened this issue Jun 24, 2015 · 6 comments

Comments

@johndbritton
Copy link
Contributor

Creating a private assignment if there are no private repositories available results in a poor experience:

screen shot 2015-06-24 at 5 14 24 pm

@tarebyte
Copy link
Member

@johndbritton the public API doesn't allow me to check to see if the user has private repositories does it. I read through the docs and it doesn't seem like it.

Any recommendations about how to safe guard against this?

@johndbritton
Copy link
Contributor Author

@pengwynn Do you have any suggestions for this? We'd like to be able to check the number of available private repositories in the organization's plan via the API.

@pengwynn
Copy link

@johndbritton @tarebyte: I'm assuming you'd be authenticating as someone who otherwise could create a new repository? You just need a way to know if there's headroom on the plan to do so?

@tarebyte
Copy link
Member

@pengwynn yup that's exactly it. We authenticate an organization admin who can create repos on behalf of the org.

@tarebyte
Copy link
Member

@pengwynn @johndbritton as it turns out you can get the plan for an organization.

I just 🚶 right by it.

https://developer.github.com/v3/orgs/#response-4

@johndbritton
Copy link
Contributor Author

Here's the result I'm seeing now as a student who tries to accept an invitation to a private individual assignment on an organization which has no private repositories available

screen shot 2015-09-01 at 1 52 12 pm

Need to handle the following cases:

  • accepting private individual assignment
  • accepting private group assignment
  • teacher creating private individual assignment (disallow if they have no private repositories and tell them what their remaining quota is)
  • teacher creating private group assignment (disallow if they have no private repositories and tell them what their remaining quota is)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants