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:
Kohsuke Kawaguchi
2016-12-17 07:30:14 -08:00
parent 3a66e90b7a
commit 32177283b3

View File

@@ -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.