diff --git a/src/main/java/org/kohsuke/github/GHWorkflowRun.java b/src/main/java/org/kohsuke/github/GHWorkflowRun.java index c2e38ce507..b12e8f005e 100644 --- a/src/main/java/org/kohsuke/github/GHWorkflowRun.java +++ b/src/main/java/org/kohsuke/github/GHWorkflowRun.java @@ -502,6 +502,28 @@ public static enum Status { IN_PROGRESS, /** The completed. */ COMPLETED, + /** The action required. */ + ACTION_REQUIRED, + /** The cancelled. */ + CANCELLED, + /** The failure. */ + FAILURE, + /** The neutral. */ + NEUTRAL, + /** The skipped. */ + SKIPPED, + /** The stale. */ + STALE, + /** The success. */ + SUCCESS, + /** The timed out. */ + TIMED_OUT, + /** The requested. */ + REQUESTED, + /** The waiting. */ + WAITING, + /** The pending. */ + PENDING, /** The unknown. */ UNKNOWN; diff --git a/src/test/java/org/kohsuke/github/EnumTest.java b/src/test/java/org/kohsuke/github/EnumTest.java index 7122bd3291..02ab6d912d 100644 --- a/src/test/java/org/kohsuke/github/EnumTest.java +++ b/src/test/java/org/kohsuke/github/EnumTest.java @@ -1,7 +1,6 @@ package org.kohsuke.github; import org.junit.Test; -import org.kohsuke.github.GHPullRequest.MergeMethod; import org.kohsuke.github.internal.Previews; import static org.hamcrest.CoreMatchers.*; @@ -29,10 +28,14 @@ public void touchEnums() { assertThat(GHCommentAuthorAssociation.values().length, equalTo(8)); + assertThat(GHCommitSearchBuilder.Sort.values().length, equalTo(2)); + assertThat(GHCommitState.values().length, equalTo(4)); assertThat(GHCompare.Status.values().length, equalTo(4)); + assertThat(GHContentSearchBuilder.Sort.values().length, equalTo(2)); + assertThat(GHDeploymentState.values().length, equalTo(7)); assertThat(GHDirection.values().length, equalTo(2)); @@ -41,10 +44,17 @@ public void touchEnums() { assertThat(GHEvent.ALL.symbol(), equalTo("*")); assertThat(GHEvent.PULL_REQUEST.symbol(), equalTo(GHEvent.PULL_REQUEST.toString().toLowerCase())); + assertThat(GHFork.values().length, equalTo(3)); + assertThat(GHFork.PARENT_ONLY.toString(), equalTo("")); + + assertThat(GHIssueQueryBuilder.Sort.values().length, equalTo(3)); + assertThat(GHIssueSearchBuilder.Sort.values().length, equalTo(3)); assertThat(GHIssueState.values().length, equalTo(3)); + assertThat(GHIssueStateReason.values().length, equalTo(3)); + assertThat(GHMarketplaceAccountType.values().length, equalTo(2)); assertThat(GHMarketplaceListAccountBuilder.Sort.values().length, equalTo(2)); @@ -65,10 +75,16 @@ public void touchEnums() { assertThat(GHProject.ProjectState.values().length, equalTo(2)); assertThat(GHProject.ProjectStateFilter.values().length, equalTo(3)); - assertThat(MergeMethod.values().length, equalTo(3)); + assertThat(GHProjectsV2Item.ContentType.values().length, equalTo(4)); + + assertThat(GHProjectsV2ItemChanges.FieldType.values().length, equalTo(6)); + + assertThat(GHPullRequest.MergeMethod.values().length, equalTo(3)); assertThat(GHPullRequestQueryBuilder.Sort.values().length, equalTo(4)); + assertThat(GHPullRequestReviewComment.Side.values().length, equalTo(3)); + assertThat(GHPullRequestReviewEvent.values().length, equalTo(4)); assertThat(GHPullRequestReviewEvent.PENDING.toState(), equalTo(GHPullRequestReviewState.PENDING)); assertThat(GHPullRequestReviewEvent.PENDING.action(), nullValue()); @@ -78,20 +94,36 @@ public void touchEnums() { assertThat(GHPullRequestReviewState.APPROVED.action(), equalTo(GHPullRequestReviewEvent.APPROVE.action())); assertThat(GHPullRequestReviewState.DISMISSED.toEvent(), nullValue()); + assertThat(GHPullRequestSearchBuilder.Sort.values().length, equalTo(4)); + + assertThat(GHReleaseBuilder.MakeLatest.values().length, equalTo(3)); + assertThat(GHRepository.CollaboratorAffiliation.values().length, equalTo(3)); assertThat(GHRepository.ForkSort.values().length, equalTo(3)); assertThat(GHRepository.Visibility.values().length, equalTo(4)); + assertThat(GHRepositoryDiscussion.State.values().length, equalTo(3)); + assertThat(GHRepositorySearchBuilder.Sort.values().length, equalTo(3)); + assertThat(GHRepositorySearchBuilder.Fork.values().length, equalTo(3)); + assertThat(GHRepositorySearchBuilder.Fork.PARENT_ONLY.toString(), equalTo("")); assertThat(GHRepositorySelection.values().length, equalTo(2)); + assertThat(GHTargetType.values().length, equalTo(2)); + assertThat(GHTeam.Role.values().length, equalTo(2)); assertThat(GHTeam.Privacy.values().length, equalTo(3)); assertThat(GHUserSearchBuilder.Sort.values().length, equalTo(3)); - assertThat(GHIssueQueryBuilder.Sort.values().length, equalTo(3)); - } + assertThat(GHVerification.Reason.values().length, equalTo(18)); + + assertThat(GHWorkflowRun.Status.values().length, equalTo(15)); + assertThat(GHWorkflowRun.Conclusion.values().length, equalTo(10)); + assertThat(MarkdownMode.values().length, equalTo(2)); + + assertThat(ReactionContent.values().length, equalTo(8)); + } }