-
Notifications
You must be signed in to change notification settings - Fork 19
Home
The goal of this guide is to help you to contribute to Alignak. We give info about files and folders of repository and procedure to commit.
- alignak folder of python library Alignak *
- test forlder where you find all tests, used to maintain Alignak in a good health ;)
- AUTHORS file where find all contributors of Alignak
- libexec some scripts useful in some cases (nsca, libvirt...)
- manpages manpages of shinken commands
- setup.py file used to install Alignak (directly or througth pip)
There is a minimal number of branches in the repository to be simple:
- master this branch is the branch of the current stable release
- develop this branch is the branch where add new features for the next stable release
Nobody commit code directly in the official repository (core developers included)! We work only with pull request (PR). A pull request is:
- a branch on a forked repository of alignak (in this case, a forked version in your github repository)
- one feature or one fix only. If you have many features / fixes, create one pull request for each
- contain tests (of course)
When the pull request is created, one of core developers check your pull request.
Possible actions when the pull request has been reviewed:
-
it's ok, nice ;)
- core developper accept the pull request and merge it in the official repository
-
it's not ok, core developper add comment in the pull request to inform the problem. This is some possible reasons:
- tests not ok (each pull request run tests and you can see if your pull request not create problems)
- tests are missing
- not aggree with the code (syntax, implementation...)
- clone the official repository
git clone [email protected]:Alignak-monitoring/alignak.git
- in github interface fork the officiel repository in your account space (for example, we use myspace)
TODO: screenshot
- add your forked repository in local git
git remote add myalignak [email protected]:myspace/alignak.git
- get all branches of your forker repository
git fetch myalignak
- Be sure you are in branch develop
git checkout develop
- create a new branch in local for you feature or fix
git branch master+nameofyourfeatureorfix
- go in this branch
git checkout master+nameofyourfeatureofrix
- write your code + tests ;)
Let's go: think, write, think, write, think, write ^^
- Add your name
Add your name in file /AUTHORS if it is not in this. It's the list of persons have contributed to the project
6, check if your code is ok (like indentation...)
pep8 --max-line-length=100 --ignore=E303,E302,E301,E241 --exclude='.pyc' alignak/
- commit your changes
git add filex1 filex2 git commit -t "message for the commit"
- when finished, push your branch in your forked repository
git push myalignak master+nameofyourfeatureorfix:master+nameofyourfeatureorfix
-
Go in github and gituhp propose you to create pull request from your branch and the develop branch of the official Alignak repository
-
If you want to create another feature/fix, go to 1. ;)
Don't be affraid, It's very simple:
- in your local repository, go in the branch of your pull request
git checkout master+nameofyourfeatureoffix
- make the changes and commit
git add filex1 filex2 git commit -t "message for the commit"
- update your local branch in your forked repository
git push myalignak master+nameofyourfeatureoffix:master+nameofyourfeatureoffix
- your new commit is automatically added in the pull request
We have multiple ways to chat:
- IRC, channel #alignak on freenode
- mailing list developers
- gitter on github
- github issues for questions of new features / fixes