Skip to content

Commit 9f10f71

Browse files
author
Magnus Lindvall
committed
Merge remote-tracking branch 'upstream/master'
2 parents 3b75a05 + 81b4d38 commit 9f10f71

File tree

372 files changed

+48529
-2509
lines changed

Some content is hidden

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

372 files changed

+48529
-2509
lines changed

.drone.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
workspace:
2-
base: /srv/app
2+
base: /go
33
path: src/code.gitea.io/gitea
44

55
clone:
@@ -56,21 +56,18 @@ pipeline:
5656
event: [ push, tag, pull_request ]
5757

5858
build-without-gcc:
59-
image: webhippie/golang:1.8
59+
image: golang:1.8
6060
pull: true
61-
environment:
62-
GOPATH: /srv/app
6361
commands:
6462
- go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
6563
when:
6664
event: [ push, tag, pull_request ]
6765

6866
build:
69-
image: webhippie/golang:edge
67+
image: golang:1.10
7068
pull: true
7169
environment:
7270
TAGS: bindata sqlite
73-
GOPATH: /srv/app
7471
commands:
7572
- make clean
7673
- make generate
@@ -85,99 +82,100 @@ pipeline:
8582
event: [ push, tag, pull_request ]
8683

8784
test:
88-
image: webhippie/golang:edge
85+
image: golang:1.10
8986
pull: true
9087
group: test
9188
environment:
9289
TAGS: bindata sqlite
93-
GOPATH: /srv/app
9490
commands:
9591
- make unit-test-coverage
9692
when:
9793
event: [ push, pull_request ]
9894
branch: [ master ]
9995

10096
test:
101-
image: webhippie/golang:edge
97+
image: golang:1.10
10298
pull: true
10399
group: test
104100
environment:
105101
TAGS: bindata sqlite
106-
GOPATH: /srv/app
107102
commands:
108103
- make test
109104
when:
110105
event: [ push, pull_request ]
111106
branch: [ release/* ]
112107

113108
test:
114-
image: webhippie/golang:edge
109+
image: golang:1.10
115110
pull: true
116111
group: test
117112
environment:
118113
TAGS: bindata
119-
GOPATH: /srv/app
120114
commands:
121115
- make test
122116
when:
123117
event: [ tag ]
124118

125119
# Commented until db locking have been resolved!
126120
# test-sqlite:
127-
# image: webhippie/golang:edge
121+
# image: golang:1.10
128122
# pull: true
129123
# group: test
130124
# environment:
131125
# TAGS: bindata
132-
# GOPATH: /srv/app
133126
# commands:
134127
# - make test-sqlite
135128
# when:
136129
# event: [ push, tag, pull_request ]
137130

138131
test-mysql:
139-
image: webhippie/golang:edge
132+
image: golang:1.10
140133
pull: true
141134
group: test
142135
environment:
143136
TAGS: bindata
144-
GOPATH: /srv/app
137+
TEST_LDAP: "1"
145138
commands:
139+
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
140+
- apt-get install -y git-lfs
146141
- make integration-test-coverage
147142
when:
148143
event: [ push, pull_request ]
149144
branch: [ master ]
150145

151146
test-mysql:
152-
image: webhippie/golang:edge
147+
image: golang:1.10
153148
pull: true
154149
group: test
155150
environment:
156151
TAGS: bindata
157-
GOPATH: /srv/app
152+
TEST_LDAP: "1"
158153
commands:
154+
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
155+
- apt-get install -y git-lfs
159156
- make test-mysql
160157
when:
161158
event: [ tag ]
162159

163160
test-pgsql:
164-
image: webhippie/golang:edge
161+
image: golang:1.10
165162
pull: true
166163
group: test
167164
environment:
168165
TAGS: bindata
169-
GOPATH: /srv/app
166+
TEST_LDAP: "1"
170167
commands:
168+
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
169+
- apt-get install -y git-lfs
171170
- make test-pgsql
172171
when:
173172
event: [ push, tag, pull_request ]
174173

175174
generate-coverage:
176-
image: webhippie/golang:edge
175+
image: golang:1.10
177176
pull: true
178177
environment:
179178
TAGS: bindata
180-
GOPATH: /srv/app
181179
commands:
182180
- make coverage
183181
when:
@@ -198,7 +196,6 @@ pipeline:
198196
pull: true
199197
environment:
200198
TAGS: bindata sqlite
201-
GOPATH: /srv/app
202199
commands:
203200
- make release
204201
when:
@@ -342,3 +339,8 @@ services:
342339
- POSTGRES_DB=test
343340
when:
344341
event: [ push, tag, pull_request ]
342+
343+
ldap:
344+
image: gitea/test-openldap:latest
345+
when:
346+
event: [ push, tag, pull_request ]

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,13 @@ coverage.all
5959
/integrations/mysql.ini
6060
/integrations/pgsql.ini
6161
/node_modules
62+
63+
64+
# Snapcraft
65+
snap/.snapcraft/
66+
parts/
67+
stage/
68+
prime/
69+
*.snap
70+
*.snap-build
71+
*_source.tar.bz2

CHANGELOG.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,32 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7-
## [1.4.0-rc1](https://github.com/go-gitea/gitea/releases/tag/v1.4.0-rc1) - 2018-01-31
7+
## [1.4.1](https://github.com/go-gitea/gitea/releases/tag/v1.4.1) - 2018-05-03
8+
* BREAKING
9+
* Add "error" as reserved username (#3882) (#3886)
10+
* SECURITY
11+
* Do not allow inactive users to access repositories using private key (#3887) (#3889)
12+
* Fix path cleanup in file editor, when initilizing new repository and LFS oids (#3871) (#3873)
13+
* Remove unnecessary allowed safe HTML (#3778) (#3779)
14+
* Correctly check http git access rights for reverse proxy authorized users (#3721) (#3743)
15+
* BUGFIXES
16+
* Fix to use only needed columns from tables to get repository git paths (#3870) (#3883)
17+
* Fix GPG expire time display when time is zero (#3584) (#3884)
18+
* Fix to update only issue last update time when adding a comment (#3855) (#3860)
19+
* Fix repository star count after deleting user (#3781) (#3783)
20+
* Use the active branch for the code tab (#3720) (#3776)
21+
* Set default branch name on first push (#3715) (#3723)
22+
* Show clipboard button if disable HTTP of git protocol (#3773) (#3774)
23+
24+
## [1.4.0](https://github.com/go-gitea/gitea/releases/tag/v1.4.0) - 2018-03-25
825
* BREAKING
926
* Drop deprecated GOGS\_WORK\_DIR use (#2946)
1027
* Fix API status code for hook creation (#2814)
1128
* SECURITY
29+
* Escape branch name in dropdown menu (#3691) (#3692)
30+
* Refactor and simplify to correctly validate redirect to URL (#3674) (#3676)
31+
* Fix escaping changed title in comments (#3530) (#3534)
32+
 * Escape search query (#3486) (#3488)
1233
* Sanitize logs for mirror sync (#3057)
1334
* FEATURE
1435
* Serve .patch and .diff for pull requests (#3305, #3293)
@@ -24,6 +45,17 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
2445
* Add dingtalk webhook (#2777)
2546
* Responsive view (#2750)
2647
* BUGFIXES
48+
* Fix wiki inter-links with spaces (#3560) (#3632)
49+
* Fix query protected branch bug (#3563) (#3571)
50+
* Fix remove team member issue (#3566) (#3570)
51+
* Fix the protected branch panic issue (#3567) (#3569)
52+
* If Mirrors repository no content is fetched, updated time should not be changed (#3551) (#3565)
53+
* Bug fix for mirrored repository releases sorted (#3522) (#3555)
54+
* Add issue closed time column to fix activity closed issues list (#3537) (#3540)
55+
 * Update markbates/goth library to support OAuth2 with new dropbox API (#3533) (#3539)
56+
 * Fixes missing avatars in offline mode (#3471) (#3477)
57+
 * Fix synchronization bug in repo indexer (#3455) (#3461)
58+
 * Fix rendering of wiki page list if wiki repo contains other files (#3454) (#3463)
2759
* Fix webhook X-GitHub-* headers casing for better compatibility (#3429)
2860
* Add content type and doctype to requests made with go-get (#3426, #3423)
2961
* Fix SQL type error for webhooks (#3424)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ stylesheets-check: generate-stylesheets
292292

293293
.PHONY: generate-stylesheets
294294
generate-stylesheets:
295-
node_modules/.bin/lessc --no-ie-compat --clean-css public/less/index.less public/css/index.css
295+
node_modules/.bin/lessc --clean-css public/less/index.less public/css/index.css
296296

297297
.PHONY: swagger-ui
298298
swagger-ui:

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
[![Build Status](https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg)](https://drone.gitea.io/go-gitea/gitea)
66
[![Join the Discord chat at https://discord.gg/NsatcWJ](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/NsatcWJ)
7-
[![Join the Matrix chat at https://matrix.to/#/#gitea:matrix.org](https://img.shields.io/badge/matrix-%23gitea%3Amatrix.org-7bc9a4.svg)](https://matrix.to/#/#gitea:matrix.org)
87
[![](https://images.microbadger.com/badges/image/gitea/gitea.svg)](https://microbadger.com/images/gitea/gitea "Get your own image badge on microbadger.com")
98
[![codecov](https://codecov.io/gh/go-gitea/gitea/branch/master/graph/badge.svg)](https://codecov.io/gh/go-gitea/gitea)
109
[![Go Report Card](https://goreportcard.com/badge/code.gitea.io/gitea)](https://goreportcard.com/report/code.gitea.io/gitea)
1110
[![GoDoc](https://godoc.org/code.gitea.io/gitea?status.svg)](https://godoc.org/code.gitea.io/gitea)
12-
[![Release](https://github-release-version.herokuapp.com/github/go-gitea/gitea/release.svg?style=flat)](https://github.com/go-gitea/gitea/releases/latest)
11+
[![GitHub release](https://img.shields.io/github/release/go-gitea/gitea.svg)](https://github.com/go-gitea/gitea/releases/latest)
1312
[![Help Contribute to Open Source](https://www.codetriage.com/go-gitea/gitea/badges/users.svg)](https://www.codetriage.com/go-gitea/gitea)
1413
[![Become a backer/sponsor of gitea](https://opencollective.com/gitea/tiers/backer/badge.svg?label=backer&color=brightgreen)](https://opencollective.com/gitea)
1514

@@ -63,7 +62,6 @@ For more information and instructions about how to install Gitea, please look
6362
at our [documentation](https://docs.gitea.io/en-us/). If you have questions
6463
that are not covered by the documentation, you can get in contact with us on
6564
our [Discord server](https://discord.gg/NsatcWJ),
66-
[Matrix room](https://matrix.to/#/#gitea:matrix.org),
6765
or [forum](https://discourse.gitea.io/)!
6866

6967
## Authors
@@ -72,6 +70,27 @@ or [forum](https://discourse.gitea.io/)!
7270
* [Contributors](https://github.com/go-gitea/gitea/graphs/contributors)
7371
* [Translators](options/locale/TRANSLATORS)
7472

73+
## Backers
74+
75+
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/gitea#backer)]
76+
77+
<a href="https://opencollective.com/gitea#backers" target="_blank"><img src="https://opencollective.com/gitea/backers.svg?width=890"></a>
78+
79+
## Sponsors
80+
81+
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/gitea#sponsor)]
82+
83+
<a href="https://opencollective.com/gitea/sponsor/0/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/0/avatar.svg"></a>
84+
<a href="https://opencollective.com/gitea/sponsor/1/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/1/avatar.svg"></a>
85+
<a href="https://opencollective.com/gitea/sponsor/2/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/2/avatar.svg"></a>
86+
<a href="https://opencollective.com/gitea/sponsor/3/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/3/avatar.svg"></a>
87+
<a href="https://opencollective.com/gitea/sponsor/4/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/4/avatar.svg"></a>
88+
<a href="https://opencollective.com/gitea/sponsor/5/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/5/avatar.svg"></a>
89+
<a href="https://opencollective.com/gitea/sponsor/6/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/6/avatar.svg"></a>
90+
<a href="https://opencollective.com/gitea/sponsor/7/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/7/avatar.svg"></a>
91+
<a href="https://opencollective.com/gitea/sponsor/8/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/8/avatar.svg"></a>
92+
<a href="https://opencollective.com/gitea/sponsor/9/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/9/avatar.svg"></a>
93+
7594
## License
7695

7796
This project is licensed under the MIT License.

README_ZH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![Coverage Status](https://coverage.gitea.io/badges/go-gitea/gitea/coverage.svg)](https://coverage.gitea.io/go-gitea/gitea)
99
[![Go Report Card](https://goreportcard.com/badge/code.gitea.io/gitea)](https://goreportcard.com/report/code.gitea.io/gitea)
1010
[![GoDoc](https://godoc.org/code.gitea.io/gitea?status.svg)](https://godoc.org/code.gitea.io/gitea)
11-
[![Release](https://github-release-version.herokuapp.com/github/go-gitea/gitea/release.svg?style=flat)](https://github.com/go-gitea/gitea/releases/latest)
11+
[![GitHub release](https://img.shields.io/github/release/go-gitea/gitea.svg)](https://github.com/go-gitea/gitea/releases/latest)
1212
[![Become a backer/sponsor of gitea](https://opencollective.com/gitea/tiers/backer/badge.svg?label=backer&color=brightgreen)](https://opencollective.com/gitea)
1313

1414
| | | |

cmd/admin.go

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var (
2525
subcmdCreateUser,
2626
subcmdChangePassword,
2727
subcmdRepoSyncReleases,
28+
subcmdRegenerate,
2829
},
2930
}
3031

@@ -80,6 +81,41 @@ var (
8081
Usage: "Synchronize repository releases with tags",
8182
Action: runRepoSyncReleases,
8283
}
84+
85+
subcmdRegenerate = cli.Command{
86+
Name: "regenerate",
87+
Usage: "Regenerate specific files",
88+
Subcommands: []cli.Command{
89+
microcmdRegenHooks,
90+
microcmdRegenKeys,
91+
},
92+
}
93+
94+
microcmdRegenHooks = cli.Command{
95+
Name: "hooks",
96+
Usage: "Regenerate git-hooks",
97+
Action: runRegenerateHooks,
98+
Flags: []cli.Flag{
99+
cli.StringFlag{
100+
Name: "config, c",
101+
Value: "custom/conf/app.ini",
102+
Usage: "Custom configuration file path",
103+
},
104+
},
105+
}
106+
107+
microcmdRegenKeys = cli.Command{
108+
Name: "keys",
109+
Usage: "Regenerate authorized_keys file",
110+
Action: runRegenerateKeys,
111+
Flags: []cli.Flag{
112+
cli.StringFlag{
113+
Name: "config, c",
114+
Value: "custom/conf/app.ini",
115+
Usage: "Custom configuration file path",
116+
},
117+
},
118+
}
83119
)
84120

85121
func runChangePassword(c *cli.Context) error {
@@ -195,3 +231,25 @@ func getReleaseCount(id int64) (int64, error) {
195231
},
196232
)
197233
}
234+
235+
func runRegenerateHooks(c *cli.Context) error {
236+
if c.IsSet("config") {
237+
setting.CustomConf = c.String("config")
238+
}
239+
240+
if err := initDB(); err != nil {
241+
return err
242+
}
243+
return models.SyncRepositoryHooks()
244+
}
245+
246+
func runRegenerateKeys(c *cli.Context) error {
247+
if c.IsSet("config") {
248+
setting.CustomConf = c.String("config")
249+
}
250+
251+
if err := initDB(); err != nil {
252+
return err
253+
}
254+
return models.RewriteAllPublicKeys()
255+
}

contrib/systemd/gitea.service

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ WorkingDirectory=/home/git/gitea
2222
ExecStart=/home/git/gitea/gitea web
2323
Restart=always
2424
Environment=USER=git HOME=/home/git
25+
# If you want to bind Gitea to a port below 1024 uncomment
26+
# the two values below
27+
###
28+
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
29+
#AmbientCapabilities=CAP_NET_BIND_SERVICE
2530

2631
[Install]
2732
WantedBy=multi-user.target

0 commit comments

Comments
 (0)