A Google Chrome extension to help you review pull requests by allowing you to filter the list of files in GitHub's comparison views.
When viewing a commit or pull request with a large number of modified files or lines, it might be helpful to have the ability to filter that list of files on the fly so that you can:
- review smaller chunks of it at one time
- ignore things that need no review or can't practically be reviewed (e.g., minified files)
This extension provides some features to help you do that.
- Clone this repo and
cdinto its root. cp manifest-sample.json manifest.json- Copiesmanifest-sample.jsonintomanifest.json.- If you want to use this with GitHub Enterprise:
Inmanifest.json, undermatches, replaceghe.domainwith the domain of your GHE server. - Follow these instructions for loading this repository as an unpacked extension.
- Clone this repo and
cdinto its root npm install- Initializes Grunt in this folder and installs dependencies.bower install- Downloads third party libraries used in this extension.grunt bower- Moves the files we need frombower_componentstovendor.
Currently the extension targets comparison and pull request pages.
If GitHub updates the URL structure of these pages, or if another type of page
comes along which could take advantage of this extension, we'll need to update
the matches patterns in manifest.json.
More on tweaking the matching patterns can be found here.
First release! Extension can be loaded "unpacked" from the Extensions page. Allows you to collapse and/or mark-as-reviewed individual file diffs. Tested on Google Chrome 31+.
Some general, not-set-in-stone ideas for future features.
- Incorporate tests for the JS.
- Like the simple bookmarklet being developed on the master branch
- Form has one text field and a submit button.
- On submit, the two commands described above in the proof of concept are run,
using whatever is in the text field as the arguments to the
containsfunction anddata-pathattribute selector. (I.e., replacing.minin the examples given.) - Pop up stays open to allow for subsequent commands to be input; has close button to dismiss.
- Add button to unhide all previously-hidden files.
- Add ability to enter multiple comma-separated arguments into the text field.
- Add to a list of activated filters each time the form is submitted.
- Allow for selective deactivation of single filters.
- Add a second form: Show only files matching this query
(e.g., show me only
.cssfiles)
Some UX work needed to figure out how best to handle this. Would it override hiding filters already set? Is it actually a second bookmarklet?
- Detect filetypes present and offer checkboxes to show/hide them.
- Insert checkboxes next to each file in the Diff Stats list for one-click hiding of that file.
