Skip to content

Commit 3217728

Browse files
committed
Fixed issue hub4j#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.
1 parent 3a66e90 commit 3217728

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

src/main/java/org/kohsuke/github/GHRepository.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,6 @@ public void removeCollaborators(Collection<GHUser> users) throws IOException {
505505
}
506506

507507
private void modifyCollaborators(Collection<GHUser> users, String method) throws IOException {
508-
verifyMine();
509508
for (GHUser user : users) {
510509
new Requester(root).method(method).to(getApiTailUrl("collaborators/" + user.getLogin()));
511510
}
@@ -1118,11 +1117,6 @@ public GHHook createWebHook(URL url) throws IOException {
11181117
// return root.retrieveWithAuth("/pulls/"+owner+'/'+name,JsonPullRequests.class).wrap(root);
11191118
// }
11201119

1121-
private void verifyMine() throws IOException {
1122-
if (!root.login.equals(getOwnerName()))
1123-
throw new IOException("Operation not applicable to a repository owned by someone else: " + getOwnerName());
1124-
}
1125-
11261120
/**
11271121
* Returns a set that represents the post-commit hook URLs.
11281122
* The returned set is live, and changes made to them are reflected to GitHub.

0 commit comments

Comments
 (0)