Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default merge strategy #91

Merged
merged 5 commits into from
Dec 8, 2017
Merged

Default merge strategy #91

merged 5 commits into from
Dec 8, 2017

Conversation

reyronald
Copy link
Member

@reyronald reyronald commented Dec 7, 2017

Choose either "Merge commit" or "Squash" as the default merge strategy for pull requests in the Options page

Closes issue #90


dms


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.

Added checkboxes in the Options page to allow the user to opt-in / opt-out of each feature of the extension individually

Closes issue #86
Choose either "Merge commit" or "Squash" as the default merge strategy for pull requests in the Options page

Closes issue #90
@reyronald reyronald self-assigned this Dec 7, 2017
import { h } from 'dom-chef';
import delay from 'yoctodelay';
import elementReady from 'element-ready';
import {URL, URLSearchParams} from 'url';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: (reminder) I don't need URLSearchParams here, remember to remove it

@reyronald reyronald merged commit aa0a56f into dev Dec 8, 2017
@reyronald reyronald deleted the default-merge-strategy branch December 27, 2017 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant