Merge pull request #358 from jglick/no-preview-JENKINS-36240

[JENKINS-36240] /repos/:owner/:repo/collaborators/:username/permission no longer requires korra preview
This commit is contained in:
Kohsuke Kawaguchi
2017-09-08 10:33:31 -07:00
committed by GitHub
2 changed files with 1 additions and 4 deletions

View File

@@ -486,9 +486,8 @@ public class GHRepository extends GHObject {
* @throws FileNotFoundException under some conditions (e.g., private repo you can see but are not an admin of); treat as unknown
* @throws HttpException with a 403 under other conditions (e.g., public repo you have no special rights to); treat as unknown
*/
@Deprecated @Preview
public GHPermissionType getPermission(String user) throws IOException {
GHPermission perm = root.retrieve().withPreview(KORRA).to(getApiTailUrl("collaborators/" + user + "/permission"), GHPermission.class);
GHPermission perm = root.retrieve().to(getApiTailUrl("collaborators/" + user + "/permission"), GHPermission.class);
perm.wrapUp(root);
return perm.getPermissionType();
}
@@ -498,7 +497,6 @@ public class GHRepository extends GHObject {
* @throws FileNotFoundException under some conditions (e.g., private repo you can see but are not an admin of); treat as unknown
* @throws HttpException with a 403 under other conditions (e.g., public repo you have no special rights to); treat as unknown
*/
@Deprecated @Preview
public GHPermissionType getPermission(GHUser u) throws IOException {
return getPermission(u.getLogin());
}

View File

@@ -7,5 +7,4 @@ package org.kohsuke.github;
static final String LOKI = "application/vnd.github.loki-preview+json";
static final String DRAX = "application/vnd.github.drax-preview+json";
static final String SQUIRREL_GIRL = "application/vnd.github.squirrel-girl-preview";
static final String KORRA = "application/vnd.github.korra-preview";
}