Checks api functionality broken by recent github api change
See original GitHub issueSince 26/05 previously working calls to createCheckRun
fail with the following error when trying to parse the github response
Cannot deserialize value of type `org.kohsuke.github.GHEvent` from String "discussion": not one of the values accepted for Enum class: [GOLLUM, ALL, INTEGRATION_INSTALLATION_REPOSITORIES, META, DOWNLOAD, FORK_APPLY, CHECK_RUN, MARKETPLACE_PURCHASE, PROJECT_CARD, SCHEDULE, PUSH, PAGE_BUILD, TEAM_ADD, REPOSITORY_VULNERABILITY_ALERT, PACKAGE, UNKNOWN, DELETE, DEPLOYMENT_STATUS, WATCH, FOLLOW, ORG_BLOCK, ORGANIZATION, COMMIT_COMMENT, ISSUE_COMMENT, REPOSITORY_IMPORT, GITHUB_APP_AUTHORIZATION, CODE_SCANNING_ALERT, CHECK_SUITE, FORK, GIST, CONTENT_REFERENCE, REPOSITORY, INSTALLATION_REPOSITORIES, REPOSITORY_DISPATCH, MILESTONE, STAR, LABEL, MEMBERSHIP, SECURITY_ADVISORY, PROJECT_COLUMN, TEAM, PULL_REQUEST_REVIEW, RELEASE, PUBLIC, WORKFLOW_RUN, STATUS, PULL_REQUEST, PROJECT, WORKFLOW_DISPATCH, CREATE, MEMBER, REGISTRY_PACKAGE, INSTALLATION, DEPLOYMENT, PULL_REQUEST_REVIEW_COMMENT, DEPLOY_KEY, PING, ISSUES]
It isn’t instantly obvious to me how the full github response can be logged, but a little debugging suggests that gh events now include ‘DISCUSSION’ and ‘DISCUSSION_COMMENT’.
Unfortunately I think there have been further changes. Patching the enum to include these values moves things further, but calls to
repo.updateCheckRun(checkRun.getId())
.add(output)
.withConclusion(GHCheckRun.Conclusion.SUCCESS)
.withStatus(GHCheckRun.Status.COMPLETED)
.create();
Now fail with
org.kohsuke.github.GHFileNotFoundException: https://api.github.com/repos/ORG/REPO/check-runs/2675563029 {"message":"Not Found","documentation_url":"https://docs.github.com/rest"}
The check id is presumably correct as it was returned from the successful createCheckRun
call, and this code previously functioned.
I think authentication is also affected. From memory, I was previously able to run adhoc tests of api calls using a personal access token. I now get a message saying that I must authenticate as a github app in order to use the checks api.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
I’ll have a look at the enum issue this evening.
The authentication issue looks different from #1155. I would create a separate issue for it with as many details as possible.
Done.