Open jkleinsc opened 4 years ago
I think i have the same problem as the OP, but on triggering a branch.
curl -u TOKEN: -X POST --header "Content-Type: application/json" -d '{"parameters": {}}, "branch": "upstream_change"' https://circleci.com/api/v2/project/github/ORG/PROJECT/pipeline
Although my response is different
{
"number" : 62,
"state" : "pending",
"id" : "7d1e5c00-673d-47e0-8ac6-22e49011eb3a",
"created_at" : "2019-10-27T04:52:09.794Z"
}
It's definitely triggering a build, but on the default branch, rather than the passed branch.
@simesy You need to get the branch key into the JSON object with the parameters key.
--
Robin Schroer On 27 Oct 2019, 06:01 +0100, Simon Hobbs notifications@github.com, wrote:
I think i have the same problem as the OP, but on triggering a branch. curl -u TOKEN: -X POST --header "Content-Type: application/json" -d '{"parameters": {}}, "branch": "upstream_change"' https://circleci.com/api/v2/project/github/ORG/PROJECT/pipeline Although my response is different { "number" : 62, "state" : "pending", "id" : "7d1e5c00-673d-47e0-8ac6-22e49011eb3a", "created_at" : "2019-10-27T04:52:09.794Z" } It's definitely triggering a build, but on the default branch, rather than the passed branch. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I am trying to use the new API to trigger a pipeline by tag or commit and neither seem to work. It looks like the API doesn't support passing a commit/revision but it looks like tag is supported: https://github.com/CircleCI-Public/api-preview-docs/blob/master/specs/v2-sketch.yaml#L750
However when I try to trigger via a tag, it doesn't end up triggering any workflows. Here's the request body being sent
And the response I get back: