Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Choose either "Merge commit" or "Squash" as the default merge strategy for pull requests in the Options page
Closes issue #90
This one was a little tricky to achieve.
Bitbucket uses the select2 jQuery plugin to build the merge strategy dropdown, which the extension would need to manipulate to change the options programatically. However, importing the select2 module in the extension and using that would not work because options data is stored in the jQuery instance that was used to create the select in the first place. So, for the extension to be able to manipulate it, it needs to interact with the select2 instance on the page.
However, this is not possible due to the sandboxed nature of Chrome extensions. The content scripts run on its own scope, and can't access the page, its variable or scripts. I detailed in this Stack Overflow answer the approach I took to get around this.