Project goal: Create a new plugin API so that plugins can publish GitHub checks status messages
Skills to study/improve: Java, REST API, GitHub
Many projects use pull requests (in GitHub) or similar concepts (in GitLab, Bitbucket, etc.) in their development process. Typically, those pull requests are automatically built and verified with Jenkins. For each build of such a pull request Jenkins creates several reports that can be analyzed in corresponding Jenkins view: compile errors, test results, static analysis reports, code and mutation coverage, API contracts violations, etc.
Currently, GitHub shows only the overall status of a Jenkins build in such a pull request: i.e., you will see whether a build is successful or not, but you will not see why a build has failed. In order to see the details you need to navigate to the corresponding Jenkins views. It would improve the user experience if Jenkins would directly report detailed build results in a GitHub pull request using the Checks API. Then developers directly will see in the pull request view of GitHub what kind of problem failed a build.
Possible milestones for this project are:
Provide a basic implementation of the GitHub Checks API in a new Jenkins Plugin
Use this API from Jenkins Warnings plugin to report new Warnings in a pull request
Define a general API for pull requests and similar concepts (GitHub, GitLab, Bitbucket)
Use this API from other Jenkins plugins like code coverage, etc.
Add a low-level Pipeline step which allows reporting to Checks API
Before exploring the Jenkins features, it would make sense to familiarize yourself with GitHub Checks API.
This project is about implementing the GitHub API and using it in one or more consumers. So it makes sense to look into two different set of existing plugins:
Possible consumers of the API
Development Environment for the Warnings Plugin:
Consider implementing a fix for one of the following issues:
GitHub API, GItHub Branch Source:
Jason Warner, Introducing the Checks API, a better way to connect integrations and code, https://github.blog/2018-05-07-introducing-checks-api/
Keavy McMinn, New Checks API public beta, https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/
Jenkins Warning Next Generation Plugin, https://github.com/jenkinsci/warnings-ng-plugin
Feature Request for the Warnings Plugin: https://issues.jenkins-ci.org/browse/JENKINS-54072
Example GitHub integration with Codacy , https://app.codacy.com/projects
Example GitHub integration with Codecov, https://codecov.io
GitHub Review Comments API, https://developer.github.com/v3/pulls/comments/
GitHub Checks API, https://developer.github.com/v3/checks/
Violations to GitHub Pull Request Comments Library, https://github.com/tomasbjerre/violation-comments-to-github-lib
Existing Jenkins plugin that reports to GitHub Pull Requests with the Status API, https://plugins.jenkins.io/github-branch-source
Jenkins CI Job that reports the status in GitHub, https://ci.jenkins.io/job/Plugins/job/warnings-ng-plugin/job/master/
Pull Request to provide support for GitHub app authentication https://github.com/jenkinsci/github-branch-source-plugin/pull/269
Provide Jenkins as a GitHub App, https://issues.jenkins-ci.org/browse/JENKINS-57351
Integration of CI tests with checks api https://developer.github.com/apps/quickstart-guides/creating-ci-tests-with-the-checks-api/