-
Notifications
You must be signed in to change notification settings - Fork 724
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support team, team_add, member and membership payloads
I removed/updated some outdated files that were apparently added in the hope of someone implementing the payloads but I preferred to start fresh with new updated payloads. I did a few adjustments to some existing enums to make sure we don't have an error when a payload arrives with an unknown value. I used the same pattern we decided to implement some time ago.
- Loading branch information
Showing
17 changed files
with
1,532 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package org.kohsuke.github; | ||
|
||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; | ||
import org.kohsuke.github.internal.EnumUtils; | ||
|
||
/** | ||
* Changes made to a team. | ||
*/ | ||
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD" }, justification = "JSON API") | ||
public class GHMemberChanges { | ||
|
||
private FromToPermission permission; | ||
|
||
/** | ||
* Get changes to permission. | ||
* | ||
* @return changes to permission | ||
*/ | ||
public FromToPermission getPermission() { | ||
return permission; | ||
} | ||
|
||
/** | ||
* Changes to permission. | ||
*/ | ||
public static class FromToPermission { | ||
|
||
private String from; | ||
|
||
private String to; | ||
|
||
/** | ||
* Gets the from. | ||
* | ||
* @return the from | ||
*/ | ||
public GHOrganization.Permission getFrom() { | ||
return EnumUtils | ||
.getNullableEnumOrDefault(GHOrganization.Permission.class, from, GHOrganization.Permission.UNKNOWN); | ||
} | ||
|
||
/** | ||
* Gets the to. | ||
* | ||
* @return the to | ||
*/ | ||
public GHOrganization.Permission getTo() { | ||
return EnumUtils | ||
.getNullableEnumOrDefault(GHOrganization.Permission.class, to, GHOrganization.Permission.UNKNOWN); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.