Skip to content

Commit 0a412c6

Browse files
Merge branch 'master' into remote-internal-token
2 parents 4136762 + 8e266c3 commit 0a412c6

Some content is hidden

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

85 files changed

+1270
-533
lines changed

.drone.yml

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ pipeline:
5656
event: [ push, tag, pull_request ]
5757

5858
build-without-gcc:
59-
image: golang:1.9
59+
image: golang:1.10 # this step is kept as the lowest version of golang that we support
6060
pull: true
6161
commands:
6262
- go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
6363
when:
6464
event: [ push, tag, pull_request ]
6565

6666
build:
67-
image: golang:1.11
67+
image: golang:1.12
6868
pull: true
6969
environment:
7070
TAGS: bindata sqlite sqlite_unlock_notify
@@ -82,8 +82,8 @@ pipeline:
8282
when:
8383
event: [ push, tag, pull_request ]
8484

85-
test:
86-
image: golang:1.11
85+
unit-test:
86+
image: golang:1.12
8787
pull: true
8888
group: test
8989
environment:
@@ -94,8 +94,8 @@ pipeline:
9494
event: [ push, pull_request ]
9595
branch: [ master ]
9696

97-
test:
98-
image: golang:1.11
97+
release-test:
98+
image: golang:1.12
9999
pull: true
100100
group: test
101101
environment:
@@ -106,8 +106,8 @@ pipeline:
106106
event: [ push, pull_request ]
107107
branch: [ release/* ]
108108

109-
test:
110-
image: golang:1.11
109+
tag-test:
110+
image: golang:1.12
111111
pull: true
112112
group: test
113113
environment:
@@ -118,7 +118,7 @@ pipeline:
118118
event: [ tag ]
119119

120120
test-sqlite:
121-
image: golang:1.11
121+
image: golang:1.12
122122
pull: true
123123
group: test
124124
environment:
@@ -133,7 +133,7 @@ pipeline:
133133
event: [ push, tag, pull_request ]
134134

135135
test-mysql:
136-
image: golang:1.11
136+
image: golang:1.12
137137
pull: true
138138
group: test
139139
environment:
@@ -148,8 +148,8 @@ pipeline:
148148
event: [ push, pull_request ]
149149
branch: [ master ]
150150

151-
test-mysql:
152-
image: golang:1.11
151+
tag-test-mysql:
152+
image: golang:1.12
153153
pull: true
154154
group: test
155155
environment:
@@ -165,7 +165,7 @@ pipeline:
165165
event: [ tag ]
166166

167167
test-pgsql:
168-
image: golang:1.11
168+
image: golang:1.12
169169
pull: true
170170
group: test
171171
environment:
@@ -181,7 +181,7 @@ pipeline:
181181
event: [ push, tag, pull_request ]
182182

183183
test-mssql:
184-
image: golang:1.11
184+
image: golang:1.12
185185
pull: true
186186
group: test
187187
environment:
@@ -196,7 +196,7 @@ pipeline:
196196
event: [ push, tag, pull_request ]
197197

198198
bench-sqlite:
199-
image: golang:1.11
199+
image: golang:1.12
200200
pull: true
201201
group: bench
202202
commands:
@@ -205,7 +205,7 @@ pipeline:
205205
event: [ tag ]
206206

207207
bench-mysql:
208-
image: golang:1.11
208+
image: golang:1.12
209209
pull: true
210210
group: bench
211211
commands:
@@ -214,7 +214,7 @@ pipeline:
214214
event: [ tag ]
215215

216216
bench-mssql:
217-
image: golang:1.11
217+
image: golang:1.12
218218
pull: true
219219
group: bench
220220
commands:
@@ -223,7 +223,7 @@ pipeline:
223223
event: [ tag ]
224224

225225
bench-pgsql:
226-
image: golang:1.11
226+
image: golang:1.12
227227
pull: true
228228
group: bench
229229
commands:
@@ -232,7 +232,7 @@ pipeline:
232232
event: [ tag ]
233233

234234
generate-coverage:
235-
image: golang:1.11
235+
image: golang:1.12
236236
pull: true
237237
environment:
238238
TAGS: bindata
@@ -281,12 +281,22 @@ pipeline:
281281
event: [ push ]
282282
branch: [ master ]
283283

284-
docker:
284+
docker-dryrun:
285+
image: plugins/docker:17.12
286+
pull: true
287+
repo: gitea/gitea
288+
cache_from: gitea/gitea
289+
dry_run: true
290+
when:
291+
event: [ pull_request ]
292+
293+
release-docker:
285294
image: plugins/docker:17.12
286295
pull: true
287296
secrets: [ docker_username, docker_password ]
288297
repo: gitea/gitea
289298
tags: [ '${DRONE_BRANCH##release/v}' ]
299+
cache_from: gitea/gitea
290300
when:
291301
event: [ push ]
292302
branch: [ release/* ]
@@ -296,6 +306,7 @@ pipeline:
296306
secrets: [ docker_username, docker_password ]
297307
pull: true
298308
repo: gitea/gitea
309+
cache_from: gitea/gitea
299310
default_tags: true
300311
when:
301312
event: [ push, tag ]
@@ -312,7 +323,7 @@ pipeline:
312323
when:
313324
event: [ push, tag ]
314325

315-
release:
326+
tag-release:
316327
image: plugins/s3:1
317328
pull: true
318329
secrets: [ aws_access_key_id, aws_secret_access_key ]
@@ -326,7 +337,7 @@ pipeline:
326337
when:
327338
event: [ tag ]
328339

329-
release:
340+
release-branch-release:
330341
image: plugins/s3:1
331342
pull: true
332343
secrets: [ aws_access_key_id, aws_secret_access_key ]

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ coverage.all
6262
/integrations/pgsql.ini
6363
/integrations/mssql.ini
6464
/node_modules
65+
/modules/indexer/issues/indexers
6566

6667

6768
# Snapcraft

CHANGELOG.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,25 @@ 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.7.3](https://github.com/go-gitea/gitea/releases/tag/v1.7.3) - 2019-02-27
8+
* BUGFIXES
9+
* Fix server 500 when trying to migrate to an already existing repository (#6188) (#6197)
10+
* Load Issue attributes for API /repos/{owner}/{repo}/issues/{index} (#6122) (#6185)
11+
* Fix bug whereby user could change private repository to public when force private enabled. (#6156) (#6165)
12+
* Fix bug when update owner team then visit team's repo return 404 (#6119) (#6166)
13+
* Fix heatmap and repository menu display in Internet Explorer 9+ (#6117) (#6137)
14+
* Fix prohibit login check on authorization (#6106) (#6115)
15+
* Fix LDAP protocol error regression by moving to ldap.v3 (#6105) (#6107)
16+
* Fix deadlock in webhook PullRequest (#6102) (#6104)
17+
* Fix redirect loop when password change is required and Gitea is installed as a suburl (#5965) (#6101)
18+
* Fix compare button regression (#5929) (#6098)
19+
* Recover panic in orgmode.Render if bad orgfile (#4982) (#5903) (#6097)
20+
721
## [1.7.2](https://github.com/go-gitea/gitea/releases/tag/v1.7.2) - 2019-02-14
822
* BUGFIXES
923
* Remove all CommitStatus when a repo is deleted (#5940) (#5941)
1024
* Fix notifications on pushing with deploy keys by setting hook environment variables (#5935) (#5944)
11-
* Silence console logger in gitea serv (#5887) (#5943)
25+
* Silence console logger in gitea serv (#5887) (#5943)
1226
* Handle milestone webhook events for issues and PR (#5947) (#5955)
1327
* Show user who created the repository instead of the organization in action feed (#5948) (#5956)
1428
* Fix ssh deploy and user key constraints (#1357) (#5939) (#5966)
@@ -64,7 +78,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
6478
* Give user a link to create PR after push (#4716)
6579
* Add rebase with merge commit merge style (#3844) (#4052)
6680
* BUGFIXES
67-
* Disallow empty titles (#5785) (#5794)
81+
* Disallow empty titles (#5785) (#5794)
6882
* Fix sqlite deadlock when assigning to a PR (#5640) (#5642)
6983
* Don't close issues via commits on non-default branch. (#5622) (#5643)
7084
* Fix commit page showing status for current default branch (#5650) (#5653)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ included in the next released version.
102102
Generally, the go build tools are installed as-needed in the `Makefile`.
103103
An exception are the tools to build the CSS and images.
104104

105-
- To build CSS: Install [Node.js](https://nodejs.org/en/download/package-manager)
105+
- To build CSS: Install [Node.js](https://nodejs.org/en/download/package-manager) at version 8.0 or above
106106
with `npm` and then run `npm install` and `make generate-stylesheets`.
107107
- To build Images: ImageMagick, inkscape and zopflipng binaries must be
108108
available in your `PATH` to run `make generate-images`.

Gopkg.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ Lanre Adelowo <[email protected]> (@adelowo)
2626
Konrad Langenberg <[email protected]> (@kolaente)
2727
He-Long Zhang <[email protected]> (@BetaCat0)
2828
Andrew Thornton <[email protected]> (@zeripath)
29+
John Olheiser <[email protected]> (@jolheiser)

Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ IMPORT := code.gitea.io/gitea
44
GO ?= go
55
SED_INPLACE := sed -i
66

7+
export PATH := $($(GO) env GOPATH)/bin:$(PATH)
8+
79
ifeq ($(OS), Windows_NT)
810
EXECUTABLE := gitea.exe
911
else
@@ -174,7 +176,7 @@ coverage:
174176

175177
.PHONY: unit-test-coverage
176178
unit-test-coverage:
177-
for PKG in $(PACKAGES); do $(GO) test -tags='sqlite sqlite_unlock_notify' -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done;
179+
$(GO) test -tags='sqlite sqlite_unlock_notify' -cover -coverprofile coverage.out $(PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
178180

179181
.PHONY: vendor
180182
vendor:
@@ -365,10 +367,14 @@ stylesheets-check: generate-stylesheets
365367

366368
.PHONY: generate-stylesheets
367369
generate-stylesheets:
368-
$(eval BROWSERS := "> 2%, last 2 firefox versions, last 2 safari versions")
369-
node_modules/.bin/lessc --clean-css public/less/index.less public/css/index.css
370-
$(foreach file, $(filter-out public/less/themes/_base.less, $(wildcard public/less/themes/*)),node_modules/.bin/lessc --clean-css public/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
371-
$(foreach file, $(wildcard public/css/*),node_modules/.bin/postcss --use autoprefixer --autoprefixer.browsers $(BROWSERS) -o $(file) $(file);)
370+
@hash npx > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
371+
echo "Please install npm version 5.2+"; \
372+
exit 1; \
373+
fi;
374+
$(eval BROWSERS := "> 1%, last 2 firefox versions, last 2 safari versions, ie 11")
375+
npx lessc --clean-css public/less/index.less public/css/index.css
376+
$(foreach file, $(filter-out public/less/themes/_base.less, $(wildcard public/less/themes/*)),npx lessc --clean-css public/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
377+
$(foreach file, $(wildcard public/css/*),npx postcss --use autoprefixer --autoprefixer.browsers $(BROWSERS) -o $(file) $(file);)
372378

373379
.PHONY: swagger-ui
374380
swagger-ui:

custom/conf/app.ini.sample

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,19 @@ DB_RETRIES = 10
253253
; Backoff time per DB retry (time.Duration)
254254
DB_RETRY_BACKOFF = 3s
255255

256-
257256
[indexer]
257+
; Issue indexer type, currently support: bleve or db, default is bleve
258+
ISSUE_INDEXER_TYPE = bleve
259+
; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
258260
ISSUE_INDEXER_PATH = indexers/issues.bleve
261+
; Issue indexer queue, currently support: channel or levelqueue, default is levelqueue
262+
ISSUE_INDEXER_QUEUE_TYPE = levelqueue
263+
; When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the queue will be saved path,
264+
; default is indexers/issues.queue
265+
ISSUE_INDEXER_QUEUE_DIR = indexers/issues.queue
266+
; Batch queue number, default is 20
267+
ISSUE_INDEXER_QUEUE_BATCH_NUMBER = 20
268+
259269
; repo indexer by default disabled, since it uses a lot of disk space
260270
REPO_INDEXER_ENABLED = false
261271
REPO_INDEXER_PATH = indexers/repos.bleve

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,12 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
154154

155155
## Indexer (`indexer`)
156156

157+
- `ISSUE_INDEXER_TYPE`: **bleve**: Issue indexer type, currently support: bleve or db, if it's db, below issue indexer item will be invalid.
157158
- `ISSUE_INDEXER_PATH`: **indexers/issues.bleve**: Index file used for issue search.
159+
- `ISSUE_INDEXER_QUEUE_TYPE`: **levelqueue**: Issue indexer queue, currently support: channel or levelqueue
160+
- `ISSUE_INDEXER_QUEUE_DIR`: **indexers/issues.queue**: When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the queue will be saved path
161+
- `ISSUE_INDEXER_QUEUE_BATCH_NUMBER`: **20**: Batch queue number
162+
158163
- `REPO_INDEXER_ENABLED`: **false**: Enables code search (uses a lot of disk space).
159164
- `REPO_INDEXER_PATH`: **indexers/repos.bleve**: Index file used for code search.
160165
- `UPDATE_BUFFER_LEN`: **20**: Buffer length of index request.

docs/content/doc/advanced/config-cheat-sheet.zh-cn.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,20 @@ menu:
8282
- `PATH`: Tidb 或者 SQLite3 数据文件存放路径。
8383
- `LOG_SQL`: **true**: 显示生成的SQL,默认为真。
8484

85+
86+
## Indexer (`indexer`)
87+
88+
- `ISSUE_INDEXER_TYPE`: **bleve**: 工单索引类型,当前支持 `bleve``db`,当为 `db` 时其它工单索引项可不用设置。
89+
- `ISSUE_INDEXER_PATH`: **indexers/issues.bleve**: 工单索引文件存放路径,当索引类型为 `bleve` 时有效。
90+
- `ISSUE_INDEXER_QUEUE_TYPE`: **levelqueue**: 工单索引队列类型,当前支持 `channel``levelqueue`
91+
- `ISSUE_INDEXER_QUEUE_DIR`: **indexers/issues.queue**: 当 `ISSUE_INDEXER_QUEUE_TYPE``levelqueue` 时,保存索引队列的磁盘路径。
92+
- `ISSUE_INDEXER_QUEUE_BATCH_NUMBER`: **20**: 队列处理中批量提交数量。
93+
94+
- `REPO_INDEXER_ENABLED`: **false**: 是否启用代码搜索(启用后会占用比较大的磁盘空间)。
95+
- `REPO_INDEXER_PATH`: **indexers/repos.bleve**: 用于代码搜索的索引文件路径。
96+
- `UPDATE_BUFFER_LEN`: **20**: 代码索引请求的缓冲区长度。
97+
- `MAX_FILE_SIZE`: **1048576**: 进行解析的源代码文件的最大长度,小于该值时才会索引。
98+
8599
## Security (`security`)
86100

87101
- `INSTALL_LOCK`: 是否允许运行安装向导,(跟管理员账号有关,十分重要)。

0 commit comments

Comments
 (0)