mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
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:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user