Pull Request Integration
Maestro Cloud also provides support for native pull request integration. This is useful if you'd like to run your Flows asynchronously but still block pull requests from landing if flow failures are detected.
Maestro Cloud currently supports Pull Request Integration for GitHub and GitHub Enterprise only. Support for other platforms coming soon.
- ✅ GitHub Support
- ✅ GitHub Enterprise Support
- 🚧 GitLab Support
- 🚧 Bitbucket Support
For certain types of issues (eg: Performance Regressions), Meastro Cloud needs to compare pull request results against a Baseline Branch (typically your main or master branch).
Specify your Baseline Branch using the
config.yaml
file. Create the following file under the .maestro/
directory (or wherever your Flows are if you are using a custom directory). Update main
to the branch you'd like to use as your baseline.<repo-root>/.maestro/config.yaml
1
baselineBranch: main
GitHub Actions
Maestro CLI
API
- 1.
- 2.Ensure your workflow is triggered on every pull request made against your Baseline Branch.
1
on:
2
push:
3
branches: [ main ]
4
pull_request:
5
branches: [ main ]
- 1.Ensure that uploads to Maestro Cloud are triggered on every pull request. Exactly how this is accomplished depends on your CI setup.
- 2.Add the following options to your
maestro cloud
command:
maestro cloud \
--async \
--apiKey <apiKey> \
--branch <branch> \
--repoOwner <repoOwner> \
--repoName <repoName> \
--pullRequestId <pullRequestId> \
--commitSha <commitSha> \
<appFile> .maestro/
branch | Set to the name of the git branch the app was built on and the pull request is based on (i.e. feature-foo) |
repoOwner | Set to the owner of the repository (i.e. "mobile-dev-inc") |
repoName | Set to the name of the repository (i.e. "fenix") |
pullRequestId | Set to the unique identifier of the pull request. Only set when triggered by a Pull Request. (i.e. 1234) |
commitSha | Set to the commit hash. Only set when triggered by a Pull Request. (i.e. 586e1c690891d20568976c78f06fbec9b94a3b32) |
- 1.Ensure that uploads are triggered on every pull request. Exactly how this is accomplished depends on your CI setup.
- 2.Add the following values to the JSON data in the upload API request:
repoOwner | Set to the owner of the repository (i.e. "mobile-dev-inc") |
repoName | Set to the name of the repository (i.e. "fenix") |
branch | Set to the name of the git branch the app was built on and the pull request is based on (i.e. feature-foo) |
pullRequestId | Set to the unique identifier of the pull request. Only set when triggered by a pull request. (i.e. 1234) |
commitSha | Set to the commit hash. Only set when triggered by a Pull Request. (i.e. 586e1c690891d20568976c78f06fbec9b94a3b32) |
In order to update the status of pull requests, you'll need to grant Maestro Cloud permissions to do so.
GitHub
GitHub Enterprise
- 1.Add the Maestro Cloud GitHub App to your GitHub Enterprise instance: https://console.mobile.dev/ghe/add-app
- 2.Navigate to the URL below to install the Maestro Cloud GitHub App:
https://<domain>/organizations/<owner>/settings/apps/<app-slug>/installations
Lastly, open a pull request and ensure that the Maestro Cloud check shows up on your pull request.
GitHub / GitHub Enterprise
