<commit_before># FancyMerge

FancyMerge extends the GitHub pull request page to support a "fancy merge". This type of merge comes from the following example:

1. Create new branch, feature_octopus, off of master
2. Do work and commit
3. Squash commits down into single commit
4. Rebase work on top of master branch
5. Force push new branch
6. Checkout master
7. Merge feature_octopus into master; will fast-forward

# Installation

## Server
Go into the server directory:

Create a file called github.json and fill it in with your github credentials:

```json
{
	"type": "basic",
	"username": "yourUsername",
	"password": "<PASSWORD>"
}
```

Running the server is simple:

```bash
npm install
node index.js
```

## Chrome Extension

1. Go to [chrome://extensions](chrome://extensions)
2. Make sure to check off **Developer mode**
3. Click **Load unpacked extension...**
4. Browse to the extensions directory and select the chrome directory
5. Browsing to any pull request should now show the FancyMerge button

# Usage

As long as the server is running and the extension is loaded, simply go to a pull request and use the FancyMerge button instead of the standard button. You may need to refresh to get the button to load.

# TODOs

* Utilize local storage for extension settings<commit_msg>More detail to the overview section<commit_after># FancyMerge

## Motivation
FancyMerge extends the GitHub pull request page to support a "fancy merge". A fancy merge is the equivalent of `git merge --squash` but it also updates the source branch. The benefits of this method are that feature branches are merged into master as a single commit at the tip, giving a linear commit history while still keeping GitHub informed on the state of the branch. This means you can retain a linear commit history without having to manually close or update your pull requests.

This type of merge comes from the following example:

1. Create new branch, feature_octopus, off of master
2. Do work and commit
3. Squash commits down into single commit
4. Rebase work on top of master branch
5. Force push new branch
6. Checkout master
7. Merge feature_octopus into master; will fast-forward

## Components

FancyMerge is made up of a chrome extension and a node.js server.

The chrome extension adds controls to enable FancyMerge on the current repo to your chrome url bar. If enabled for a repo, will replace the merge button on pull requests with a fancy merge button and give you the option to enter a commit message for the commit created by the FancyMerge.

The node.js server listens for POST requests with information about a pull request. It uses the github API to find the pull request using the credentials provided during installation. Once it has identified the necessary components of the pull request it will perform the FancyMerge and push the results to github if it succeeds using your local ssh-agent credentials.

# Installation

## Server
Go into the server directory:

Create a file called github.json and fill it in with your github credentials:

```json
{
	"type": "basic",
	"username": "yourUsername",
	"password": "<PASSWORD>"
}
```

Running the server is simple:

```bash
npm install
node index.js
```

## Chrome Extension

1. Go to [chrome://extensions](chrome://extensions)
2. Make sure to check off **Developer mode**
3. Click **Load unpacked extension...**
4. Browse to the extensions directory and select the chrome directory
5. Browsing to any pull request should now show the FancyMerge button

# Usage

As long as the server is running and the extension is loaded, simply go to a pull request and use the FancyMerge button instead of the standard button. You may need to refresh to get the button to load.

# TODOs

* Utilize local storage for extension settings

{'fraction_non_alphanumeric': 0.05567338282078473, 'fraction_numerical': 0.006362672322375398, 'mean_word_length': 4.306610407876231, 'pattern_counts': {'":': 6, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3122944', 'n_tokens_mistral': 986, 'n_tokens_neox': 938, 'n_words': 585}