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 406fc7e

Browse filesBrowse files
authored
Merge pull request hub4j#1674 - Remove unreleased MAINTAIN and TRIAGE permissions added in hub4j#1671 during GitHub outage
hub4j#1671 Remove unreleased MAINTAIN and TRIAGE permissions added during GitHub outage
2 parents 4cbae90 + 7ce760d commit 406fc7e
Copy full SHA for 406fc7e

File tree

Expand file treeCollapse file tree

3 files changed

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

3 files changed

+6
-7
lines changed

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHPermissionType.java
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@ public enum GHPermissionType {
1010

1111
/** The admin. */
1212
ADMIN(30),
13-
/** The maintain. */
14-
MAINTAIN(25),
1513
/** The write. */
1614
WRITE(20),
17-
/** The triage. */
18-
TRIAGE(15),
1915
/** The read. */
2016
READ(10),
2117
/** The none. */

‎src/test/java/org/kohsuke/github/EnumTest.java

Copy file name to clipboardExpand all lines: src/test/java/org/kohsuke/github/EnumTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void touchEnums() {
5555
assertThat(GHOrganization.Role.values().length, equalTo(2));
5656
assertThat(GHOrganization.Permission.values().length, equalTo(5));
5757

58-
assertThat(GHPermissionType.values().length, equalTo(7));
58+
assertThat(GHPermissionType.values().length, equalTo(5));
5959

6060
assertThat(GHProject.ProjectState.values().length, equalTo(2));
6161
assertThat(GHProject.ProjectStateFilter.values().length, equalTo(3));

‎src/test/java/org/kohsuke/github/GHRepositoryTest.java

Copy file name to clipboardExpand all lines: src/test/java/org/kohsuke/github/GHRepositoryTest.java
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,10 @@ public void testRepoActionVariable() throws Exception {
15961596
}
15971597

15981598
/**
1599-
* Test demoing the issue with a user having the maintain permission on a repository.
1599+
* Test checking the permission fallback mechanism in case the Github API changes. The test was recorded at a time a
1600+
* new permission was added by mistake. If a re-recording it is needed, you'll like have to manually edit the
1601+
* generated mocks to get a non existing permission See
1602+
* https://github.com/hub4j/github-api/issues/1671#issuecomment-1577515662 for the details.
16001603
*
16011604
* @throws IOException
16021605
* the exception
@@ -1605,6 +1608,6 @@ public void testRepoActionVariable() throws Exception {
16051608
public void cannotRetrievePermissionMaintainUser() throws IOException {
16061609
GHRepository r = gitHub.getRepository("hub4j-test-org/maintain-permission-issue");
16071610
GHPermissionType permission = r.getPermission("alecharp");
1608-
assertThat(permission.toString(), is("MAINTAIN"));
1611+
assertThat(permission.toString(), is("UNKNOWN"));
16091612
}
16101613
}

0 commit comments

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