Trigger build via API using PR number
complete
S
Shobeat
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"}' https://circleci.com/api/v2/project/<vcs>/<username>/<project>/pipeline
It's not anymore available for v2 and this function should be supported for PR builds.
CCI-I-1280
Salil Subbakrishna
complete
The API can be used to trigger pipelines for both PR ref and the merge ref. This is done by passing in the PR name into the branch parameter. Docs are available here: https://circleci.com/docs/api/v2/#operation/triggerPipeline
Liya Ai
Hi Everyone! I wanted to share a support article that has a workaround for this issue: https://support.circleci.com/hc/en-us/articles/360049841151 . Please let us know if there's any further feedback on the workaround.
Alexander Pichkur
+ 1
A
Artem Vasiliev
+1. This gets in the way dramatically with CI monorepo configuration like https://github.com/labs42io/circleci-monorepo
E
Eric Alford
+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.
C
CHING YANG TSENG
+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.
Z
Zhu
+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.