mirror of
https://github.com/gogs/gogs.git
synced 2025-07-13 07:38:51 +00:00
Page:
Contributing Code
Clone
22
Contributing Code
ᴜɴᴋɴᴡᴏɴ edited this page 2020-02-22 13:18:42 +08:00
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 in this repository, instead, please go to Gogs Discussion and discuss.
Before you start
Those we do accept
- Typos in template files or code comments.
- Bug fixes or feature implementations (be sure to discuss first).
- Issues that are labeled as help wanted and good first issue (be sure to claim first to prevent two people work on the same thing!).
Those we do not accept
- We do not accept pull requests for locale files (
conf/locale_xx-XX.ini
files), please read the guide, except forconf/locale_en-US.ini
file. - Docker compose file.
- Pull request with a lot of changed files; we have rights to deny any pull requests that we considered too large to take time to review.
Make a claim
Write a comment to the corresponding thread to claim you're working on it, so people wouldn't have conflict on what they're working on.
Coding guidelines
- Please follow the Sourcegraph's Go style guide.
- All
.go
files must be formatted withgofmt
. - All
.less
and.tmpl
files must use 1 tab as indention. - NO direct modifications to
.css
files,.css
files are all generated by.less
files. Normally you can achieve this by executingmake less
.
For UI changes
- Please use standard Semantic UI classes as much as possible to avoid editing
.less
files. - Please attach corresponding screenshots for all representative pages that is affected by your changes.
- 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
- There is no guarantees that your pull request will be merged.
- Please expect code review being VERY strict, be prepared for benefiting future of this project.