CircleCI Ideas

Trigger build via API using PR number

Back then using v1, users were able to trigger build for PR using PR number. - For example, 

curl -X POST --header "Content-Type: application/json" -u $CIRCLE_TOKEN -d '{ "branch" : "pull/2"}'<vcs>/<username>/<project>/pipeline

It's not anymore available for v2 and this function should be supported for PR builds.

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Dec 16 2019
  • New
  • Attach files
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    December 17, 2019 03:40

    +1 for this. In my organisation we use PR a lot compared with branching. This will help more people to fully switch to v2 than using a combination of v1 + v2.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    December 20, 2019 10:12

    +1!!!!!    We have several repositories with the requirement for the conditional workflow which includes in the V2 API. As above,  Our workflow of projects rely heavily on PR rather than branching. With this feature backporting, I could have all the repositories on CircleCI rather than considering other solutions.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    27 Feb 23:58

    +1 On this for sure. I'm very surprised this isn't already supported when other solutions support this. Its basically a staple for CI.