Pull Request Integration
Maestro 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.
1. Trigger uploads on every pull request
Follow the steps described here
Ensure your workflow is triggered on every pull request made against your Baseline Branch.
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]Ensure that uploads to Maestro Cloud are triggered on every pull request. Exactly how this is accomplished depends on your CI setup.
Add the following options to your
maestro cloudcommand:
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)
Ensure that uploads are triggered on every pull request. Exactly how this is accomplished depends on your CI setup.
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)
2. Grant access to pull requests
In order to update the status of pull requests, you'll need to grant Maestro permissions to do so.
3. Test the integration
Lastly, open a pull request and ensure that the Maestro Cloud check shows up on your pull request.

Last updated
Was this helpful?
