1.8 KiB
Contributing
Prometheus uses Gerrit to manage reviews of pull-requests, and then Gerrit replicates its master branch to GitHub. In order to contribute to Prometheus, you must use Gerrit.
Setup
-
Sign in at http://review.prometheus.io/
-
Set a username and upload an SSH pubkey for git ssh access.
On OSX you can use
cat ~/.ssh/id_rsa.pub | pbcopy
to copy your public key to your clipboard so you can paste it. -
Clone the repo:
git clone http://review.prometheus.io/prometheus
-
Add your user-specific remote that you will push your changes to:
git remote add <your-remote-name> ssh://<username>@review.prometheus.io:29418/prometheus
-
Add Change-Id commit hook:
curl -o .git/hooks/commit-msg http://review.prometheus.io/tools/hooks/commit-msg
-
Make the file executable:
chmod u+x .git/hooks/commit-msg
-
Commit any local changes to git, then:
-
git push <your-remote-name> HEAD:refs/for/master
-
Assign reviewer for change at http://review.prometheus.io/
Getting Started
-
Reach out via our mailing list and ask us what the current priorities are. We can find a good isolated starter project for you.
-
Keeping code hygiene is important. We thusly have a practical preference for the following:
-
Run
make format
to ensure the correctness of the Go code's layout. -
Run
make advice
to find facial errors with a static analyzer. -
Try to capture your changes in some form of a test. Go makes it easy to write Table Driven Tests. There is no mandate to use this said scaffolding mechanism, but it can make your life easier in the right circumstances.
-
-
Welcome aboard!