Skip to content

Commit 55aefc0

Browse files
authored
Merge branch 'main' into fix-comment-form
2 parents 30f0245 + 371520d commit 55aefc0

File tree

31 files changed

+244
-7428
lines changed

31 files changed

+244
-7428
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ fund=false
33
update-notifier=false
44
package-lock=true
55
save-exact=true
6+
lockfile-version=3

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ fmt:
273273

274274
.PHONY: fmt-check
275275
fmt-check: fmt
276-
@diff=$$(git diff $(GO_SOURCES) templates $(WEB_DIRS)); \
276+
@diff=$$(git diff --color=always $(GO_SOURCES) templates $(WEB_DIRS)); \
277277
if [ -n "$$diff" ]; then \
278278
echo "Please run 'make fmt' and commit the result:"; \
279279
echo "$${diff}"; \
@@ -309,7 +309,7 @@ $(SWAGGER_SPEC): $(GO_SOURCES_NO_BINDATA)
309309

310310
.PHONY: swagger-check
311311
swagger-check: generate-swagger
312-
@diff=$$(git diff '$(SWAGGER_SPEC)'); \
312+
@diff=$$(git diff --color=always '$(SWAGGER_SPEC)'); \
313313
if [ -n "$$diff" ]; then \
314314
echo "Please run 'make generate-swagger' and commit the result:"; \
315315
echo "$${diff}"; \
@@ -414,7 +414,7 @@ vendor: go.mod go.sum
414414

415415
.PHONY: tidy-check
416416
tidy-check: tidy
417-
@diff=$$(git diff go.mod go.sum $(GO_LICENSE_FILE)); \
417+
@diff=$$(git diff --color=always go.mod go.sum $(GO_LICENSE_FILE)); \
418418
if [ -n "$$diff" ]; then \
419419
echo "Please run 'make tidy' and commit the result:"; \
420420
echo "$${diff}"; \
@@ -885,7 +885,7 @@ svg: node-check | node_modules
885885
.PHONY: svg-check
886886
svg-check: svg
887887
@git add $(SVG_DEST_DIR)
888-
@diff=$$(git diff --cached $(SVG_DEST_DIR)); \
888+
@diff=$$(git diff --color=always --cached $(SVG_DEST_DIR)); \
889889
if [ -n "$$diff" ]; then \
890890
echo "Please run 'make svg' and 'git add $(SVG_DEST_DIR)' and commit the result:"; \
891891
echo "$${diff}"; \
@@ -895,7 +895,7 @@ svg-check: svg
895895
.PHONY: lockfile-check
896896
lockfile-check:
897897
npm install --package-lock-only
898-
@diff=$$(git diff package-lock.json); \
898+
@diff=$$(git diff --color=always package-lock.json); \
899899
if [ -n "$$diff" ]; then \
900900
echo "package-lock.json is inconsistent with package.json"; \
901901
echo "Please run 'npm install --package-lock-only' and commit the result:"; \

custom/conf/app.example.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1848,7 +1848,7 @@ ROUTER = console
18481848
;ENABLED = true
18491849
;;
18501850
;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
1851-
;ALLOWED_TYPES = .csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip
1851+
;ALLOWED_TYPES = .csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip
18521852
;;
18531853
;; Max size of each file. Defaults to 4MB
18541854
;MAX_SIZE = 4

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ Default templates for project boards:
841841
## Issue and pull request attachments (`attachment`)
842842

843843
- `ENABLED`: **true**: Whether issue and pull request attachments are enabled.
844-
- `ALLOWED_TYPES`: **.csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
844+
- `ALLOWED_TYPES`: **.csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
845845
- `MAX_SIZE`: **4**: Maximum size (MB).
846846
- `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once.
847847
- `STORAGE_TYPE`: **local**: Storage type for attachments, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]`

models/actions/runner.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type ActionRunner struct {
2525
ID int64
2626
UUID string `xorm:"CHAR(36) UNIQUE"`
2727
Name string `xorm:"VARCHAR(255)"`
28+
Version string `xorm:"VARCHAR(64)"`
2829
OwnerID int64 `xorm:"index"` // org level runner, 0 means system
2930
Owner *user_model.User `xorm:"-"`
3031
RepoID int64 `xorm:"index"` // repo level runner, if orgid also is zero, then it's a global

models/migrations/migrations.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,8 @@ var migrations = []Migration{
473473
NewMigration("Add missed column owner_id for project table", v1_20.AddNewColumnForProject),
474474
// v247 -> v248
475475
NewMigration("Fix incorrect project type", v1_20.FixIncorrectProjectType),
476+
// v248 -> v249
477+
NewMigration("Add version column to action_runner table", v1_20.AddVersionToActionRunner),
476478
}
477479

478480
// GetCurrentDBVersion returns the current db version

models/migrations/v1_20/v248.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2023 The Gitea Authors. All rights reserved.
2+
// SPDX-License-Identifier: MIT
3+
4+
package v1_20 //nolint
5+
6+
import "xorm.io/xorm"
7+
8+
func AddVersionToActionRunner(x *xorm.Engine) error {
9+
type ActionRunner struct {
10+
Version string `xorm:"VARCHAR(64)"` // the version of act_runner
11+
}
12+
13+
return x.Sync(new(ActionRunner))
14+
}

models/project/project.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,21 @@ func (p *Project) Link() string {
144144
return ""
145145
}
146146

147+
func (p *Project) IconName() string {
148+
if p.IsRepositoryProject() {
149+
return "octicon-project"
150+
}
151+
return "octicon-project-symlink"
152+
}
153+
147154
func (p *Project) IsOrganizationProject() bool {
148155
return p.Type == TypeOrganization
149156
}
150157

158+
func (p *Project) IsRepositoryProject() bool {
159+
return p.Type == TypeRepository
160+
}
161+
151162
func init() {
152163
db.RegisterModel(new(Project))
153164
}

modules/setting/attachment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func loadAttachmentFrom(rootCfg ConfigProvider) {
2626

2727
Attachment.Storage = getStorage(rootCfg, "attachments", storageType, sec)
2828

29-
Attachment.AllowedTypes = sec.Key("ALLOWED_TYPES").MustString(".csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip")
29+
Attachment.AllowedTypes = sec.Key("ALLOWED_TYPES").MustString(".csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip")
3030
Attachment.MaxSize = sec.Key("MAX_SIZE").MustInt64(4)
3131
Attachment.MaxFiles = sec.Key("MAX_FILES").MustInt(5)
3232
Attachment.Enabled = sec.Key("ENABLED").MustBool(true)

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3355,6 +3355,7 @@ runners.status.unspecified = Unknown
33553355
runners.status.idle = Idle
33563356
runners.status.active = Active
33573357
runners.status.offline = Offline
3358+
runners.version = Version
33583359
33593360
runs.all_workflows = All Workflows
33603361
runs.open_tab = %d Open

options/locale/locale_pt-PT.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,7 @@ issues.context.reference_issue=Criar uma nova questão referindo esta
13691369
issues.context.edit=Editar
13701370
issues.context.delete=Eliminar
13711371
issues.no_content=Ainda não há conteúdo.
1372+
issues.close=Encerrar questão
13721373
issues.pull_merged_at=`integrou o cometimento <a class="ui sha" href="%[1]s"><code>%[2]s</code></a> no ramo <b>%[3]s</b> %[4]s`
13731374
issues.manually_pull_merged_at=`integrou o cometimento <a class="ui sha" href="%[1]s"><code>%[2]s</code></a> no ramo <b>%[3]s</b> manualmente %[4]s`
13741375
issues.close_comment_issue=Comentar e fechar
@@ -1653,6 +1654,7 @@ pulls.update_branch_rebase=Modificar ramo mudando a base
16531654
pulls.update_branch_success=A sincronização do ramo foi bem sucedida
16541655
pulls.update_not_allowed=Não tem autorização para sincronizar o ramo
16551656
pulls.outdated_with_base_branch=Este ramo é obsoleto em relação ao ramo base
1657+
pulls.close=Encerrar pedido de integração
16561658
pulls.closed_at=`fechou este pedido de integração <a id="%[1]s" href="#%[1]s">%[2]s</a>`
16571659
pulls.reopened_at=`reabriu este pedido de integração <a id="%[1]s" href="#%[1]s">%[2]s</a>`
16581660
pulls.merge_instruction_hint=`Também pode ver as <a class="show-instruction">instruções para a linha de comandos</a>.`

0 commit comments

Comments
 (0)