We welcome pull requests! Follow these steps to contribute:
-
Find an issue that needs assistance.
-
Let us know you are working on it by posting a comment on the issue.
-
Follow the Contribution Guidelines to start working on the issue.
Working on your first Pull Request? You can learn how from this free series [How to Contribute to an Open Source Project on GitHub]
(https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
If you've found a bug that is not on the board, follow these steps.
- Creating a Pull Request
- Common Steps
- How We Review and Merge Pull Requests
- How We Close Stale Issues
- Next Steps
- Other Resources
Prerequisite | Version |
---|---|
Sencha | =6.1.2.15 |
Ruby | =2.3 |
Node.js | ~ ^4.0.0 |
npm (comes with Node) | ~ ^3.8.7 |
Updating to the latest releases is recommended.
If Node.js, ruby, or sencha cmd is already installed on your machine, run the following commands to validate the versions:
node -v
ruby -v
sencha
If your versions are lower than the prerequisite versions, you should update.
- Install Git or your favorite Git client.
- (Optional) Setup an SSH Key for GitHub.
- Go to the top level hamsket repository: https://github.com/TheGoddessInari/hamsket
- Click the "Fork" Button in the upper right hand corner of the interface (More Details Here)
- After the repository (repo) has been forked, you will be taken to your copy of the hamsket repo at https://github.com/yourUsername/hamsket
- Open a Terminal / Command Line / Bash Shell in your projects directory (i.e.:
/yourprojectdirectory/
) - Clone your fork of Hamsket
$ git clone https://github.com/yourUsername/hamsket.git
(make sure to replace yourUsername
with your GitHub username)
This will download the entire Hamsket repo to your projects directory.
- Change directory to the new Hamsket directory (
cd hamsket
) - Add a remote to the official Hamsket repo:
$ git remote add upstream https://github.com/TheGoddessInari/hamsket.git
Congratulations, you now have a local copy of the Hamsket repo!
Before you start working, you will need to create a separate branch specific to the issue / feature you're working on. You will push your work to this branch.
Name the branch something like fix/xxx
or feature/xxx
where xxx
is a short description of the changes or feature you are attempting to add. For example
fix/email-login
would be a branch where you fix something specific to email login.
To create a branch on your local machine (and switch to this branch):
$ git checkout -b [name_of_your_new_branch]
and to push to GitHub:
$ git push origin [name_of_your_new_branch]
If you need more help with branching, take a look at this.
Once you have Hamsket cloned, before you start the application, you first need to install all of the dependencies:
# Install NPM dependencies
npm install
$ npm start # in a new terminal
This bit is up to you!
The best way to find out any code you wish to change/add or remove is using the GitHub search bar at the top of the repository page. For example, you could search for a challenge name and the results will display all the files along with line numbers. Then you can proceed to the files and verify this is the area that you were looking forward to edit. Always feel free to reach out to the chat room when you are not certain of any thing specific in the code.
The services are stored inside the file ./app/store/ServicesList.js
. Add your service to the BOTTOM of the array.
The logo it's referencing is located in ./resources/icons/
.
To see these changes you'll need to stop your npm start
, and then rerun.
A pull request (PR) is a method of submitting proposed changes to the Hamsket repo (or any repo, for that matter). You will make changes to copies of the files which make up Hamsket in a personal fork, then apply to have them accepted by Hamsket proper.
Take away only one thing from this document: Never, EVER
make edits to the master
branch. ALWAYS make a new branch BEFORE you edit
files. This is critical, because if your PR is not accepted, your copy of
master
will be forever sullied and the only way to fix it is to delete your
fork and re-fork.
-
Once the edits have been committed, you will be prompted to create a pull request on your fork's GitHub Page.
-
By default, all pull requests should be against the Hamsket main repo,
master
branch. Make sure that your Base Fork is set to TheGoddessInari/hamsket when raising a Pull Request. -
Submit a pull request.
-
The title (also called the subject) of your PR should be descriptive of your changes and succinctly indicates what is being fixed.
-
Do not add the issue number in the PR title or commit message.
-
Examples:
Added Service servicename
Correct typo in menu
-
-
In the body of your PR include a more detailed summary of the changes you made and why.
- If the PR is meant to fix an existing bug/issue then, at the end of
your PR's description, append the keyword
closes
and #xxxx (where xxxx is the issue number). Example:closes #1337
. This tells GitHub to close the existing issue, if the PR is merged.
- If the PR is meant to fix an existing bug/issue then, at the end of
your PR's description, append the keyword
-
Indicate if you have tested on a local copy of the site or not.
Once your PR is accepted, you may delete the branch you created to submit it. This keeps your working fork clean.
You can do this with a press of a button on the GitHub PR interface. You can
delete the local copy of the branch with: git branch -D branch/to-delete-name
Don't despair! You should receive solid feedback as to why it was rejected and what changes are needed.
Many Pull Requests, especially first Pull Requests, require correction or updating. If you have used the GitHub interface to create your PR, you will need to close your PR, create a new branch, and re-submit.
If you have a local copy of the repo, you can make the requested changes and
amend your commit with: git commit --amend
This will update your existing
commit. When you push it to your fork you will need to do a force push to
overwrite your old commit: git push --force
Be sure to post in the PR conversation that you have made the requested changes.