mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
Fixed issue #317
There's no need for the library to replicate a logic when GitHub does that (and does that correctly.) Looking at the commit history, I couldn't see why this was added in the first place.
This commit is contained in:
@@ -505,7 +505,6 @@ public class GHRepository extends GHObject {
|
||||
}
|
||||
|
||||
private void modifyCollaborators(Collection<GHUser> users, String method) throws IOException {
|
||||
verifyMine();
|
||||
for (GHUser user : users) {
|
||||
new Requester(root).method(method).to(getApiTailUrl("collaborators/" + user.getLogin()));
|
||||
}
|
||||
@@ -1118,11 +1117,6 @@ public class GHRepository extends GHObject {
|
||||
// return root.retrieveWithAuth("/pulls/"+owner+'/'+name,JsonPullRequests.class).wrap(root);
|
||||
// }
|
||||
|
||||
private void verifyMine() throws IOException {
|
||||
if (!root.login.equals(getOwnerName()))
|
||||
throw new IOException("Operation not applicable to a repository owned by someone else: " + getOwnerName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set that represents the post-commit hook URLs.
|
||||
* The returned set is live, and changes made to them are reflected to GitHub.
|
||||
|
||||
Reference in New Issue
Block a user