Finally – the most requested feature in the history of Buddy has landed! Following tag push executions, it is now possible to trigger pipelines from single and forked repositories on pull requests. This means that you can now use Buddy’s pipelines to test PRs and give GitHub the green light for merge!
The feature covers two most popular Git workflows:
- Single-Repo Pull Requests: the whole branching for the PR takes place within one repository
- Forked Pull Request: the PR goes from a previously forked repository to an upstream repository (GitHub only)
Below you'll find use cases for both.
Single-Repo Pull Requests
To cover pull requests for branches within the same repository, you need a single pipeline that will be executed on every push to every branch:
- Add new pipeline and set the Trigger mode to On push.
- Select Branches by wildcard as the pipeline trigger
- The default command
refs/heads/*will run all branches
Once you create the Pipeline, you can add build and test actions. The actions will be automatically triggered on every push to every branch. The results of the execution will be passed to your Git service, where they can be reviewed for readiness for merging on the corresponding PR page. Here is an example from GitHub:
Every pull request has the status of the triggered pipeline execution, like here in GitHub:
Forked Pull Requests
If you are using a forked repository to make changes that you want to merge to the upstream, you can create a pipeline that will help you decide if the changes are ready to be accepted.
By default, this feature is turned off. It can be activated by clicking Pull Requests and throwing a switch in the right column of the Pipelines tab.
Once the option is enabled, a new wildcard will become available to use in the pipeline settings: Pull requests by wildcard (
Just as with single-repo PRs, the forked PRs also have full integration with Github’s pull requests tab and the pull request activity stream for managing PRs acceptance.
WARNING: If your GitHub repository is public and YAML for Buddy configuration is enabled, turning on forked pull requests in a project may lead to disclosing your sensitive data by exposing environment variables stored in your repo. In this case, it is better to switch back to the GUI mode, or not use public GitHub projects at all.
Need help setting up your Git workflow?
Reach out on the Intercom or drop a word to email@example.com with a short description of your process and we'll prepare a working demo for you.