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 1de02a5

Browse filesBrowse files
committed
Added a marker for preview APIs
1 parent bb1cecb commit 1de02a5
Copy full SHA for 1de02a5

File tree

Expand file treeCollapse file tree

2 files changed

+21
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+21
-0
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
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public String getSHA1() {
5353
/**
5454
* Disables branch protection and allows anyone with push access to push changes.
5555
*/
56+
@Preview @Deprecated
5657
public void disableProtection() throws IOException {
5758
BranchProtection bp = new BranchProtection();
5859
bp.enabled = false;
@@ -64,6 +65,7 @@ public void disableProtection() throws IOException {
6465
*
6566
* @see GHCommitStatus#getContext()
6667
*/
68+
@Preview @Deprecated
6769
public void enableProtection(EnforcementLevel level, Collection<String> contexts) throws IOException {
6870
BranchProtection bp = new BranchProtection();
6971
bp.enabled = true;
@@ -73,6 +75,7 @@ public void enableProtection(EnforcementLevel level, Collection<String> contexts
7375
setProtection(bp);
7476
}
7577

78+
@Preview @Deprecated
7679
public void enableProtection(EnforcementLevel level, String... contexts) throws IOException {
7780
enableProtection(level, Arrays.asList(contexts));
7881
}
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package org.kohsuke.github;
2+
3+
import java.lang.annotation.Documented;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
7+
/**
8+
* Indicates that the method/class/etc marked maps to GitHub API in the preview period.
9+
*
10+
* These APIs are subject to change and not a part of the backward compatibility commitment.
11+
* Always used in conjunction with 'deprecated' to raise awareness to clients.
12+
*
13+
* @author Kohsuke Kawaguchi
14+
*/
15+
@Retention(RetentionPolicy.RUNTIME)
16+
@Documented
17+
public @interface Preview {
18+
}

0 commit comments

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