Is there a way to POST MERGED pull-request?
This is what I tried, but it didn't work:
This is my curl command:
curl -H 'Authorization: Bearer ************' -H "Content-Type: application/json" -X POST https://stash.sd.comp.com/rest/api/1.0/projects/MYPROJ/repos/MergeTest/pull-requests -d @./MigrateFiles/MergeTest/361807.json
This is the json file:
{
"title": "one more dream",
"description": "(created by ABA) ",
"state": "MERGED",
"open": false,
"closed": true,
"fromRef": {
"id": "refs/heads/mergedpull",
"repository": {
"slug": "MergeTest",
"name": null,
"project": {
"key": "MYPROJ"
}
}
},
"toRef": {
"id": "refs/heads/master",
"repository": {
"slug": "MergeTest",
"name": null,
"project": {
"key": "MYPROJ"
}
}
},
"reviewers": [
{
"user": {
"name": "sbamani"
}
}
]
}
It does creates the pull-request but it creates it OPEN:
{"id":14,"version":0,"title":"one more dream","description":"(created by ABA)","state":"OPEN","open":true,"closed":false,
Thanks,
Sharon