Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5e36377

Browse filesBrowse files
committed
It appears LOKI preview is done and all those methods are now final
1 parent c988df1 commit 5e36377
Copy full SHA for 5e36377

File tree

Expand file treeCollapse file tree

3 files changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-6
lines changed

‎src/main/java/org/kohsuke/github/GHBranch.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHBranch.java
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ public URL getProtectionUrl() {
6565
return GitHub.parseURL(protection_url);
6666
}
6767

68-
@Preview @Deprecated
6968
public GHBranchProtection getProtection() throws IOException {
70-
return root.retrieve().withPreview(LOKI).to(protection_url, GHBranchProtection.class).wrap(this);
69+
return root.retrieve().to(protection_url, GHBranchProtection.class).wrap(this);
7170
}
7271

7372
/**
@@ -80,7 +79,6 @@ public String getSHA1() {
8079
/**
8180
* Disables branch protection and allows anyone with push access to push changes.
8281
*/
83-
@Preview @Deprecated
8482
public void disableProtection() throws IOException {
8583
new Requester(root).method("DELETE").to(protection_url);
8684
}

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHRepository.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,15 +1306,15 @@ public boolean remove(Object url) {
13061306
*/
13071307
public Map<String,GHBranch> getBranches() throws IOException {
13081308
Map<String,GHBranch> r = new TreeMap<String,GHBranch>();
1309-
for (GHBranch p : root.retrieve().withPreview(LOKI).to(getApiTailUrl("branches"), GHBranch[].class)) {
1309+
for (GHBranch p : root.retrieve().to(getApiTailUrl("branches"), GHBranch[].class)) {
13101310
p.wrap(this);
13111311
r.put(p.getName(),p);
13121312
}
13131313
return r;
13141314
}
13151315

13161316
public GHBranch getBranch(String name) throws IOException {
1317-
return root.retrieve().withPreview(LOKI).to(getApiTailUrl("branches/"+name),GHBranch.class).wrap(this);
1317+
return root.retrieve().to(getApiTailUrl("branches/"+name),GHBranch.class).wrap(this);
13181318
}
13191319

13201320
/**

‎src/main/java/org/kohsuke/github/Previews.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/Previews.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* @author Kohsuke Kawaguchi
55
*/
66
/*package*/ class Previews {
7-
static final String LOKI = "application/vnd.github.loki-preview+json";
87
static final String LUKE_CAGE = "application/vnd.github.luke-cage-preview+json";
98
static final String DRAX = "application/vnd.github.drax-preview+json";
109
static final String SQUIRREL_GIRL = "application/vnd.github.squirrel-girl-preview";

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.