You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
7. If you want to discuss your code or ask questions, please comment in the corresponding issue. You can link to the code you have pushed to your repository to ask for code review.
108
133
109
-
8. When your code is ready to be integrated into the project, use the GitHub site to send a pull request to `webcompat.com:master`, aka the master branch of the repo you forked from. This will be the default choice.
134
+
8. When your code is ready to be integrated into the project, use the GitHub site to send a [pull request](https://help.github.com/articles/creating-a-pull-request) to `webcompat.com:master`, aka the master branch of the repo you forked from. This will be the default choice.
9. Set the title of the pull request to reference the issue number.
138
+
9. Set the title of the pull request to reference the issue number. Please keep the title short, but descriptive or it will be cut off. You can provide further information in the commit body.
114
139
115
-
`Fixes #123 - Fixes broken layout on mobile browsers`
140
+
`Fixes #NumberOfIssue - Fixes broken layout on mobile browsers`
141
+
> Note: `Fix` or `Fixes` are keywords recognized automatically and will close the issue when the pull request gets merged.
116
142
117
143
10. When sending the pull request do not forget to call out someone for review by using the following convention:
118
144
119
145
`r? @miketaylr`
120
146
121
-
This will notify the person that your request is waiting for a review for merging. Ask a review only by one person, this will avoid misunderstandings and the ball is dropped. (Python: karlcow, miketaylr. JavaScript: magsout, miketaylr, tagawaCSS: magsout).
147
+
This will notify the person that your request is waiting for a review for merging. Ask a review only by one person, this will avoid misunderstandings and the ball is dropped. (Python: karlcow, miketaylr. JavaScript: magsout, miketaylr, tagawa, zoepage CSS: magsout, zoepage).
122
148
123
149
11. Continue discussion in the pull request.
124
150
@@ -247,11 +273,13 @@ cd webcompat.com
247
273
# check out submodules
248
274
npm run module
249
275
# initializing project
250
-
[sudo] npm run setup
276
+
npm run setup
251
277
```
252
278
253
279
**Note**: if you got an error message, you may need to [install pip](#installing-pip) before running `make install` again.
254
280
281
+
**Note**: if you get an error message about missing rights to install the setup through npm, please *do not run `sudo npm`*. You just need to [fix you permissions](https://coderwall.com/p/t2mc9g/don-t-sudo-npm) for`usr/local`.
We use [Grunt](http://gruntjs.com/) as a task runner to perform certain tasks (minify + concat JS assets, for example). You need to have [Node.js](https://nodejs.org/en/download/) installed to be able to run Grunt. Once that's done, `npm` can be used to install Grunt and other build dependencies.
311
339
312
-
First install the `grunt-cli` tool:
313
340
314
341
``` bash
315
-
[sudo] npm install -g grunt-cli
316
-
[sudo] npm install
317
-
grunt
342
+
npm install
343
+
npm run build
318
344
```
319
345
346
+
**Note**: if you get an error message about missing rights to install the setup through npm, please *do not run `sudo npm`*. You just need to [fix you permissions](https://coderwall.com/p/t2mc9g/don-t-sudo-npm) for `usr/local`.
347
+
320
348
### Configuring The Server
321
349
322
350
To test issue submission, you need to create a repository on GitHub. Create a new repository make note of the name. For example, the user `miketaylr` has created a repository called "[test-repo](https://github.com/miketaylr/test-repo)" for this purpose.
@@ -337,19 +365,23 @@ You can now edit `secrets.py` and
337
365
338
366
2. You have the option of creating a "bot account" (a dummy account for the purpose of testing), or using your own account forlocal development. Either way, you'll need a personal access token to proceed — this is the oauth token we use to report issues on behalf of people who don't want to give GitHub oauth access (or don't have GitHub accounts).
339
367
340
-
The [instructions for creating a personal access token](http://help.github.com/articles/creating-an-access-token-for-command-line-use) are given on GitHub. Select public_repo to grant access to the public repositories through the personal access token. Once you have created the token you can add it in the variable `OAUTH_TOKEN = ""` (yes, even if you're using your own credentials we still refer to it as a bot). More advanced users might want to create an environment variable called `OAUTH_TOKEN`. Either way is fine.
368
+
The [instructions for creating a personal access token](http://help.github.com/articles/creating-an-access-token-for-command-line-use) are given on GitHub. Select public_repo to grant access to the public repositories through the personal access token. Once you have created the token you can add it in the variable `OAUTH_TOKEN = ""`. More advanced users might want to create an environment variable called `OAUTH_TOKEN`. Either way is fine.
341
369
342
370
3. Add the client id and client secret to secrets.py. If you're part of the webcompat GitHub organization, you can [get the client id and client secret from GitHub](https://github.com/organizations/webcompat/settings/applications/). Otherwise, create your own test and production applications ([instructions here](https://github.com/settings/applications/new)) — when prompted for a "Authorization callback URL", use `http://localhost:5000/callback`,(Cloud 9 users should use `http://yourapp.c9users.io:8000/callback`instead) and take note of the client id and client secret GitHub gives you.
343
371
344
-
When you have the client id and client secret put them in the corresponding lines in secrets.py for the localhost application:
372
+
When you have the client id and client secret put them in the corresponding lines in secrets.py for the localhost application:
345
373
346
-
```
347
-
# We're running on localhost, use the test application
348
-
GITHUB_CLIENT_ID = os.environ.get('FAKE_ID') or "<client id goes here>"
349
-
GITHUB_CLIENT_SECRET = os.environ.get('FAKE_SECRET') or "<client secret goes here>"
350
-
```
374
+
```
375
+
# We're running on localhost, use the test application
376
+
GITHUB_CLIENT_ID = os.environ.get('FAKE_ID') or "<client id goes here>"
377
+
GITHUB_CLIENT_SECRET = os.environ.get('FAKE_SECRET') or "<client secret goes here>"
378
+
```
379
+
380
+
> Note: You can ignore the `FAKE_ID` and `FAKE_SECRET` environment variables, we use that as a hack for automated tests.
381
+
382
+
4. Click on login to authorize the application and get access to the issues.
383
+

351
384
352
-
> Note: You can ignore the `FAKE_ID` and `FAKE_SECRET` environment variables, we use that as a hack for automated tests.
353
385
354
386
>**Note**: If you get a 404 at GitHub when clicking "Login", it means you haven't filled in the `GITHUB_CLIENT_ID` or `GITHUB_CLIENT_SECRET` in secrets.py.
355
387
@@ -375,7 +407,7 @@ You should now have a local instance of the site running at `http://localhost:50
375
407
376
408
After certain kinds of changes are made, you need to build the project before serving it from a webserver will work
377
409
378
-
* CSS: a build will run cssnext, combine custom media queries, and concat all source files into webcompat.dev.css. You'll need to re-build the CSS to see any changes, so it's recommended to use a watch task (see `make watch` or `grunt watch`).
410
+
* CSS: a build will run cssnext, combine custom media queries, and concat all source files into webcompat.dev.css. You'll need to re-build the CSS to see any changes, so it's recommended to use a watch task (see `npm run watch`).
379
411
* JS: a build will run eslint, minify and concat source files.
380
412
* HTML templates: the changes should be served from disk without the need for rebuilding
381
413
* Python: the Flask local server will detect changes and restart automatically. No need to re-build.
@@ -415,7 +447,7 @@ Fixing static JS files with project coding styles, if an error occurs.
415
447
npm run fix
416
448
```
417
449
418
-
By default, a build will *not* optimize images (which is done before deploys). If you'd like to optimize images, you can run `grunt imagemin`.
450
+
By default, a build will *not* optimize images (which is done before deploys). If you'd like to optimize images, you can run `npm run imagemin`.
0 commit comments