Skip to content
Unknwon edited this page Feb 10, 2016 · 7 revisions

This document describes requirements and best practices for contributing code (Pull Request) to Gogs project.

If you have/find any concern/problem with this document, DO NOT create an issue on this repository, instead, please go to Gitter and discuss.

Those We Do Accept

  1. Typos in template files or code comments.
  2. Bug fixes or feature implementations (be sure to discuss first).
  3. Issues that are labeled as help wanted (be sure to claim first to prevent two people work on the same thing).

Those We Do Not Accept

  1. We do not accept pull requests for locale files (conf/locale_xx-XX.ini files), please read the guide, except for conf/locale_en-US.ini file.

Coding Guidelines

  1. Please follow the general code convention for Go.
  2. All .go files must be formatted with gofmt (most of Go editors should be already possible to format on save).
  3. All .less and .tmpl files must use 1 tab as indention.
  4. NO modifications to .css files should be done by hand, .css files are all generated by .less files. Normally you can achieve this by executing make bindata.

For UI Changes

  1. Please use standard Semantic UI classes as much as possible to avoid editing .less files.
  2. Please attach corresponding screenshots for all representative pages that is affected by your changes.
  3. If you need to add new locale strings, you ONLY need to care about conf/locale_en-US.ini file, DO NOT touch all the other locales files.

Final Checks

  1. Currently, ALL pull requests must be sent to develop branch.
  2. Code review is VERY strict, please be prepared for benefiting future of this project.