You can use webhook in JIRA to do a post REST call onto the BitBucket server. The webhook call can be set to be triggered only on the "sprint closed" event.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sample here
This API can also be invoked via a user-centric URL when addressing repositories in personal projects.
Create a new pull request between two branches. The branches may be in the same repository, or different ones. When using different repositories, they must still be in the same {@link Repository#getHierarchyId() hierarchy}.
The authenticated user must have REPO_READ permission for the "from" and "to"repositories to call this resource.
Example request representations:
{
"title": "Talking Nerdy",
"description": "It’s a kludge, but put the tuple from the database in the cache.",
"state": "OPEN",
"open": true,
"closed": false,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"repository": {
"slug": "my-repo",
"name": null,
"project": {
"key": "PRJ"
}
}
},
"toRef": {
"id": "refs/heads/master",
"repository": {
"slug": "my-repo",
"name": null,
"project": {
"key": "PRJ"
}
}
},
"locked": false,
"reviewers": [
{
"user": {
"name": "charlie"
}
}
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i tried curl -u user:pwd -H "Content-Type: application/json" https://localhost:7990/rest/api/1.0/projects/TES/repos/myrepo/pull-requests -X POST --data '{"title":"test","description":"test","fromRef":{"id":"refs/heads/master","repository":{"slug":"test-repo","name":null,"project":{"key":"myProject"}}},"toRef":{"id":"refs/heads/dev","repository":{"slug":"myrepo","name":null,"project":{"key":"TES"}}}}'
But it doesn't work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.