GitHub Checks API for Jenkins Plugins

Goal: Create a new plugin API so that plugins can publish GitHub checks status messages

Status: Active

Team

Details

The GitHub Checks API allows developers to report the CI integrations’ detail information rather than the binary pass/fail build status on GitHub pages. This project is about implementing this API as a new Jenkins plugin. By consuming this API, other plugins can easily create GitHub checks. Thus, any information during the Jenkins process like warnings, summaries, and durations can be directly shown on GitHub pages.

Project Deliverables

  • A new Jenkins plugin that implements GitHub Checks API

  • Pipeline support feature for GitHub Checks API

  • A new feature for Warnings Next Generation plugin to report warnings to GitHub by consuming the API

  • A new feature for Code Coverage API plugin to report code coverage to GitHub by consuming the API

  • Maybe: A general API defined for similar concepts in other platforms (GitHub, GitLab, BitBucket).

Phase1 Schedule

  • Implement the Checks API with pipeline support in a new Jenkins plugin.

  • Blog post and presentation slides for phase 1.

Phase2 Schedule

  • Consume the API in Warnings Next Generation plugin as a new feature.

  • Consume the API in Code Coverage API plugin as a new feature.

  • Blog post and presentation slides for phase 2.

Phase3 Schedule

  • Add pipeline support for this GitHub Checks API plugin.

  • Define general API for other platforms (GitHub, GitLab, BitBucket).

  • Consuming and implementation guide.

  • Final blog post and presentation slides.

Architecture

  • The diagram below shows the class architecture:

architecture

Workflow

  • These properties are needed when creating a specific GitHub Checks:

    • APP identifier: Used to authenticate as a GitHub app in order to request access tokens for an installation (a user/organization account that installs the app on repositories) of the app. This property is created by GitHub when registering Jenkins as a new GitHub App;

    • App installation id: Used to authenticate as an installation. We can easily get this property from Installation Repository Event when the users install the app on their GitHub repositories;

    • GitHub repository full name: Used to determine which repository the checks are making for. This property can be retrieved from the scm API implemented by GitHub Branch Source plugin;

    • Sha1: Used to determine which revision (a commit or pull request) the checks are created against. This property can also be retrieved from the scm API.

  • The diagram below shows the basic workflow for the GitHub Checks API plugin:

workflow

Meeting

  • Project meeting is scheduled every Wednesday at 2:00 UTC with meeting notes available for all to read.

Links