From 9483ccd463d31d465599eb4a0cc5621bc2caaf70 Mon Sep 17 00:00:00 2001 From: GiteaBot Date: Wed, 20 Dec 2023 00:20:44 +0000 Subject: [PATCH 1/5] [skip ci] Updated translations via Crowdin --- options/locale/locale_ja-JP.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini index c2557b180e7ce..871a9d6809e73 100644 --- a/options/locale/locale_ja-JP.ini +++ b/options/locale/locale_ja-JP.ini @@ -91,6 +91,7 @@ remove=除去 remove_all=すべて除去 remove_label_str=アイテム「%s」を削除 edit=編集 +view=表示 enabled=有効 disabled=無効 @@ -3531,6 +3532,9 @@ runs.status=ステータス runs.actors_no_select=すべてのアクター runs.status_no_select=すべてのステータス runs.no_results=一致する結果はありません。 +runs.no_workflows=ワークフローはまだありません。 +runs.no_workflows.quick_start=Gitea Action の始め方がわからない? クイックスタートガイドをご覧ください。 +runs.no_workflows.documentation=Gitea Action の詳細については、ドキュメントを参照してください。 runs.no_runs=ワークフローはまだ実行されていません。 runs.empty_commit_message=(空のコミットメッセージ) From 577421691b5bca38b9116eb36efcfc9b1dfe2043 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 20 Dec 2023 19:54:34 +0800 Subject: [PATCH 2/5] Add missing head of lfs client batch (#28550) ref https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#git-lfs-batch-api --- modules/lfs/http_client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/lfs/http_client.go b/modules/lfs/http_client.go index de0b1e4fede49..4177473362387 100644 --- a/modules/lfs/http_client.go +++ b/modules/lfs/http_client.go @@ -79,7 +79,10 @@ func (c *HTTPClient) batch(ctx context.Context, operation string, objects []Poin return nil, err } - req, err := createRequest(ctx, http.MethodPost, url, map[string]string{"Content-Type": MediaType}, payload) + req, err := createRequest(ctx, http.MethodPost, url, map[string]string{ + "Content-Type": MediaType, + "Accept": MediaType, + }, payload) if err != nil { return nil, err } From e4a24d6727e70a8a7f4688d738c36db1f0fcbcc4 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 20 Dec 2023 22:11:59 +0800 Subject: [PATCH 3/5] Fix the issue ref rendering for wiki (#28556) Fix #28526, regression of * #26365 (although the author of #26365 has recent activities, but there is no response for the regression, so I proposed this quick fix and keep the fix simple to make it easier to backport to 1.21) --- modules/markup/html.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/markup/html.go b/modules/markup/html.go index 774cbe1557e44..03168b6946814 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -852,7 +852,9 @@ func fullIssuePatternProcessor(ctx *RenderContext, node *html.Node) { } func issueIndexPatternProcessor(ctx *RenderContext, node *html.Node) { - if ctx.Metas == nil || ctx.Metas["mode"] == "document" { + // FIXME: the use of "mode" is quite dirty and hacky, for example: what is a "document"? how should it be rendered? + // The "mode" approach should be refactored to some other more clear&reliable way. + if ctx.Metas == nil || (ctx.Metas["mode"] == "document" && !ctx.IsWiki) { return } var ( From 2c48733afea30a5e25fc1a6b3054f0ae907f990b Mon Sep 17 00:00:00 2001 From: 6543 Date: Wed, 20 Dec 2023 16:19:58 +0100 Subject: [PATCH 4/5] Fix inperformant query on retrifing review from database. (#28552) can we please PLEAS PLEASE only use raw SQL statements if it is relay needed!!! source is https://github.com/go-gitea/gitea/pull/28544 (before refactoring) --- models/issues/review.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/models/issues/review.go b/models/issues/review.go index 3db73a09ebcb7..e2f65e369f1cb 100644 --- a/models/issues/review.go +++ b/models/issues/review.go @@ -460,8 +460,10 @@ func SubmitReview(ctx context.Context, doer *user_model.User, issue *Issue, revi func GetReviewByIssueIDAndUserID(ctx context.Context, issueID, userID int64) (*Review, error) { review := new(Review) - has, err := db.GetEngine(ctx).SQL("SELECT * FROM review WHERE id IN (SELECT max(id) as id FROM review WHERE issue_id = ? AND reviewer_id = ? AND original_author_id = 0 AND type in (?, ?, ?))", - issueID, userID, ReviewTypeApprove, ReviewTypeReject, ReviewTypeRequest). + has, err := db.GetEngine(ctx).Where( + builder.In("type", ReviewTypeApprove, ReviewTypeReject, ReviewTypeRequest). + And(builder.Eq{"issue_id": issueID, "reviewer_id": userID, "original_author_id": 0})). + Desc("id"). Get(review) if err != nil { return nil, err @@ -475,13 +477,13 @@ func GetReviewByIssueIDAndUserID(ctx context.Context, issueID, userID int64) (*R } // GetTeamReviewerByIssueIDAndTeamID get the latest review request of reviewer team for a pull request -func GetTeamReviewerByIssueIDAndTeamID(ctx context.Context, issueID, teamID int64) (review *Review, err error) { - review = new(Review) +func GetTeamReviewerByIssueIDAndTeamID(ctx context.Context, issueID, teamID int64) (*Review, error) { + review := new(Review) - var has bool - if has, err = db.GetEngine(ctx).SQL("SELECT * FROM review WHERE id IN (SELECT max(id) as id FROM review WHERE issue_id = ? AND reviewer_team_id = ?)", - issueID, teamID). - Get(review); err != nil { + has, err := db.GetEngine(ctx).Where(builder.Eq{"issue_id": issueID, "reviewer_team_id": teamID}). + Desc("id"). + Get(review) + if err != nil { return nil, err } From 3d98d99e27dfbe86227b0557d04b5e4ea1c6e946 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 21 Dec 2023 04:12:25 +0800 Subject: [PATCH 5/5] Update actions document about comparsion as Github Actions (#28560) --- docs/content/usage/actions/comparison.en-us.md | 8 ++++++++ docs/content/usage/actions/comparison.zh-cn.md | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/docs/content/usage/actions/comparison.en-us.md b/docs/content/usage/actions/comparison.en-us.md index be40657bed70c..4d725f7a7e888 100644 --- a/docs/content/usage/actions/comparison.en-us.md +++ b/docs/content/usage/actions/comparison.en-us.md @@ -29,6 +29,10 @@ Like `uses: https://github.com/actions/checkout@v3` or `uses: http://your_gitea. Gitea Actions supports writing actions in Go. See [Creating Go Actions](https://blog.gitea.com/creating-go-actions/). +### Support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly on schedule + +Github Actions doesn't support that. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule + ## Unsupported workflows syntax ### `concurrency` @@ -110,6 +114,10 @@ It's ignored by Gitea Actions now. Pre and Post steps don't have their own section in the job log user interface. +### Services steps + +Services steps don't have their own section in the job log user interface. + ## Different behavior ### Downloading actions diff --git a/docs/content/usage/actions/comparison.zh-cn.md b/docs/content/usage/actions/comparison.zh-cn.md index 1ef7d3ca9892e..da3abfe01e988 100644 --- a/docs/content/usage/actions/comparison.zh-cn.md +++ b/docs/content/usage/actions/comparison.zh-cn.md @@ -29,6 +29,10 @@ Gitea Actions支持通过URL绝对路径定义actions,这意味着您可以使 Gitea Actions支持使用Go编写Actions。 请参阅[创建Go Actions](https://blog.gitea.com/creating-go-actions/)。 +### 支持非标准的调度语法 @yearly, @monthly, @weekly, @daily, @hourly + +Github Actions 不支持这些语法,详见: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule + ## 不支持的工作流语法 ### `concurrency` @@ -116,6 +120,10 @@ Gitea Actions目前不支持此功能。 预处理和后处理步骤在Job日志用户界面中没有自己的用户界面。 +### 服务步骤 + +服务步骤在Job日志用户界面中没有自己的用户界面。 + ## 不一样的行为 ### 下载Actions