Hi!
I'm working on a small Bitbucket App which would ensure PRs targeting `master` have a `merge --no-ff` strategy.
My app listens to `avi:bitbucket:created:pullrequest` events and updates the pull request if target = `master`.
It seems to work as I do not get any errors (I also update the title to make sure my PUT request is fine).
However when I click on `Merge` I still have the complete list of merge strategies and not the one I set earlier.
Any pointers as to why I can't have just one merge strategy in the Merge modal?
Here's the code which updates `title` but not `merge_strategies`.
const updatePr = async (workspaceId, repoId, prId) => {
const requestUrl = route`/2.0/repositories/${workspaceId}/${repoId}/pullrequests/${prId}`;
let response = await api.asApp().requestBitbucket(requestUrl, {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
title: 'This is an updated title.',
destination: {
branch: {
merge_strategies: [
'merge_commit'
]
}
}
}),
});
return response.json();
};Thanks!