Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Restore ability to fork repositories to organisations

  • Loading branch information...
commit a37290c5d0bd6d2c924136a4cc7f144f774bc9f1 1 parent a0ad8d3
David Beitey davidjb authored
Showing with 5 additions and 1 deletion.
  1. +3 −0  CHANGES.rst
  2. +2 −1  githubcollective/github.py
3  CHANGES.rst
View
@@ -4,6 +4,9 @@ Changelog
0.4 (unreleased)
----------------
+- Restore ability to fork repositories to organisations after unexpected
+ API change.
+ [davidjb]
- Ensure fork data payload (org name) is sent as JSON.
[davidjb]
- Allow forks to be correctly named once created. GitHub's API forks using
3  githubcollective/github.py
View
@@ -41,6 +41,7 @@ def _request(self, method, url, data=None):
if data:
kw['data'] = data
response = method(**kw)
+
self._request_count += 1
self._request_limit = response.headers['x-ratelimit-limit']
self._request_remaining = response.headers['x-ratelimit-remaining']
@@ -107,7 +108,7 @@ def _gh_org_repo_hooks(self, repo):
def _gh_org_fork_repo(self, fork_url):
return self._post_request('/repos/%s/forks' % fork_url,
- json.dumps({'org': self.org}))
+ json.dumps({'organization': self.org}))
def _gh_org_create_repo(self, repo):
return self._post_request('/orgs/%s/repos' % self.org,
Please sign in to comment.
Something went wrong with that request. Please try again.