Skip to content

Commit 7aa37d2

Browse files
authored
Merge branch 'main' into fix-16648-get-correct-count-for-org
2 parents 096a909 + d217024 commit 7aa37d2

File tree

35 files changed

+165
-1767
lines changed

35 files changed

+165
-1767
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/templates/**/*.tmpl linguist-language=Handlebars
55
/.eslintrc linguist-language=YAML
66
/.stylelintrc linguist-language=YAML
7+
/web_src/fomantic/build/** linguist-generated

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ test\#%:
385385

386386
.PHONY: coverage
387387
coverage:
388-
GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage.out coverage.out > coverage.all
388+
grep -v '^0$$' coverage.out > coverage-bodged.out
389+
grep -v '^0$$' integration.coverage.out > integration.coverage-bodged.out
390+
GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage-bodged.out coverage-bodged.out > coverage.all || (echo "gocovmerge failed"; echo "integration.coverage.out"; cat integration.coverage.out; echo "coverage.out"; cat coverage.out; exit 1)
389391

390392
.PHONY: unit-test-coverage
391393
unit-test-coverage:
@@ -701,6 +703,7 @@ fomantic:
701703
cp -rf $(FOMANTIC_WORK_DIR)/_site $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/
702704
cp -f web_src/js/vendor/dropdown.js $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/definitions/modules
703705
cd $(FOMANTIC_WORK_DIR) && npx gulp -f node_modules/fomantic-ui/gulpfile.js build
706+
rm -f $(FOMANTIC_WORK_DIR)/build/*.min.*
704707

705708
.PHONY: webpack
706709
webpack: $(WEBPACK_DEST)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<a href="https://codecov.io/gh/go-gitea/gitea" title="Codecov">
1616
<img src="https://codecov.io/gh/go-gitea/gitea/branch/main/graph/badge.svg">
1717
</a>
18-
<a href="https://godoc.org/code.gitea.io/gitea" title="Go Report Card">
18+
<a href="https://goreportcard.com/report/code.gitea.io/gitea" title="Go Report Card">
1919
<img src="https://goreportcard.com/badge/code.gitea.io/gitea">
2020
</a>
2121
<a href="https://godoc.org/code.gitea.io/gitea" title="GoDoc">

README_ZH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<a href="https://codecov.io/gh/go-gitea/gitea" title="Codecov">
1616
<img src="https://codecov.io/gh/go-gitea/gitea/branch/main/graph/badge.svg">
1717
</a>
18-
<a href="https://godoc.org/code.gitea.io/gitea" title="Go Report Card">
18+
<a href="https://goreportcard.com/report/code.gitea.io/gitea" title="Go Report Card">
1919
<img src="https://goreportcard.com/badge/code.gitea.io/gitea">
2020
</a>
2121
<a href="https://godoc.org/code.gitea.io/gitea" title="GoDoc">

custom/conf/app.example.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ PATH =
907907
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
908908
;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
909909
;ALLOWED_TYPES =
910+
;DEFAULT_PAGING_NUM = 10
910911

911912
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
912913
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
115115
### Repository - Release (`repository.release`)
116116

117117
- `ALLOWED_TYPES`: **\<empty\>**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
118+
- `DEFAULT_PAGING_NUM`: **10**: The default paging number of releases user interface
118119

119120
### Repository - Signing (`repository.signing`)
120121

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ menu:
3636
- `MAX_CREATION_LIMIT`: 全局最大每个用户创建的git工程数目, `-1` 表示没限制。
3737
- `PULL_REQUEST_QUEUE_LENGTH`: 小心:合并请求测试队列的长度,尽量放大。
3838

39+
### Repository - Release (`repository.release`)
40+
41+
- `ALLOWED_TYPES`: **\<empty\>**: 允许扩展名的列表,用逗号分隔 (`.zip`), mime 类型 (`text/plain`) 或者匹配符号 (`image/*`, `audio/*`, `video/*`). 空值或者 `*/*` 允许所有类型。
42+
- `DEFAULT_PAGING_NUM`: **10**: 默认的发布版本页面分页。
43+
3944
## UI (`ui`)
4045

4146
- `EXPLORE_PAGING_NUM`: 探索页面每页显示的仓库数量。

docs/content/doc/advanced/customizing-gitea.en-us.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,21 @@ A full list of supported emoji's is at [emoji list](https://gitea.com/gitea/gite
321321

322322
## Customizing the look of Gitea
323323

324-
As of version 1.6.0 Gitea has built-in themes. The two built-in themes are, the default theme `gitea`, and a dark theme `arc-green`. To change the look of your Gitea install change the value of `DEFAULT_THEME` in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini` to another one of the available options.
325-
As of version 1.8.0 Gitea also has per-user themes. The list of themes a user can choose from can be configured with the `THEMES` value in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini` (defaults to `gitea` and `arc-green`, light and dark respectively)
324+
The default built-in themes are `gitea` (light) and `arc-green` (dark).
325+
The default theme can be changed via `DEFAULT_THEME` in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini`.
326+
327+
Gitea also has support for user themes, which means every user can select which theme should be used.
328+
The list of themes a user can choose from can be configured with the `THEMES` value in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini`.
329+
330+
To make a custom theme available to all users:
331+
332+
1. Add a CSS file to `$GITEA_PUBLIC/public/css/theme-<theme-name>.css`.
333+
The value of `$GITEA_PUBLIC` of your instance can be queried by calling `gitea help` and looking up the value of "CustomPath".
334+
2. Add `<theme-name>` to the comma-separated list of setting `THEMES` in `app.ini`
335+
336+
Community themes are listed in [gitea/awesome-gitea#themes](https://gitea.com/gitea/awesome-gitea#themes).
337+
338+
The `arc-green` theme source can be found [here](https://github.com/go-gitea/gitea/blob/main/web_src/less/themes/theme-arc-green.less).
326339

327340
## Customizing fonts
328341

integrations/testlogger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func PrintCurrentTest(t testing.TB, skip ...int) func() {
121121
fmt.Fprintf(os.Stdout, "+++ %s ... still flushing after %v ...\n", t.Name(), slowFlush)
122122
}
123123
})
124-
if err := queue.GetManager().FlushAll(context.Background(), -1); err != nil {
124+
if err := queue.GetManager().FlushAll(context.Background(), 2*time.Minute); err != nil {
125125
t.Errorf("Flushing queues failed with error %v", err)
126126
}
127127
timer.Stop()

models/repo.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,6 +1497,11 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
14971497
releaseAttachments = append(releaseAttachments, attachments[i].RelativePath())
14981498
}
14991499

1500+
if _, err = sess.In("release_id", builder.Select("id").From("`release`").Where(builder.Eq{"`release`.repo_id": repoID})).
1501+
Delete(&Attachment{}); err != nil {
1502+
return err
1503+
}
1504+
15001505
if _, err := sess.Exec("UPDATE `user` SET num_stars=num_stars-1 WHERE id IN (SELECT `uid` FROM `star` WHERE repo_id = ?)", repo.ID); err != nil {
15011506
return err
15021507
}

0 commit comments

Comments
 (0)