Skip to content

Commit 0807b51

Browse files
authored
Merge pull request #9 from go-gitea/drone
Integrated drone and other standard files
2 parents a7ca712 + 61725ae commit 0807b51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+10046
-27
lines changed

.drone.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
workspace:
2+
base: /srv/app
3+
path: src/code.gitea.io/git
4+
5+
pipeline:
6+
testing:
7+
image: webhippie/golang:latest
8+
pull: true
9+
commands:
10+
- make clean
11+
- make vet
12+
# - make lint
13+
- make test
14+
- make build
15+
16+
coverage:
17+
image: plugins/coverage
18+
server: https://coverage.gitea.io
19+
20+
gitter:
21+
image: plugins/gitter

.drone.yml.sig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIGJhc2U6IC9zcnYvYXBwCiAgcGF0aDogc3JjL2NvZGUuZ2l0ZWEuaW8vZ2l0CgpwaXBlbGluZToKICB0ZXN0aW5nOgogICAgaW1hZ2U6IHdlYmhpcHBpZS9nb2xhbmc6bGF0ZXN0CiAgICBwdWxsOiB0cnVlCiAgICBjb21tYW5kczoKICAgICAgLSBtYWtlIGNsZWFuCiAgICAgIC0gbWFrZSB2ZXQKICAgICAgIyAtIG1ha2UgbGludAogICAgICAtIG1ha2UgdGVzdAogICAgICAtIG1ha2UgYnVpbGQKCiAgY292ZXJhZ2U6CiAgICBpbWFnZTogcGx1Z2lucy9jb3ZlcmFnZQogICAgc2VydmVyOiBodHRwczovL2NvdmVyYWdlLmdpdGVhLmlvCgogIGdpdHRlcjoKICAgIGltYWdlOiBwbHVnaW5zL2dpdHRlcgo.Ruc63CxGeoFPG_2vR0DosFzaj2ZWExBNO5C6OQRIMhU

.editorconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.go]
12+
indent_style = tab
13+
indent_size = 8
14+
15+
[*.tmpl]
16+
indent_style = tab
17+
indent_size = 2
18+
19+
[Makefile]
20+
indent_style = tab
21+
22+
[*.{less,yml}]
23+
indent_style = space
24+
indent_size = 2
25+
26+
[*.js]
27+
indent_style = space
28+
indent_size = 4

.github/issue_template.md

Whitespace-only changes.

.github/pull_request_template.md

Whitespace-only changes.

.gitignore

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
1-
.idea
1+
# Compiled Object files, Static and Dynamic libs (Shared Objects)
2+
*.o
3+
*.a
4+
*.so
5+
6+
# Folders
7+
_obj
8+
_test
9+
10+
# Architecture specific extensions/prefixes
11+
*.[568vq]
12+
[568vq].out
13+
14+
*.cgo1.go
15+
*.cgo2.c
16+
_cgo_defun.c
17+
_cgo_gotypes.go
18+
_cgo_export.*
19+
20+
_testmain.go
21+
22+
*.exe
23+
*.test
24+
*.prof
25+
26+
coverage.out

.lgtm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
self_approval_off = false
2+
ignore_maintainers_file = true

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Contribution Guidelines
2+
3+
## Introduction
4+
5+
This document explains how to contribute changes to the Gitea
6+
project. It assumes you have followed the [installation
7+
instructions](https://github.com/go-gitea/docs/tree/master/en-US/installation)
8+
9+
Sensitive security-related issues should be reported to
10+
11+
12+
## Bug reports
13+
14+
Please search the issues on the issue tracker with a variety of keywords
15+
to ensure your bug is not already reported.
16+
17+
If unique, [open an issue](https://github.com/go-gitea/gitea/issues/new)
18+
and answer the questions so we can understand and reproduce the
19+
problematic behavior.
20+
21+
The burden is on you to convince us that it is actually a bug
22+
in Gitea. This is easiest to do when you write clear, concise
23+
instructions so we can reproduce the behavior (even if it seems
24+
obvious). The more detailed and specific you are, the faster
25+
we will be able to help you. Check out [How to Report Bugs
26+
Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html).
27+
28+
Please be kind, remember that Gitea comes at no cost to you, and you're
29+
getting free help.
30+
31+
## Discuss your design
32+
33+
The project welcomes submissions but please let everyone know what
34+
you're working on if you want to change or add something to the Gitea
35+
repositories.
36+
37+
Before starting to write something new for the Gitea project, please
38+
[file an issue](https://github.com/go-gitea/gitea/issues/new).
39+
Significant changes must go through the [change proposal
40+
process](https://github.com/go-gitea/proposals) before they can be
41+
accepted.
42+
43+
This process gives everyone a chance to validate the design, helps
44+
prevent duplication of effort, and ensures that the idea fits inside
45+
the goals for the project and tools. It also checks that the design is
46+
sound before code is written; the code review tool is not the place for
47+
high-level discussions.
48+
49+
## Testing redux
50+
51+
Before sending code out for review, run all the tests for the whole
52+
tree to make sure the changes don't break other usage and keep the
53+
compatibility on upgrade:
54+
55+
After running for a while, the command should print
56+
57+
```
58+
ALL TESTS PASSED
59+
```
60+
61+
## Code review
62+
63+
Changes to Gitea must be reviewed before they are accepted, no matter
64+
who makes the change even if an owners or a maintainer. We use github's
65+
pull request workflow to do that and use [lgtm](http://lgtm.co) to ensure
66+
every PR is reviewed by at least 2 maintainers.
67+
68+
## Sign your work
69+
70+
The sign-off is a simple line at the end of the explanation for the
71+
patch. Your signature certifies that you wrote the patch or otherwise
72+
have the right to pass it on as an open-source patch. The rules are
73+
pretty simple: If you can certify [DCO](DCO), then you just add a line
74+
to every git commit message:
75+
76+
```
77+
Signed-off-by: Joe Smith <[email protected]>
78+
```
79+
80+
Please use your real name, we really dislike pseudonyms or anonymous
81+
contributions. We are in the opensource world without secrets. If you
82+
set your `user.name` and `user.email` git configs, you can sign your
83+
commit automatically with `git commit -s`.
84+
85+
## Contributors
86+
87+
Everyone who sent a PR to Gitea that gets accepted will
88+
be as a contributor. Please send a PR to add your name to
89+
[CONTRIBUTORS](CONTRIBUTORS). For the format, see the
90+
[CONTRIBUTORS](CONTRIBUTORS).
91+
92+
## Maintainers
93+
94+
To make sure every PR have been checked, we make a team maintainers. Any
95+
PR MUST be reviewed and by at least two maintainers before it can
96+
get merged. Maintainers should be a contributor of gitea(or gogs) and
97+
contributed at least 4 accepted PRs. And a contributor should apply as a
98+
maintainer in [gitter Gitea develop](https://gitter.im/go-gitea/develop).
99+
And the owners or the team maintainer could invite the contributor. A
100+
maintainer should spend some time on code reviews. If some maintainer
101+
have no time to do that, he should apply to leave maintainers team and
102+
we will give him an honor to be as a member of advisor team. Of course,
103+
if an advisor have time to code view, welcome it back to maintainers team.
104+
If some one have no time to code view and forget to leave the maintainers,
105+
the owners have the power to move him from maintainers team to advisors
106+
team.
107+
108+
## Owners
109+
110+
Since Gitea is a pure community organization without any company
111+
support, to keep the development healthly We will elect the owners every
112+
year. Every time we will elect three owners. All the contributers could
113+
vote for three owners, one is the main owner, the other two are assistant
114+
owners. When the new owners have been elected, the old owners MUST move
115+
the power to the new owners. If some owner don't obey these rules,
116+
the other owners are allowed to revoke his owner status.
117+
118+
After the election, the new owners should say he agrees with these
119+
rules on the [CONTRIBUTING](CONTRIBUTING.md) on the [Gitter Gitea
120+
Channel](https://gitter.im/go-gitea/gitea). Below is the word to speak
121+
122+
```
123+
I'm glad to be an owner of Gitea,
124+
I agree with [CONTRIBUTING](CONTRIBUTING.md).
125+
I will spend part of my time on gitea
126+
and lead the development of gitea.
127+
```
128+
129+
For a honor to the owners, this document will add the history owners
130+
below:
131+
132+
2016-11-04 ~ 2017-12-31
133+
134+
135+
- tboerger <[email protected]>
136+
- bkcsoft <[email protected]>
137+
138+
## Versions
139+
140+
Gitea has one master as a tip branch and have many version branch
141+
such as v0.9. v0.9 is a release branch and we will tag v0.9.0 both for
142+
binary download. If v0.9.0 have some bugs, we will accept PR on v0.9
143+
and publish v0.9.1 and merge bug PR to master.
144+
145+
Branch master is a tip version, so if you wish a production usage,
146+
please download the latest release tag version. All the branch will be
147+
protected via github, All the PRs to all the branches should be review
148+
by two maintainers and pass the automatic tests.
149+
150+
## Copyright
151+
152+
Code that you contribute should use the standard copyright header:
153+
154+
```
155+
// Copyright 2016 - 2017 The Gitea Authors. All rights reserved.
156+
// Use of this source code is governed by a MIT-style
157+
// license that can be found in the LICENSE file.
158+
```
159+
160+
Files in the repository are copyright the year they are added and the
161+
year they are last changed. If the copyright author is changed, just
162+
copy the head below the old one.

CONTRIBUTORS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Andrey Nering <[email protected]> (@andreynering)
2+
Kim Carlbäcker <[email protected]> (@bkcsoft)
3+
LefsFlare <[email protected]> (@LefsFlarey)
4+
Lunny Xiao <[email protected]> (@lunny)
5+
Rachid Zarouali <[email protected]> (@xinity)
6+
Rémy Boulanouar <[email protected]> (@DblK)
7+
Sandro Santilli <[email protected]> (@strk)
8+
Thibault Meyer <[email protected]> (@0xbaadf00d)
9+
Thomas Boerger <[email protected]> (@tboerger)

DCO

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Developer Certificate of Origin
2+
Version 1.1
3+
4+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
5+
660 York Street, Suite 102,
6+
San Francisco, CA 94110 USA
7+
8+
Everyone is permitted to copy and distribute verbatim copies of this
9+
license document, but changing it is not allowed.
10+
11+
12+
Developer's Certificate of Origin 1.1
13+
14+
By making a contribution to this project, I certify that:
15+
16+
(a) The contribution was created in whole or in part by me and I
17+
have the right to submit it under the open source license
18+
indicated in the file; or
19+
20+
(b) The contribution is based upon previous work that, to the best
21+
of my knowledge, is covered under an appropriate open source
22+
license and I have the right under that license to submit that
23+
work with modifications, whether created in whole or in part
24+
by me, under the same open source license (unless I am
25+
permitted to submit under a different license), as indicated
26+
in the file; or
27+
28+
(c) The contribution was provided directly to me by some other
29+
person who certified (a), (b) or (c) and I have not modified
30+
it.
31+
32+
(d) I understand and agree that this project and the contribution
33+
are public and that a record of the contribution (including all
34+
personal information I submit with it, including my sign-off) is
35+
maintained indefinitely and may be redistributed consistent with
36+
this project or the open source license(s) involved.

LICENSE

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Copyright (c) 2015 All Gogs Contributors
1+
Copyright (c) 2016 The Gitea Authors
2+
Copyright (c) 2014 The Gogs Authors
23

34
Permission is hereby granted, free of charge, to any person obtaining a copy
45
of this software and associated documentation files (the "Software"), to deal
@@ -16,4 +17,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1617
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1718
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1819
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19-
THE SOFTWARE.
20+
THE SOFTWARE.

MAINTAINERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Andrey Nering <[email protected]> (@andreynering)
2+
Kim Carlbäcker <[email protected]> (@bkcsoft)
3+
LefsFlare <[email protected]> (@LefsFlarey)
4+
Lunny Xiao <[email protected]> (@lunny)
5+
Matthias Loibl <[email protected]> (@metalmatze)
6+
Rachid Zarouali <[email protected]> (@xinity)
7+
Rémy Boulanouar <[email protected]> (@DblK)
8+
Sandro Santilli <[email protected]> (@strk)
9+
Thibault Meyer <[email protected]> (@0xbaadf00d)
10+
Thomas Boerger <[email protected]> (@tboerger)

Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
IMPORT := code.gitea.io/git
2+
3+
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
4+
GENERATE ?= code.gitea.io/git
5+
6+
.PHONY: all
7+
all: clean test build
8+
9+
.PHONY: clean
10+
clean:
11+
go clean -i ./...
12+
13+
generate:
14+
@which mockery > /dev/null; if [ $$? -ne 0 ]; then \
15+
go get -u github.com/vektra/mockery/...; \
16+
fi
17+
go generate $(GENERATE)
18+
19+
.PHONY: fmt
20+
fmt:
21+
go fmt $(PACKAGES)
22+
23+
.PHONY: vet
24+
vet:
25+
go vet $(PACKAGES)
26+
27+
.PHONY: lint
28+
lint:
29+
@which golint > /dev/null; if [ $$? -ne 0 ]; then \
30+
go get -u github.com/golang/lint/golint; \
31+
fi
32+
for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;
33+
34+
.PHONY: test
35+
test:
36+
for PKG in $(PACKAGES); do go test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done;
37+
38+
.PHONY: build
39+
build:
40+
go build .

0 commit comments

Comments
 (0)