GitHub integration setup

Installing the mabl GitHub integration

  1. Navigate to the Settings > Integrations page and click on the GitHub card.
  2. Click install on the mabl GitHub app page in GitHub Marketplace to integrate mabl directly with GitHub.
  1. Choose the repositories to install the integration in and click Install

  2. You will be forwarded to the GitHub integration configuration screen in mabl. Edit the configurations to suit your needs and click Save (no need to save if you don't change anything)

📘

Installation workspace

Note that the GitHub integration will be installed in your primary workspace when you complete the installation flow. If you have multiple workspaces, you can change your primary workspace by clicking the current workspace name in the mabl app (top right corner), then clicking User Settings, and setting the Primary workspace drop down. Changing your primary workspace will allow you to control which workspace the integration installs into.

📘

Unable to install mabl bot

You must have the proper GitHub permissions to install the mabl bot correctly. If the request button appears instead of the install button, you must contact the person who has the appropriate permissions.

Uninstalling the mabl GitHub integration

Disabling the mabl GitHub integration from the mabl setting screen does not remove it from GitHub. You will still need to visit your Settings > Applications in Github to remove the integration from the GitHub UI.

Use a mabl deployment integration to trigger a deployment

In order to collect the results of your mabl tests with the mabl GitHub integration, you will need to set up a mabl deployment event that includes the commit hash and repository URL. This can be accomplished with one of the following options:

Using Curl to trigger mabl builds

If using curl The required payload values are

  • revision - git commit hash (short or full)
  • properties.repository_url - git repository URL (e.g. [email protected]/mablhq/bamboo-plugin.git)

For example:

curl -s 'https://api.mabl.com/events/deployment' \
         -u 'key:MY-KEY' \
     -H 'Content-Type:application/json' \
     -d '{"environment_id":"my-env-id-e","application_id":"my-application-id-a",
     "properties":{"repository_url":"[email protected]:my-org/my-repo-name.git"},"revision":"abcd123"}'

When a deployment occurs

mabl detects all plan runs that are started as part of a deployment and tries to map them to a workspace with a GitHub integration. If this is successful, the mabl GitHub Checks will appear for the commit id (SHA), first as pending and then as successful or failed.

If the commit is the HEAD commit of an open Pull Request, it will also set the status of the states mentioned above.

Checks appearing for deployment related GitHub commit that triggered mabl testsChecks appearing for deployment related GitHub commit that triggered mabl tests

Checks appearing for deployment related GitHub commit that triggered mabl tests

Managing the GitHub integration in mabl

Navigate to the Settings > Integrations page and click the pencil icon on the right side of the integration to edit the settings.

Here you can

GitHub integrations settings screenGitHub integrations settings screen

GitHub integrations settings screen

Insight filtering

Additionally, you can specify the insight tiers for which mabl should create an Issue or Repository Dispatch event. By default, it will do so for all insight statuses. The categories are:

  • Alert
  • Warning
  • OK
  • Improvement
  • Info

Hovering over the info icon will reveal in-depth information about each, as shown in the image below.

Lastly, you can choose to restrict your GitHub Issue creation to plans with specific labels. If you have a monitoring label for your frequent production monitoring plans, you can select that same monitoring label to have mabl only create issues for those plans.

Click the Save button at the bottom of the page to save any changes you've made.


Did this page help you?