Docs missing example of how to run pipeline for a pull request.
Something like:
curl -X POST -s -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" "https://api.bitbucket.org/2.0/repositories/$USERNAME/$REPOSITORY/pipelines/" -d '{ "target": { "type": "pipeline_pullrequest_target", "source": "feature/foo", "destination": "master" } }'
Returning:
{"code": 500, "message": "There was an error processing your request. It has been logged (ID 881d1e9798f2e21f)."}
wondering if anyone were able to run pipeline for a pullrequest
You can definitely run a pipeline for pull request. Those get triggered automatically on any existing Pull Request updates, but if you rerun any of existing one you can see what the expected parameters are. It doesn't seem to be documented so you'd have to try few combinations to find required parameters.
I've managed to trigger new PR pipeline with similar structure:
{
"target": {
"type": "pipeline_pullrequest_target",
"source": {BRANCH},
"destination": "master",
"destination_commit": {
...
},
"pullrequest": {
...
},
"selector": {
"type": "pull-requests",
"pattern": "**"
},
"commit": {
...
}
}
}
Thanks,
Peter
What do you mean by "but if you rerun any of existing one you can see what the expected parameters are"? How to see them?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.