0

I'm using github-api, an npm plugin, to create and manage repositories in node.js. I was able to create repositories for a user, and read a user's organizations, but I could not find out how to create a repository for an organization. I looked through the documentation but I am still confused as to how to create the repository.

Thanks in advance!

Ofek Gila
  • 693
  • 1
  • 10
  • 21

1 Answers1

2

It seems that this client doesn't support repository creation for organizations. There is only createRepo for user.

The request for the user looks like:

POST /user/repos

and for the organization:

POST /orgs/:org/repos

where :org is the organisation name.

Anton Sizikov
  • 9,105
  • 1
  • 28
  • 39