Create end-to-end and quick start guides for new contributors#7568
Create end-to-end and quick start guides for new contributors#7568cramforce merged 5 commits intoampproject:masterfrom
Conversation
cramforce
left a comment
There was a problem hiding this comment.
Nice!
Are you planning to update DEVELOPING.md and CONTRIBUTING.md in a follow up?
|
|
||
| * Add this line to your hosts file (`/etc/hosts` on Mac or Linux, `%SystemRoot%\System32\drivers\etc\hosts` on Windows): | ||
|
|
||
| ```127.0.0.1 ads.localhost iframe.localhost``` |
There was a problem hiding this comment.
Renders fine, but maybe switch to multi line syntax to avoid confusing the highlighter here.
| * Change the suffix for the examples from .html to .max.html to use your local JavaScript. | ||
|
|
||
| # Test AMP | ||
| * Run the tests: `gulp test` |
There was a problem hiding this comment.
When I ran "gulp test --watch" I saw that it reran all tests and wondered why you'd want that. Then I saw the describe.only below and realized it works best when you do that.
Added bullet points for both (and updated the e2e guide).
|
|
||
| # Test AMP | ||
| * Run the tests: `gulp test` | ||
| * Run a single test: `gulp test --files=<filename` |
There was a problem hiding this comment.
I personally prefer the describe.only method because it allows switching the tested files without restarting gulp test. It is slightly harder to explain, though.
There was a problem hiding this comment.
I had to look this one up, and now it makes more sense why you'd run "gulp test --watch" since if you use describe.only it would only rerun those tests.
Added this as another bullet point.
| # Pull the latest changes | ||
|
|
||
| * `git checkout master` | ||
| * `git pull --rebase upstream master` |
There was a problem hiding this comment.
--rebase is not needed here since there are by definition no changes.
There was a problem hiding this comment.
@erwinmombay said the same, and then became convinced --rebase was needed after all. Erwin do you remember why?
I suppose since we're saying "never change master" then always at the tip of the history?
| * pull the latest changes as described above | ||
| * `git checkout <branch name>` | ||
| * `git push origin <branch name>` | ||
| * go to your fork on `https://github.com/<your username>/amphtml` |
There was a problem hiding this comment.
I use an easier process:
- go to https://github.com/ampproject/amphtml
- select the magic: "You have a new branch in your local fork, do you want to create a PR" button
There was a problem hiding this comment.
Made that the default, but mentioned the other way in case the banner doesn't show up. (I'm not sure how long GitHub shows the banner.)
| * choose your branch from the "Branch" dropdown and click "New pull request" | ||
| * make sure you've signed the CLA (using the same email address as your git config indicates) | ||
| * if your reviewer requests changes make them locally and then repeat the steps in this section to push the changes to your branch back up to GitHub again | ||
| * once approved your changes are merged into the amphtml repository by a core committer (you don't do this merge) |
There was a problem hiding this comment.
Maybe add
"If you don't get a new review within 2 business days, always feel free to ping the pull request by adding a comment."
| * if your reviewer requests changes make them locally and then repeat the steps in this section to push the changes to your branch back up to GitHub again | ||
| * once approved your changes are merged into the amphtml repository by a core committer (you don't do this merge) | ||
|
|
||
| # Delete your branch |
There was a problem hiding this comment.
Not sure if needed in this guide.
There was a problem hiding this comment.
I figured I'd be complete. Made it clear this was optional and that it was for after the changes are merged.
| # Pull the latest changes | ||
|
|
||
| * `git checkout master` | ||
| * `git pull --rebase upstream master` |
There was a problem hiding this comment.
@erwinmombay said the same, and then became convinced --rebase was needed after all. Erwin do you remember why?
I suppose since we're saying "never change master" then always at the tip of the history?
| * pull the latest changes as described above | ||
| * `git checkout <branch name>` | ||
| * `git push origin <branch name>` | ||
| * go to your fork on `https://github.com/<your username>/amphtml` |
There was a problem hiding this comment.
Made that the default, but mentioned the other way in case the banner doesn't show up. (I'm not sure how long GitHub shows the banner.)
| * choose your branch from the "Branch" dropdown and click "New pull request" | ||
| * make sure you've signed the CLA (using the same email address as your git config indicates) | ||
| * if your reviewer requests changes make them locally and then repeat the steps in this section to push the changes to your branch back up to GitHub again | ||
| * once approved your changes are merged into the amphtml repository by a core committer (you don't do this merge) |
| * if your reviewer requests changes make them locally and then repeat the steps in this section to push the changes to your branch back up to GitHub again | ||
| * once approved your changes are merged into the amphtml repository by a core committer (you don't do this merge) | ||
|
|
||
| # Delete your branch |
There was a problem hiding this comment.
I figured I'd be complete. Made it clear this was optional and that it was for after the changes are merged.
|
|
||
| * Add this line to your hosts file (`/etc/hosts` on Mac or Linux, `%SystemRoot%\System32\drivers\etc\hosts` on Windows): | ||
|
|
||
| ```127.0.0.1 ads.localhost iframe.localhost``` |
| * Change the suffix for the examples from .html to .max.html to use your local JavaScript. | ||
|
|
||
| # Test AMP | ||
| * Run the tests: `gulp test` |
There was a problem hiding this comment.
When I ran "gulp test --watch" I saw that it reran all tests and wondered why you'd want that. Then I saw the describe.only below and realized it works best when you do that.
Added bullet points for both (and updated the e2e guide).
|
|
||
| # Test AMP | ||
| * Run the tests: `gulp test` | ||
| * Run a single test: `gulp test --files=<filename` |
There was a problem hiding this comment.
I had to look this one up, and now it makes more sense why you'd run "gulp test --watch" since if you use describe.only it would only rerun those tests.
Added this as another bullet point.
mrjoro
left a comment
There was a problem hiding this comment.
I updated the instructions for yarn after actually running it. :)
|
|
||
| * Go to the master branch: `git checkout master` | ||
| * Delete your local branch: `git branch -D <branch name>` | ||
| * Delete the GitHub fork branch: `git push origin --delete <branch name>` |
There was a problem hiding this comment.
For follow up: Add information about AMP release cycle for when changes are expected to be available to all AMP pages!
Create guides to help new contributors who may not be familiar with Git/GitHub, Node, Gulp, etc.
cc @bpaduch @pbakaus @camelburrito