Skip to content

Latest commit

 

History

History
132 lines (110 loc) · 3.99 KB

CONTRIBUTING.md

File metadata and controls

132 lines (110 loc) · 3.99 KB

Contribution Guideline

Git workflow

First time setup

[Fork the repo if you are outside collaborator https://github.com/iluminar/goodwork. ]

  1. Clone the project to your local pc
$ git clone [email protected]:iluminar/goodwork.git

for outside collaborator

$ git clone [email protected]:{yourusername}/goodwork.git
  1. Configure remotes:
$ cd goodwork
$ git remote add origin [email protected]:iluminar/goodwork.git
  1. Setup application
$ git checkout dev
$ git pull origin dev
$ composer install
$ cp .env.example .env
$ php artisan key:generate
$ npm install

N.B: If you get this error

[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Laravel\Dusk\DuskServiceProvider' not found"

run this command

$ composer update

Regular workflow

  1. Create a branch for new issue (the branch name should be as “issue[number]”. E.g. – “issue7”):
$ git checkout -b issue[number]
  1. Develop on issue[number] branch, but Do not merge the upstream master with your development branch!!
  2. Run test to ensure all tests are passed before commiting
  3. Commit changes to issue[number] branch:
$ git add .
$ git commit -m "commit message"
  1. Push branch to Github:
$ git push origin issue[number]
  1. Repeat steps 2-5 till development is complete.
  2. Fetch upstream changes that were done by other contributors:
$ git fetch origin
  1. Update local dev branch:
$ git checkout dev
$ git pull origin dev
  1. Rebase issue[number] branch on top of the upstream dev:
$ git checkout issue[number]
$ git rebase dev
  1. In the process of the rebase, it may discover conflicts. In that case it will stop and allow you to fix the conflicts. After fixing conflicts,run all test to ensure nothing breaks and then just run:
$ git add .
$ git rebase --continue
  1. Push branch to GitHub (force changes to your issue branch, it is not a common branch). Rebasing means recreation of commits, so noway to push without force. NEVER force to common branch.:
$ git push origin issue[number] --force
  1. Send a Pull Request. Attention: Please, recheck that in your pull request you send only your changes, and no other changes!! Check it by command:
$ git diff issue[number] upstream/dev
  1. Remove issue branch after successful pull request:
$ git branch -D issue[number]
$ git push origin :issue[number]

N.B:

  • Never push to master or dev branch
  • Work on feature branch
  • Don't name your local working branch feature, rather give it name of your task id e.g issue7
  • Test before you push. Do not push half-done work.
  • Create a pull request in dev branch
  • Code will be reviewed by peers, if everything seems right then code will be merged

Commit and messages

  • Commit message should be brief but descriptive enough to convey the message of what has been done in this commit, example

Add delete user option in the dashboard

Or like this

Replace jQuery onReady listener with plain JS; fixes #13

  • Add issue number in final commit message when the task is complete

Coding style

Goodwork follows the PSR-2 coding standard and the PSR-4 autoloading standard.

Project workflow

  • All the task will be created as a issue with appropriate label and milestone
  • All the task will also be available in project board of the repository
  • By default all task will be at Backlog column
  • You can self-assign yourself to a task or task can be assigned to you
  • When a member start a task, the card should be moved to In Progress column
  • When someone test a task other than the original contributor after task is complete it should be placed in In Review
  • When a task is reviewed by a peer the task should be placed in Done column
  • Only one member should work in a single task