Skip to content

Commit 9c37592

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: [skip ci] Updated translations via Crowdin Fix various overflows on actions view (go-gitea#30344) Convert max file name length to 255 (go-gitea#30489) Remove active border on pointing menu (go-gitea#30486) Fix button color on red and green buttons (go-gitea#30500) Fix code owners will not be mentioned when a pull request comes from a forked repository (go-gitea#30476) Fix overflow on issue dependency (go-gitea#30484) Kill all gitea processes before air build (go-gitea#30477)
2 parents 4e4c21e + 3b045ee commit 9c37592

File tree

13 files changed

+113
-22
lines changed

13 files changed

+113
-22
lines changed

.air.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ root = "."
22
tmp_dir = ".air"
33

44
[build]
5+
pre_cmd = ["killall -9 gitea 2>/dev/null || true"] # kill off potential zombie processes from previous runs
56
cmd = "make --no-print-directory backend"
67
bin = "gitea"
7-
delay = 1000
8+
delay = 2000
89
include_ext = ["go", "tmpl"]
910
include_file = ["main.go"]
1011
include_dir = ["cmd", "models", "modules", "options", "routers", "services"]

options/locale/locale_ja-JP.ini

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ enable_javascript=このウェブサイトにはJavaScriptが必要です。
2525
toc=目次
2626
licenses=ライセンス
2727
return_to_gitea=Giteaに戻る
28+
more_items=その他の項目
2829

2930
username=ユーザー名
3031
email=メールアドレス
@@ -1003,6 +1004,7 @@ fork_visibility_helper=フォークしたリポジトリの公開/非公開は
10031004
fork_branch=フォークにクローンされるブランチ
10041005
all_branches=すべてのブランチ
10051006
fork_no_valid_owners=このリポジトリには有効なオーナーがいないため、フォークできません。
1007+
fork.blocked_user=リポジトリのオーナーがあなたをブロックしているため、リポジトリをフォークできません。
10061008
use_template=このテンプレートを使用
10071009
open_with_editor=%s で開く
10081010
download_zip=ZIPファイルをダウンロード
@@ -1179,6 +1181,7 @@ watch=ウォッチ
11791181
unstar=スター取消
11801182
star=スター
11811183
fork=フォーク
1184+
action.blocked_user=リポジトリのオーナーがあなたをブロックしているため、アクションを実行できません。
11821185
download_archive=リポジトリをダウンロード
11831186
more_operations=その他の操作
11841187

@@ -1427,6 +1430,8 @@ issues.new.assignees=担当者
14271430
issues.new.clear_assignees=担当者をクリア
14281431
issues.new.no_assignees=担当者なし
14291432
issues.new.no_reviewers=レビューアなし
1433+
issues.new.blocked_user=リポジトリのオーナーがあなたをブロックしているため、イシューを作成できません。
1434+
issues.edit.blocked_user=投稿者またはリポジトリのオーナーがあなたをブロックしているため、内容を編集できません。
14301435
issues.choose.get_started=始める
14311436
issues.choose.open_external_link=オープン
14321437
issues.choose.blank=デフォルト
@@ -1541,6 +1546,7 @@ issues.close_comment_issue=コメントしてクローズ
15411546
issues.reopen_issue=再オープンする
15421547
issues.reopen_comment_issue=コメントして再オープン
15431548
issues.create_comment=コメントする
1549+
issues.comment.blocked_user=投稿者またはリポジトリのオーナーがあなたをブロックしているため、コメントの作成や編集はできません。
15441550
issues.closed_at=`がイシューをクローズ <a id="%[1]s" href="#%[1]s">%[2]s</a>`
15451551
issues.reopened_at=`がイシューを再オープン <a id="%[1]s" href="#%[1]s">%[2]s</a>`
15461552
issues.commit_ref_at=`がコミットでこのイシューを参照 <a id="%[1]s" href="#%[1]s">%[2]s</a>`
@@ -1739,6 +1745,7 @@ compare.compare_head=比較
17391745

17401746
pulls.desc=プルリクエストとコードレビューの有効化。
17411747
pulls.new=新しいプルリクエスト
1748+
pulls.new.blocked_user=リポジトリのオーナーがあなたをブロックしているため、プルリクエストを作成できません。
17421749
pulls.view=プルリクエストを表示
17431750
pulls.compare_changes=新規プルリクエスト
17441751
pulls.allow_edits_from_maintainers=メンテナーからの編集を許可する
@@ -1960,6 +1967,7 @@ wiki.original_git_entry_tooltip=フレンドリーリンクを使用する代わ
19601967

19611968
activity=アクティビティ
19621969
activity.navbar.pulse=Pulse
1970+
activity.navbar.code_frequency=コード更新頻度
19631971
activity.navbar.contributors=貢献者
19641972
activity.navbar.recent_commits=最近のコミット
19651973
activity.period.filter_label=期間:
@@ -2080,6 +2088,8 @@ settings.branches.add_new_rule=新しいルールを追加
20802088
settings.advanced_settings=拡張設定
20812089
settings.wiki_desc=Wikiを有効にする
20822090
settings.use_internal_wiki=ビルトインのWikiを使用する
2091+
settings.default_wiki_branch_name=デフォルトのWikiブランチ名
2092+
settings.failed_to_change_default_wiki_branch=デフォルトのWikiブランチを変更できませんでした。
20832093
settings.use_external_wiki=外部のWikiを使用する
20842094
settings.external_wiki_url=外部WikiのURL
20852095
settings.external_wiki_url_error=外部WikiのURLが有効なURLではありません。
@@ -2110,6 +2120,9 @@ settings.pulls.default_allow_edits_from_maintainers=デフォルトでメンテ
21102120
settings.releases_desc=リリースを有効にする
21112121
settings.packages_desc=リポジトリパッケージレジストリを有効にする
21122122
settings.projects_desc=プロジェクトを有効にする
2123+
settings.projects_mode_desc=プロジェクト モード (表示するプロジェクトの種類)
2124+
settings.projects_mode_repo=リポジトリのプロジェクトのみ
2125+
settings.projects_mode_owner=ユーザーや組織のプロジェクトのみ
21132126
settings.projects_mode_all=すべてのプロジェクト
21142127
settings.actions_desc=Actionsを有効にする
21152128
settings.admin_settings=管理者用設定
@@ -2136,6 +2149,7 @@ settings.convert_fork_succeed=フォークを通常のリポジトリに変換
21362149
settings.transfer=オーナー移転
21372150
settings.transfer.rejected=リポジトリの移転は拒否されました。
21382151
settings.transfer.success=リポジトリの移転が成功しました。
2152+
settings.transfer.blocked_user=新しいオーナーがあなたをブロックしているため、リポジトリを移転できません。
21392153
settings.transfer_abort=転送をキャンセル
21402154
settings.transfer_abort_invalid=存在しないリポジトリの移転はキャンセルできません。
21412155
settings.transfer_abort_success=%s へのリポジトリ移転は正常にキャンセルされました。
@@ -2181,6 +2195,7 @@ settings.add_collaborator_success=共同作業者を追加しました。
21812195
settings.add_collaborator_inactive_user=アクティベートされていないユーザーを共同作業者として追加することはできません。
21822196
settings.add_collaborator_owner=共同作業者としてオーナーを追加することはできません。
21832197
settings.add_collaborator_duplicate=共同作業者として既にこのリポジトリに追加されています。
2198+
settings.add_collaborator.blocked_user=共同作業者がリポジトリのオーナーによってブロックされているか、またはブロックしています。
21842199
settings.delete_collaborator=削除
21852200
settings.collaborator_deletion=共同作業者の削除
21862201
settings.collaborator_deletion_desc=共同作業者を削除し、このリポジトリへのアクセス権を取り消します。 続行しますか?
@@ -2619,12 +2634,14 @@ find_file.no_matching=一致するファイルが見つかりません
26192634
error.csv.too_large=このファイルは大きすぎるため表示できません。
26202635
error.csv.unexpected=このファイルは %d 行目の %d 文字目に予期しない文字が含まれているため表示できません。
26212636
error.csv.invalid_field_count=このファイルは %d 行目のフィールドの数が正しくないため表示できません。
2637+
error.broken_git_hook=このリポジトリのGitフックが壊れているようです。 <a target="_blank" rel="noreferrer" href="%s">ドキュメント</a>に従って修正し、その後いくつかのコミットをプッシュして状態を最新にしてください。
26222638

26232639
[graphs]
26242640
component_loading=%sを読み込み中...
26252641
component_loading_failed=%sを読み込めませんでした
26262642
component_loading_info=少し時間がかかるかもしれません…
26272643
component_failed_to_load=予期しないエラーが発生しました。
2644+
code_frequency.what=コード更新頻度
26282645
contributors.what=実績
26292646
recent_commits.what=最近のコミット
26302647

@@ -2753,6 +2770,7 @@ teams.invite.by=%s からの招待
27532770
teams.invite.description=下のボタンをクリックしてチームに参加してください。
27542771

27552772
[admin]
2773+
maintenance=メンテナンス
27562774
dashboard=ダッシュボード
27572775
self_check=セルフチェック
27582776
identity_access=アイデンティティとアクセス
@@ -2776,6 +2794,7 @@ settings=管理設定
27762794

27772795
dashboard.new_version_hint=Gitea %s が入手可能になりました。 現在実行しているのは %s です。 詳細は <a target="_blank" rel="noreferrer" href="https://blog.gitea.io">ブログ</a> を確認してください。
27782796
dashboard.statistic=サマリー
2797+
dashboard.maintenance_operations=メンテナンス操作
27792798
dashboard.system_status=システム状況
27802799
dashboard.operation_name=操作の名称
27812800
dashboard.operation_switch=切り替え
@@ -3282,6 +3301,7 @@ notices.op=操作
32823301
notices.delete_success=システム通知を削除しました。
32833302

32843303
self_check.no_problem_found=今のところ問題は見つかっていません。
3304+
self_check.startup_warnings=起動時の警告:
32853305
self_check.database_collation_mismatch=データベースに想定される照合順序: %s
32863306
self_check.database_collation_case_insensitive=データベースは照合順序 %s を使用しており、大文字小文字を区別しません。 Giteaはその照合順序でも動作するかもしれませんが、まれに期待どおり動作しないケースがあるかもしれません。
32873307
self_check.database_inconsistent_collation_columns=データベースは照合順序 %s を使用していますが、以下のカラムはそれと一致しない照合順序を使用しており、予期せぬ問題を引き起こす可能性があります。

services/issue/pull.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ func PullRequestCodeOwnersReview(ctx context.Context, issue *issues_model.Issue,
5151
return nil, err
5252
}
5353

54-
if pr.HeadRepo.IsFork {
55-
return nil, nil
56-
}
57-
5854
if err := pr.LoadBaseRepo(ctx); err != nil {
5955
return nil, err
6056
}
6157

58+
if pr.BaseRepo.IsFork {
59+
return nil, nil
60+
}
61+
6262
repo, err := gitrepo.OpenRepository(ctx, pr.BaseRepo)
6363
if err != nil {
6464
return nil, err

templates/repo/actions/runs_list.tmpl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="flex-list">
1+
<div class="flex-list run-list">
22
{{if not .Runs}}
33
<div class="empty-placeholder">
44
{{svg "octicon-no-entry" 48}}
@@ -28,14 +28,14 @@
2828
</div>
2929
<div class="flex-item-trailing">
3030
{{if .RefLink}}
31-
<a class="ui label tw-px-1 tw-mx-0" href="{{.RefLink}}">{{.PrettyRef}}</a>
31+
<a class="ui label run-list-ref gt-ellipsis" href="{{.RefLink}}">{{.PrettyRef}}</a>
3232
{{else}}
33-
<span class="ui label tw-px-1 tw-mx-0">{{.PrettyRef}}</span>
33+
<span class="ui label run-list-ref gt-ellipsis">{{.PrettyRef}}</span>
3434
{{end}}
35-
</div>
36-
<div class="run-list-item-right">
37-
<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated ctx.Locale}}</div>
38-
<div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div>
35+
<div class="run-list-item-right">
36+
<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated ctx.Locale}}</div>
37+
<div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div>
38+
</div>
3939
</div>
4040
</div>
4141
{{end}}

templates/repo/editor/edit.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{{range $i, $v := .TreeNames}}
1616
<div class="breadcrumb-divider">/</div>
1717
{{if eq $i $l}}
18-
<input id="file-name" maxlength="500" value="{{$v}}" placeholder="{{ctx.Locale.Tr "repo.editor.name_your_file"}}" data-editorconfig="{{$.EditorconfigJson}}" required autofocus>
18+
<input id="file-name" maxlength="255" value="{{$v}}" placeholder="{{ctx.Locale.Tr "repo.editor.name_your_file"}}" data-editorconfig="{{$.EditorconfigJson}}" required autofocus>
1919
<span data-tooltip-content="{{ctx.Locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
2020
{{else}}
2121
<span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>

templates/repo/editor/upload.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{{range $i, $v := .TreeNames}}
1414
<div class="breadcrumb-divider">/</div>
1515
{{if eq $i $l}}
16-
<input type="text" id="file-name" maxlength="500" value="{{$v}}" placeholder="{{ctx.Locale.Tr "repo.editor.add_subdir"}}" autofocus>
16+
<input type="text" id="file-name" maxlength="255" value="{{$v}}" placeholder="{{ctx.Locale.Tr "repo.editor.add_subdir"}}" autofocus>
1717
<span data-tooltip-content="{{ctx.Locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
1818
{{else}}
1919
<span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>

tests/integration/pull_create_test.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package integration
55

66
import (
7+
"fmt"
78
"net/http"
89
"net/http/httptest"
910
"net/url"
@@ -57,6 +58,30 @@ func testPullCreate(t *testing.T, session *TestSession, user, repo string, toSel
5758
return resp
5859
}
5960

61+
func testPullCreateDirectly(t *testing.T, session *TestSession, baseRepoOwner, baseRepoName, baseBranch, headRepoOwner, headRepoName, headBranch, title string) *httptest.ResponseRecorder {
62+
headCompare := headBranch
63+
if headRepoOwner != "" {
64+
if headRepoName != "" {
65+
headCompare = fmt.Sprintf("%s/%s:%s", headRepoOwner, headRepoName, headBranch)
66+
} else {
67+
headCompare = fmt.Sprintf("%s:%s", headRepoOwner, headBranch)
68+
}
69+
}
70+
req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s/compare/%s...%s", baseRepoOwner, baseRepoName, baseBranch, headCompare))
71+
resp := session.MakeRequest(t, req, http.StatusOK)
72+
73+
// Submit the form for creating the pull
74+
htmlDoc := NewHTMLParser(t, resp.Body)
75+
link, exists := htmlDoc.doc.Find("form.ui.form").Attr("action")
76+
assert.True(t, exists, "The template has changed")
77+
req = NewRequestWithValues(t, "POST", link, map[string]string{
78+
"_csrf": htmlDoc.GetCSRF(),
79+
"title": title,
80+
})
81+
resp = session.MakeRequest(t, req, http.StatusOK)
82+
return resp
83+
}
84+
6085
func TestPullCreate(t *testing.T) {
6186
onGiteaRun(t, func(t *testing.T, u *url.URL) {
6287
session := loginUser(t, "user1")

tests/integration/pull_review_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,18 @@ func TestPullView_CodeOwner(t *testing.T) {
161161
assert.NoError(t, err)
162162

163163
session := loginUser(t, "user5")
164-
testPullCreate(t, session, "user5", "test_codeowner", true, forkedRepo.DefaultBranch, "codeowner-basebranch-forked", "Test Pull Request2")
164+
165+
// create a pull request on the forked repository, code reviewers should not be mentioned
166+
testPullCreateDirectly(t, session, "user5", "test_codeowner", forkedRepo.DefaultBranch, "", "", "codeowner-basebranch-forked", "Test Pull Request on Forked Repository")
165167

166168
pr := unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{BaseRepoID: forkedRepo.ID, HeadBranch: "codeowner-basebranch-forked"})
167169
unittest.AssertExistsIf(t, false, &issues_model.Review{IssueID: pr.IssueID, Type: issues_model.ReviewTypeRequest, ReviewerID: 8})
170+
171+
// create a pull request to base repository, code reviewers should be mentioned
172+
testPullCreateDirectly(t, session, repo.OwnerName, repo.Name, repo.DefaultBranch, forkedRepo.OwnerName, forkedRepo.Name, "codeowner-basebranch-forked", "Test Pull Request3")
173+
174+
pr = unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{BaseRepoID: repo.ID, HeadRepoID: forkedRepo.ID, HeadBranch: "codeowner-basebranch-forked"})
175+
unittest.AssertExistsIf(t, true, &issues_model.Review{IssueID: pr.IssueID, Type: issues_model.ReviewTypeRequest, ReviewerID: 8})
168176
})
169177
})
170178
}

web_src/css/actions.css

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@
4444
}
4545

4646
.run-list-item-right {
47-
flex: 0 0 min(20%, 130px);
47+
width: 130px;
4848
display: flex;
4949
flex-direction: column;
50+
flex-shrink: 0;
5051
gap: 3px;
5152
color: var(--color-text-light);
5253
}
@@ -57,3 +58,26 @@
5758
gap: .25rem;
5859
align-items: center;
5960
}
61+
62+
.run-list .flex-item-trailing {
63+
flex-wrap: nowrap;
64+
width: 280px;
65+
flex: 0 0 280px;
66+
}
67+
68+
.run-list-ref {
69+
display: inline-block !important;
70+
}
71+
72+
@media (max-width: 767.98px) {
73+
.run-list .flex-item-trailing {
74+
flex-direction: column;
75+
align-items: flex-end;
76+
width: auto;
77+
flex-basis: auto;
78+
}
79+
.run-list-item-right,
80+
.run-list-ref {
81+
max-width: 110px;
82+
}
83+
}

web_src/css/modules/button.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@
249249

250250
.ui.red.button,
251251
.ui.red.buttons .button {
252+
color: var(--color-white);
252253
background: var(--color-red);
253254
}
254255

@@ -283,6 +284,7 @@
283284

284285
.ui.green.button,
285286
.ui.green.buttons .button {
287+
color: var(--color-white);
286288
background: var(--color-green);
287289
}
288290

web_src/css/modules/menu.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,6 @@
588588
.ui.secondary.pointing.menu .dropdown.item:active,
589589
.ui.secondary.pointing.menu a.item:active {
590590
background-color: transparent;
591-
border-color: var(--color-secondary);
592591
}
593592

594593
.ui.secondary.pointing.menu .active.item {

web_src/css/repo.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,12 @@ td .commit-summary {
10631063
margin-left: 15px;
10641064
}
10651065

1066+
.repository.view.issue .comment-list .event .detail .text {
1067+
overflow: hidden;
1068+
white-space: nowrap;
1069+
text-overflow: ellipsis;
1070+
}
1071+
10661072
.repository.view.issue .comment-list .event .segments {
10671073
box-shadow: none;
10681074
}

web_src/js/components/RepoActionView.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export function initRepositoryActionView() {
377377
<button class="ui basic small compact button red" @click="cancelRun()" v-else-if="run.canCancel">
378378
{{ locale.cancel }}
379379
</button>
380-
<button class="ui basic small compact button tw-mr-0 link-action" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
380+
<button class="ui basic small compact button tw-mr-0 tw-whitespace-nowrap link-action" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
381381
{{ locale.rerun_all }}
382382
</button>
383383
</div>
@@ -386,8 +386,8 @@ export function initRepositoryActionView() {
386386
<a class="muted" :href="run.commit.link">{{ run.commit.shortSHA }}</a>
387387
{{ run.commit.localePushedBy }}
388388
<a class="muted" :href="run.commit.pusher.link">{{ run.commit.pusher.displayName }}</a>
389-
<span class="ui label" v-if="run.commit.shortSHA">
390-
<a :href="run.commit.branch.link">{{ run.commit.branch.name }}</a>
389+
<span class="ui label tw-max-w-full" v-if="run.commit.shortSHA">
390+
<a class="gt-ellipsis" :href="run.commit.branch.link">{{ run.commit.branch.name }}</a>
391391
</span>
392392
</div>
393393
</div>
@@ -426,8 +426,8 @@ export function initRepositoryActionView() {
426426
427427
<div class="action-view-right">
428428
<div class="job-info-header">
429-
<div class="job-info-header-left">
430-
<h3 class="job-info-header-title">
429+
<div class="job-info-header-left gt-ellipsis">
430+
<h3 class="job-info-header-title gt-ellipsis">
431431
{{ currentJob.title }}
432432
</h3>
433433
<p class="job-info-header-detail">
@@ -503,6 +503,7 @@ export function initRepositoryActionView() {
503503
display: flex;
504504
align-items: center;
505505
justify-content: space-between;
506+
gap: 8px;
506507
}
507508
508509
.action-info-summary-title {
@@ -513,6 +514,7 @@ export function initRepositoryActionView() {
513514
font-size: 20px;
514515
margin: 0 0 0 8px;
515516
flex: 1;
517+
overflow-wrap: anywhere;
516518
}
517519
518520
.action-commit-summary {
@@ -728,6 +730,10 @@ export function initRepositoryActionView() {
728730
font-size: 12px;
729731
}
730732
733+
.job-info-header-left {
734+
flex: 1;
735+
}
736+
731737
.job-step-container {
732738
max-height: 100%;
733739
border-radius: 0 0 var(--border-radius) var(--border-radius);

0 commit comments

Comments
 (0)