forked from desktop/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
expand CONTRIBUTING to be more meaningful
- Loading branch information
Showing
4 changed files
with
207 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,93 @@ | ||
# How We Work | ||
|
||
All changes are reviewed and the entire team is responsible for doing review. | ||
|
||
The usual flow: | ||
|
||
1. **Contributor** opens pull request. | ||
2. If they're still working on it, they preface the title with `[WIP]` (**W**ork **I**n **P**rogress). | ||
3. When it's ready for review, they comment on it saying so. | ||
4. Suddenly a wild **reviewer** appears! | ||
5. **Reviewer** assigns the PR to themselves. | ||
6. **Reviewer** leaves line comments with suggestions or questions. | ||
7. When the **reviewer** is done they comment on the PR with an emoji, meme, pokémon, or words. | ||
8. The **contributor** responds to feedback, makes changes, etc. | ||
9. When the **contributor** is ready for the **reviewer** to re-review, they comment on the PR with an emoji, meme, pokémon, or words. | ||
10. Goto 6 until both parties are happy with the PR. | ||
11. The **reviewer** hits the big green merge button and deletes the branch. | ||
# Contributing to GitHub Desktop | ||
|
||
Please take some time out to read these resources before you start contributing | ||
changes to GitHub Desktop. | ||
|
||
## Setup | ||
|
||
You will need to install these tools: | ||
|
||
- [Nodejs](https://nodejs.org) v7 is preferred as it's the version embedded into Electron | ||
- **Windows developers**: Make sure you allow the Node.js installer to add | ||
node to the PATH, it'll make life much easier for you. | ||
- Python 2.7 - [Windows](https://www.python.org/downloads/windows/), [macOS](https://www.python.org/downloads/mac-osx/) | ||
- **Windows developers**: Let python install into the default suggested path | ||
(`c:\Python27`), otherwise you'll have to configure node-gyp manually with | ||
the path which is annoying. | ||
- **macOS:** Xcode and Xcode Command Line Tools (Xcode -> Preferences -> Downloads) | ||
- **Windows:** Visual Studio 2015 or [Visual C++ Build Tools](http://go.microsoft.com/fwlink/?LinkId=691126) | ||
- Run `npm config set msvs_version 2015` after installing the build tools | ||
|
||
With these things installed, open a shell and validate your output to these commands looks like this: | ||
|
||
``` | ||
> node -v | ||
v7.8.0 | ||
> npm -v | ||
4.2.0 | ||
> python --version | ||
Python 2.7.13 | ||
``` | ||
|
||
We also have some [additional resources](./docs/contributing/tooling.md) to help you configure | ||
favourite editor to work nicely with the GitHub Desktop repository. | ||
|
||
## Building | ||
|
||
After cloning the repository, the typical workflow to get the app up and running | ||
is as follows: | ||
|
||
* Run `npm install` to get all required dependencies on your machine. | ||
* Run `npm run build:dev` to make a development build of the app. | ||
* Run `npm start` to launch the application. Changes will be compiled in the | ||
background. The app can then be reloaded to see the changes (Ctrl/Command+R). | ||
|
||
If you've made changes in the main-process folder you need to run `npm run | ||
rebuild:dev` and then `npm run start` for these changes to be reflected. | ||
|
||
If you're still encountering issues with building, refer to our | ||
[troubleshooting](./docs/contributing/troubleshooting.md) guide for more common | ||
problems. | ||
|
||
## Running tests | ||
|
||
- `npm test` - Runs all unit and integration tests | ||
- `npm run test:unit` - Runs all unit tests | ||
- `npm run test:integration` - Runs all integration tests | ||
|
||
**Pro Tip:** If you're only interested in the results of a single test and don't | ||
wish to run the entire test suite to see it you can pass along a search string | ||
in order to only run the tests that match that string. | ||
|
||
``` | ||
npm run test:unit -- --grep CloneProgressParser | ||
``` | ||
|
||
This example will run all tests matching `CloneProgressParser`. | ||
|
||
## Debugging | ||
|
||
Electron ships with Chrome Dev Tools to assist with debugging, profiling and | ||
other measurement tools. | ||
|
||
1. Run the command `npm start` to launch the app | ||
2. Open _Chrome Dev Tools_ | ||
|
||
[React Dev | ||
Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) | ||
should automatically install itself on first start when in development mode. | ||
|
||
If you would also like to use [Devtron](http://electron.atom.io/devtron/), run | ||
the command `require('devtron').install()` inside of the console in _Chrome Dev | ||
Tools_. | ||
|
||
## The Next Steps | ||
|
||
You've made it to here, so let's give you some other things to read to get you started: | ||
|
||
- [Up for Grabs](./docs/process/up-for-grabs.md) - we've marked some tasks in | ||
the backlog that are ideal for external contributors | ||
- [Code Reviews](./docs/process/reviews.md) - some notes on how the team does | ||
code reviews |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Tooling Support for GitHub Desktop | ||
|
||
## [Atom](https://atom.io/) | ||
|
||
Here are some plugins you should also install: | ||
|
||
* [atom-typescript](https://atom.io/packages/atom-typescript) - Syntax highlighting and intellisense for TypeScript | ||
* [atom-build-npm-apm](https://atom.io/packages/build-npm-apm) - Lets you invoke all npm scripts straight from the editor by pressing F7 (requires [atom-build](https://atom.io/packages/build)) | ||
* [linter](https://atom.io/packages/linter) and [linter-tslint](https://atom.io/packages/linter-tslint) - Shows linter errors and warning in the editor | ||
|
||
## [Visual Studio Code](https://code.visualstudio.com/) | ||
|
||
The Desktop repository includes a list of extensions that we recommend: | ||
|
||
1. While in the _Extension_ view, select *Show Workspace Recommended Extensions* from the dropdown menu | ||
2. Install all the extensions | ||
|
||
We also support debugging the running app inside VSCode: | ||
|
||
1. Run the command `npm run debug` | ||
2. Select the _Debug_ view from the view bar | ||
3. Select the process you would like to attach to (this will usually be the _Renderer_ process) | ||
4. Press `F5` or the green play button | ||
|
||
 | ||
|
||
|
||
|
||
|
||
## Debugging | ||
|
||
### Chrome | ||
|
||
1. Run the command `npm run start` | ||
2. Open _Chrome Dev Tools_ | ||
|
||
[React Dev Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) should automatically install itself on first start. If you would also like to use [Devtron](http://electron.atom.io/devtron/), run the command `require('devtron').install()` inside of the console in _Chrome Dev Tools_. | ||
|
||
### VS Code | ||
|
||
1. Run the command `npm run debug` | ||
2. Select the _Debug_ view from the view bar | ||
3. Select the process you would like to attach to (this will usually be the _Renderer_ process) | ||
4. Press `F5` or the green play button | ||
|
||
 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Known Issues | ||
|
||
Here's a non-exhaustive list of environmental issues that you may encounter | ||
while working on GitHub Desktop: | ||
|
||
### Issues compiling node-keytar on Windows | ||
|
||
If keytar fails to build on Windows with the following error during `npm install`: | ||
|
||
``` | ||
npm ERR! keytar@3.0.2 install: `node-gyp rebuild` | ||
npm ERR! Exit status 1 | ||
npm ERR! | ||
npm ERR! Failed at the keytar@3.0.2 install script 'node-gyp rebuild'. | ||
npm ERR! Make sure you have the latest version of node.js and npm installed. | ||
npm ERR! If you do, this is most likely a problem with the keytar package, | ||
npm ERR! not with npm itself. | ||
npm ERR! Tell the author that this fails on your system: | ||
npm ERR! node-gyp rebuild | ||
npm ERR! You can get information on how to open an issue for this project with: | ||
npm ERR! npm bugs keytar | ||
npm ERR! Or if that isn't available, you can get their info via: | ||
npm ERR! npm owner ls keytar | ||
``` | ||
|
||
Make sure you're using npm >= 2.15.9 | ||
|
||
``` | ||
PS> npm -g install npm@latest | ||
``` | ||
|
||
and run `npm install` again | ||
|
||
See https://github.com/atom/node-keytar/issues/45 and | ||
https://github.com/nodejs/node-gyp/issues/972 for more information. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters