Skip to content

Commit 55cb6ab

Browse files
authored
Merge branch 'main' into private-reusable-workflow
2 parents 9ae5093 + c363bd0 commit 55cb6ab

File tree

97 files changed

+1539
-1381
lines changed

Some content is hidden

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

97 files changed

+1539
-1381
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ Tim-Niclas Oelschläger <[email protected]> (@zokkis)
6363
Yu Liu <[email protected]> (@HEREYUA)
6464
Kemal Zebari <[email protected]> (@kemzeb)
6565
Rowan Bohde <[email protected]> (@bohde)
66+
hiifong <[email protected]> (@hiifong)

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,12 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
377377
.PHONY: lint-js
378378
lint-js: node_modules
379379
npx eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES)
380-
# npx tsc
380+
# npx vue-tsc
381381

382382
.PHONY: lint-js-fix
383383
lint-js-fix: node_modules
384384
npx eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES) --fix
385-
# npx tsc
385+
# npx vue-tsc
386386

387387
.PHONY: lint-css
388388
lint-css: node_modules
@@ -451,6 +451,10 @@ lint-templates: .venv node_modules
451451
lint-yaml: .venv
452452
@poetry run yamllint .
453453

454+
.PHONY: tsc
455+
tsc:
456+
npx vue-tsc
457+
454458
.PHONY: watch
455459
watch:
456460
@bash tools/watch.sh

assets/go-licenses.json

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

custom/conf/app.example.ini

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,13 @@ LEVEL = Info
19441944
;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
19451945
;MINIO_SECRET_ACCESS_KEY =
19461946
;;
1947+
;; Preferred IAM Endpoint to override Minio's default IAM Endpoint resolution only available when STORAGE_TYPE is `minio`.
1948+
;; If not provided and STORAGE_TYPE is `minio`, will search for and derive endpoint from known environment variables
1949+
;; (AWS_CONTAINER_AUTHORIZATION_TOKEN, AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE, AWS_CONTAINER_CREDENTIALS_RELATIVE_URI,
1950+
;; AWS_CONTAINER_CREDENTIALS_FULL_URI, AWS_WEB_IDENTITY_TOKEN_FILE, AWS_ROLE_ARN, AWS_ROLE_SESSION_NAME, AWS_REGION),
1951+
;; or the DefaultIAMRoleEndpoint if not provided otherwise.
1952+
;MINIO_IAM_ENDPOINT =
1953+
;;
19471954
;; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`
19481955
;MINIO_BUCKET = gitea
19491956
;;
@@ -2688,6 +2695,13 @@ LEVEL = Info
26882695
;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
26892696
;MINIO_SECRET_ACCESS_KEY =
26902697
;;
2698+
;; Preferred IAM Endpoint to override Minio's default IAM Endpoint resolution only available when STORAGE_TYPE is `minio`.
2699+
;; If not provided and STORAGE_TYPE is `minio`, will search for and derive endpoint from known environment variables
2700+
;; (AWS_CONTAINER_AUTHORIZATION_TOKEN, AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE, AWS_CONTAINER_CREDENTIALS_RELATIVE_URI,
2701+
;; AWS_CONTAINER_CREDENTIALS_FULL_URI, AWS_WEB_IDENTITY_TOKEN_FILE, AWS_ROLE_ARN, AWS_ROLE_SESSION_NAME, AWS_REGION),
2702+
;; or the DefaultIAMRoleEndpoint if not provided otherwise.
2703+
;MINIO_IAM_ENDPOINT =
2704+
;;
26912705
;; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`
26922706
;MINIO_BUCKET = gitea
26932707
;;

models/activities/action.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func (a *Action) LoadActUser(ctx context.Context) {
200200
}
201201
}
202202

203-
func (a *Action) loadRepo(ctx context.Context) {
203+
func (a *Action) LoadRepo(ctx context.Context) {
204204
if a.Repo != nil {
205205
return
206206
}
@@ -250,7 +250,7 @@ func (a *Action) GetActDisplayNameTitle(ctx context.Context) string {
250250

251251
// GetRepoUserName returns the name of the action repository owner.
252252
func (a *Action) GetRepoUserName(ctx context.Context) string {
253-
a.loadRepo(ctx)
253+
a.LoadRepo(ctx)
254254
if a.Repo == nil {
255255
return "(non-existing-repo)"
256256
}
@@ -265,7 +265,7 @@ func (a *Action) ShortRepoUserName(ctx context.Context) string {
265265

266266
// GetRepoName returns the name of the action repository.
267267
func (a *Action) GetRepoName(ctx context.Context) string {
268-
a.loadRepo(ctx)
268+
a.LoadRepo(ctx)
269269
if a.Repo == nil {
270270
return "(non-existing-repo)"
271271
}
@@ -644,7 +644,7 @@ func NotifyWatchers(ctx context.Context, actions ...*Action) error {
644644
}
645645

646646
if repoChanged {
647-
act.loadRepo(ctx)
647+
act.LoadRepo(ctx)
648648
repo = act.Repo
649649

650650
// check repo owner exist.

models/issues/comment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ func FindComments(ctx context.Context, opts *FindCommentsOptions) (CommentList,
11081108
sess.Join("INNER", "issue", "issue.id = comment.issue_id")
11091109
}
11101110

1111-
if opts.Page != 0 {
1111+
if opts.Page > 0 {
11121112
sess = db.SetSessionPagination(sess, opts)
11131113
}
11141114

models/issues/comment_code.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"context"
88

99
"code.gitea.io/gitea/models/db"
10+
"code.gitea.io/gitea/models/renderhelper"
1011
user_model "code.gitea.io/gitea/models/user"
11-
"code.gitea.io/gitea/modules/markup"
1212
"code.gitea.io/gitea/modules/markup/markdown"
1313

1414
"xorm.io/builder"
@@ -112,12 +112,8 @@ func findCodeComments(ctx context.Context, opts FindCommentsOptions, issue *Issu
112112
}
113113

114114
var err error
115-
rctx := markup.NewRenderContext(ctx).
116-
WithRepoFacade(issue.Repo).
117-
WithLinks(markup.Links{Base: issue.Repo.Link()}).
118-
WithMetas(issue.Repo.ComposeMetas(ctx))
119-
if comment.RenderedContent, err = markdown.RenderString(rctx,
120-
comment.Content); err != nil {
115+
rctx := renderhelper.NewRenderContextRepoComment(ctx, issue.Repo)
116+
if comment.RenderedContent, err = markdown.RenderString(rctx, comment.Content); err != nil {
121117
return nil, err
122118
}
123119
}

models/issues/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ func (issue *Issue) BlockedByDependencies(ctx context.Context, opts db.ListOptio
641641
Where("issue_id = ?", issue.ID).
642642
// sort by repo id then created date, with the issues of the same repo at the beginning of the list
643643
OrderBy("CASE WHEN issue.repo_id = ? THEN 0 ELSE issue.repo_id END, issue.created_unix DESC", issue.RepoID)
644-
if opts.Page != 0 {
644+
if opts.Page > 0 {
645645
sess = db.SetSessionPagination(sess, &opts)
646646
}
647647
err = sess.Find(&issueDeps)

models/issues/issue_watch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func GetIssueWatchers(ctx context.Context, issueID int64, listOptions db.ListOpt
105105
And("`user`.prohibit_login = ?", false).
106106
Join("INNER", "`user`", "`user`.id = `issue_watch`.user_id")
107107

108-
if listOptions.Page != 0 {
108+
if listOptions.Page > 0 {
109109
sess = db.SetSessionPagination(sess, &listOptions)
110110
watches := make([]*IssueWatch, 0, listOptions.PageSize)
111111
return watches, sess.Find(&watches)

models/issues/label.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ func GetLabelsByRepoID(ctx context.Context, repoID int64, sortType string, listO
390390
sess.Asc("name")
391391
}
392392

393-
if listOptions.Page != 0 {
393+
if listOptions.Page > 0 {
394394
sess = db.SetSessionPagination(sess, &listOptions)
395395
}
396396

@@ -462,7 +462,7 @@ func GetLabelsByOrgID(ctx context.Context, orgID int64, sortType string, listOpt
462462
sess.Asc("name")
463463
}
464464

465-
if listOptions.Page != 0 {
465+
if listOptions.Page > 0 {
466466
sess = db.SetSessionPagination(sess, &listOptions)
467467
}
468468

0 commit comments

Comments
 (0)