The GitHub plugin integrates with the GitHub REST API to provide support for GitHub webhooks.
While the Git plugin provides the core functionality for managing Git repositories and associated data, the GitHub plugin provides the following, additional functionality:
Supported features | Git plugin | GitHub plugin |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reporting data: Code commit |
|
|
|
|
|
|
|
|
|
|
GitHub REST API support
The GitHub plugin has been tested with the GitHub REST API v3.
For API requests using basic authentication or OAuth, you can make up to 5,000 requests per hour. Authenticated requests are associated with the authenticated user, regardless of whether basic authentication or an OAuth token is used. This means that all OAuth applications authorized by a user share the same quota of 5,000 requests per hour when they authenticate with different tokens owned by the same user. For more information, refer to the GitHub documentation. If you exceed the rate limit, the plugin does not fail; it actually waits for the limits to be renewed. It may appear that a job is stuck, but in fact, it is waiting for the limits to update. This typically takes approximately one hour. |
GitHub webhook support
The GitHub plugin provides the ability to automate the launch of the CloudBees CD/RO runtimes for:
-
Commit status changes
-
Pull requests
-
Push events
For more information, refer to Configure webhook triggers.
Supported runtime values according to the event type
When the procedure or pipeline is started by a webhook event, additional properties are available under the /myWebhook
property sheet. These properties are parsed from the event payload, which itself is saved under /my(Job|PipelineRuntime|etc.)/webhookData
. The list of parsed properties depends on the event type. In some cases, the event payload may not contain the data for a property, and it is missing.
The branch names in the Include Branches and Exclude Branches parameters are patterns; the value main corresponds to any branch that contains main (for example, test-main-data ). To specify the exact branch, you must use line start and line end symbols (for example, ^main$ ).
|
Runtime property | Commit status event | Pull request event | Push event |
---|---|---|---|
branch |
|
|
|
commitAuthorEmail |
|
|
|
commitAuthorName |
|
|
|
commitId |
|
|
|
commitMessage |
|
|
|
eventType |
|
|
|
repository |
|
|
|
webhookData/body |
|
|
|
webhookData/branch |
|
|
|
webhookData/number |
|
|
|
webhookData/ref |
|
|
|
webhookData/sha |
|
|
|
webhookData/state |
|
|
|
webhookData/title |
|
|
|
webhookData/url |
|
|
|