Skip to content

Commit

Permalink
Merge pull request #41 from berzniz/custom_domain
Browse files Browse the repository at this point in the history
Add enterprise support (closes #3)
  • Loading branch information
berzniz authored Feb 27, 2019
2 parents 4de51d1 + fbbbcf6 commit ce6a167
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 6 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Chrome browser extension to show a file tree on GitHub's Pull Request pages.

- Browse pull requests with an IDE like file tree
- Private repositories support out of the box
- GitHub Enterprise support ([Instructions](https://github.com/berzniz/github_pr_tree/issues/3#issuecomment-362851512))
- GitHub Enterprise support
- Other goodies: sticky file headers, resizable tree, expand to full width and more

![GitHub Pull Request](assets/screenshot.png "GitHub Pull Request")
Expand All @@ -13,6 +13,16 @@ Chrome browser extension to show a file tree on GitHub's Pull Request pages.

Install from the Chrome web store: [Better Pull Requests for GitHub](https://chrome.google.com/webstore/detail/nfhdjopbhlggibjlimhdbogflgmbiahc)

## GitHub Enterprise support

To enable the extension on your organization's domain:

1. Right click on the extension icon
2. Choose "Enable Better Pull Request for GitHub on this domain"
3. Reload the page

![Enterprise Support](assets/enterprise.png "Enterprise Support")

## Development

1. Install:
Expand Down
Binary file added assets/enterprise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"react-treeview": "^0.4.7",
"source-map-support": "^0.4.15",
"style-loader": "^0.23.1",
"webext-domain-permission-toggle": "^0.1.0",
"webpack": "^4.28.1",
"webpack-dev-server": "^3.1.14",
"write-file-webpack-plugin": "^4.5.0"
Expand All @@ -39,6 +40,7 @@
"husky": "^0.13.4",
"snazzy": "^7.0.0",
"standard": "^10.0.2",
"webext-dynamic-content-scripts": "^5.0.2",
"webstore-upload": "^0.0.8"
}
}
5 changes: 5 additions & 0 deletions src/js/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import DPT from 'webext-domain-permission-toggle'
import DCS from 'webext-dynamic-content-scripts'

DPT.addContextMenu()
DCS.addToFutureTabs()
1 change: 1 addition & 0 deletions src/js/index.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'webext-dynamic-content-scripts'
import React from 'react'
import { render } from 'react-dom'
import Tree from './components/tree'
Expand Down
14 changes: 13 additions & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@
"name": "Better Pull Request for GitHub",
"short_name": "Better PRs",
"permissions": [
"contextMenus",
"*://*.github.com/*"
],
"optional_permissions": [
"http://*/*",
"https://*/*"
],
"background": {
"scripts": [
"background.js"
],
"persistent": false
},
"content_scripts": [
{
"matches": [
Expand All @@ -12,7 +23,8 @@
"run_at": "document_idle",
"js": [
"better_github_prs.js"
]
],
"css": []
}
],
"icons": {
Expand Down
7 changes: 5 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ const copyWebpackPlugins = [

module.exports = {
mode: process.env.NODE_ENV || 'development',
entry: path.join(__dirname, 'src', 'js', 'index.jsx'),
entry: {
better_github_prs: path.join(__dirname, 'src', 'js', 'index.jsx'),
background: path.join(__dirname, 'src', 'js', 'background.js')
},
output: {
path: path.join(__dirname, 'build'),
filename: 'better_github_prs.js'
filename: '[name].js'
},
module: {
rules: [
Expand Down
29 changes: 27 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2090,7 +2090,15 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1"
sha.js "^2.4.8"

cross-spawn@^6.0.0:
cross-env@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2"
integrity sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==
dependencies:
cross-spawn "^6.0.5"
is-windows "^1.0.0"

cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
Expand Down Expand Up @@ -4068,7 +4076,7 @@ is-typedarray@~1.0.0:
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=

is-windows@^1.0.2:
is-windows@^1.0.0, is-windows@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
Expand Down Expand Up @@ -6874,6 +6882,23 @@ wbuf@^1.1.0, wbuf@^1.7.3:
dependencies:
minimalistic-assert "^1.0.0"

webext-content-script-ping@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/webext-content-script-ping/-/webext-content-script-ping-2.0.1.tgz#efccbb795929631008dc08b21c5b34f6cb524b2a"
integrity sha512-37oaeT0GwwkIC8JUD5aToOr0ncdoml/kjZdsn5ckyKyZqpNQHYxhP3NhnqsSx25LpxGfJm8er/IPv9pzCLcfUA==

webext-domain-permission-toggle@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/webext-domain-permission-toggle/-/webext-domain-permission-toggle-0.1.0.tgz#82c0f611a075958e5b879fd77f69908236615607"
integrity sha512-zPwVKYa5EiH0htXedmoAWUaMqU7pOr+4dlzFyGVM64Q0jLVo3V8AVcYOVDKtY+c9qOkhtoSUCGcXCnbs5u8eNg==

webext-dynamic-content-scripts@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/webext-dynamic-content-scripts/-/webext-dynamic-content-scripts-5.0.2.tgz#cac7ebbe632303713c2bbe7a5181b032af61a11e"
integrity sha512-Y2FMB5Rz29UzQ7eUi9lcNUDeAAhvDDY7Ga1UcCbaHmu6ro3tJpJlzgk7HWaxOBuCtsfFyhZPmitC59n6PGlBFA==
dependencies:
webext-content-script-ping "^2.0.1"

webidl-conversions@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-2.0.1.tgz#3bf8258f7d318c7443c36f2e169402a1a6703506"
Expand Down

0 comments on commit ce6a167

Please sign in to comment.