CircleCI Ideas
 

Merged idea

This idea has been merged into another idea. To comment or vote on this idea, please visit CCI-I-316 Trigger new build when a Pull Request is opened.

New Workflow Filter: Branches>Pull_Request Merged

Currently a push to a branch may be ran before a pull request is created and a new job will not be triggered when a pull request is opened. This can cause issues for developers who are relying on the  `CIRCLE_PULL_REQUEST` env var for certain scripts.

Currently the only solution is to enable "Build Pull Requests Only" in the advanced settings for the project as a whole.

Proposed solution:

workflows:

  version: 2

  dev_stage_pre-prod:

      jobs:

          - test_dev:

              filters:

                  branches:

                      only: dev

                      pull_request: true

 

pull_request: true can be used as a boolean to filter non-pull_request jobs.

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Nov 12 2018
  • Taking votes
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    November 21, 2018 22:05

    +1 to this, looks very similar to other ideas like https://circleci.com/ideas/?idea=CCI-I-316