Merge branch 'main' into add-issue-planned-time

This commit is contained in:
スツゼル 2023-06-19 16:34:14 +03:00 committed by GitHub
commit 598e2d5bed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 263 additions and 110 deletions

View File

@ -4,24 +4,20 @@ on:
workflow_call:
outputs:
backend:
description: "whether backend files changed"
value: ${{ jobs.detect.outputs.backend }}
frontend:
description: "whether frontend files changed"
value: ${{ jobs.detect.outputs.frontend }}
docs:
description: "whether docs files changed"
value: ${{ jobs.detect.outputs.docs }}
actions:
description: "whether actions files changed"
value: ${{ jobs.detect.outputs.actions }}
templates:
description: "whether templates files changed"
value: ${{ jobs.detect.outputs.templates }}
docker:
value: ${{ jobs.detect.outputs.docker }}
jobs:
detect:
name: detect which files changed
runs-on: ubuntu-latest
timeout-minutes: 3
# Map a step output to a job output
@ -31,6 +27,7 @@ jobs:
docs: ${{ steps.changes.outputs.docs }}
actions: ${{ steps.changes.outputs.actions }}
templates: ${{ steps.changes.outputs.templates }}
docker: ${{ steps.changes.outputs.docker }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
@ -59,3 +56,7 @@ jobs:
templates:
- "templates/**/*.tmpl"
- "poetry.lock"
docker:
- "Dockerfile"
- "Dockerfile.rootless"
- "docker/**"

View File

@ -11,8 +11,8 @@ jobs:
files-changed:
uses: ./.github/workflows/files-changed.yml
docker-dryrun:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.frontend == 'true' || needs.files-changed.outputs.actions == 'true'
regular:
if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.actions == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
@ -21,3 +21,15 @@ jobs:
with:
push: false
tags: gitea/gitea:linux-amd64
rootless:
if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.actions == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
push: false
file: Dockerfile.rootless
tags: gitea/gitea:linux-amd64

View File

@ -68,7 +68,7 @@ endif
EXTRA_GOFLAGS ?=
MAKE_VERSION := $(shell "$(MAKE)" -v | head -n 1)
MAKE_VERSION := $(shell "$(MAKE)" -v | cat | head -n 1)
MAKE_EVIDENCE_DIR := .make_evidence
ifeq ($(RACE_ENABLED),true)

View File

@ -140,6 +140,10 @@ func (b *Base) JSONRedirect(redirect string) {
b.JSON(http.StatusOK, map[string]any{"redirect": redirect})
}
func (b *Base) JSONOK() {
b.JSON(http.StatusOK, map[string]any{"ok": true}) // this is only a dummy response, frontend seldom uses it
}
func (b *Base) JSONError(msg string) {
b.JSON(http.StatusBadRequest, map[string]any{"errorMessage": msg})
}

View File

@ -130,6 +130,8 @@ show_timestamps = Show timestamps
show_log_seconds = Show seconds
show_full_screen = Show full screen
confirm_delete_selected = Confirm to delete all selected items?
[aria]
navbar = Navigation Bar
footer = Footer

View File

@ -79,6 +79,8 @@ milestones=マイルストーン
ok=OK
cancel=キャンセル
rerun=再実行
rerun_all=すべてのジョブを再実行
save=保存
add=追加
add_all=すべて追加
@ -113,11 +115,19 @@ unknown=不明
rss_feed=RSSフィード
pin=ピン留め
unpin=ピン留め解除
artifacts=成果物
concept_system_global=グローバル
concept_user_individual=個人
concept_code_repository=リポジトリ
concept_user_organization=組織
show_timestamps=タイムスタンプを表示
show_log_seconds=秒数を表示
show_full_screen=フルスクリーン表示
[aria]
navbar=ナビゲーションバー
@ -314,6 +324,7 @@ repos=リポジトリ
users=ユーザー
organizations=組織
search=検索
go_to=開く
code=コード
search.type.tooltip=検索タイプ
search.fuzzy=あいまい
@ -517,6 +528,7 @@ lang_select_error=言語をリストから選択してください。
username_been_taken=ユーザー名が既に使用されています。
username_change_not_local_user=非ローカルユーザーのユーザー名は変更できません。
username_has_not_been_changed=ユーザー名は変更されていません
repo_name_been_taken=リポジトリ名が既に使用されています。
repository_force_private=強制プライベートが有効です。プライベートリポジトリはパブリックにできません。
repository_files_already_exist=このリポジトリのファイルはすでに存在します。システム管理者に問い合わせてください。
@ -565,6 +577,7 @@ target_branch_not_exist=ターゲットのブランチが存在していませ
[user]
change_avatar=アバターを変更…
joined_on=%sに登録
repositories=リポジトリ
activity=公開アクティビティ
followers=フォロワー
@ -760,6 +773,8 @@ ssh_principal_deletion_desc=SSH証明書プリンシパルを削除して、ア
ssh_key_deletion_success=SSHキーを削除しました。
gpg_key_deletion_success=GPGキーを削除しました。
ssh_principal_deletion_success=プリンシパルを削除しました。
added_on=%sに追加
valid_until_date=%sまで有効
valid_forever=永久に有効
last_used=最終使用日
no_activity=使用されていません
@ -791,6 +806,13 @@ access_token_deletion_cancel_action=キャンセル
access_token_deletion_confirm_action=削除
access_token_deletion_desc=トークンを削除すると、それを使用しているアプリケーションは、アカウントへのアクセスができなくなります。これは元に戻せません。続行しますか?
delete_token_success=トークンを削除しました。 削除したトークンを使用しているアプリケーションは、今後あなたのアカウントにアクセスできません。
repo_and_org_access=リポジトリと組織へのアクセス
permissions_public_only=公開のみ
permissions_access_all=すべて (公開、プライベート、限定)
select_permissions=許可の選択
scoped_token_desc=認証は、選択したトークンスコープに対応する<a %s>API</a>ルートのみに制限されます。 詳細は<a %s>ドキュメント</a>を参照してください。
at_least_one_permission=トークンを作成するには、少なくともひとつの許可を選択する必要があります
permissions_list=許可:
manage_oauth2_applications=OAuth2アプリケーションの管理
edit_oauth2_application=OAuth2アプリケーションの編集
@ -804,6 +826,7 @@ create_oauth2_application_success=新しいOAuth2アプリケーションを作
update_oauth2_application_success=OAuth2アプリケーションを更新しました。
oauth2_application_name=アプリケーション名
oauth2_confidential_client=コンフィデンシャルクライアント。 ウェブアプリのように秘密情報を機密にできるアプリの場合に選択します。 デスクトップアプリやモバイルアプリなどのネイティブアプリには選択しないでください。
oauth2_redirect_uris=リダイレクトURI (複数可)。 URIごとに改行してください。
save_application=保存
oauth2_client_id=クライアントID
oauth2_client_secret=クライアント シークレット
@ -949,6 +972,7 @@ mirror_password_blank_placeholder=(未設定)
mirror_password_help=ユーザー名を変更すると保存されているパスワードは消去されます。
watchers=ウォッチャー
stargazers=スターゲイザー
stars_remove_warning=これを指定すると、このリポジトリのスターはすべて削除されます。
forks=フォーク
reactions_more=さらに %d 件
unit_disabled=サイト管理者がこのリポジトリセクションを無効にしています。
@ -992,6 +1016,7 @@ template.one_item=最低一つはテンプレート項目を選択する必要
template.invalid=テンプレートリポジトリを選択する必要があります
archive.title=このリポジトリはアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュや、イシュー・プルリクエストのオープンはできません。
archive.title_date=このリポジトリは%sにアーカイブされています。 ファイルの閲覧やリポジトリのクローンは可能ですが、プッシュしたり、イシューやプルリクエストを作成することはできません。
archive.issue.nocomment=このリポジトリはアーカイブされています。 イシューにコメントを追加することはできません。
archive.pull.nocomment=このリポジトリはアーカイブされています。 プルリクエストにコメントを追加することはできません。
@ -1033,6 +1058,7 @@ migrated_from_fake=%[1]sから移行
migrate.migrate=%s からの移行
migrate.migrating=<b>%s</b> から移行しています ...
migrate.migrating_failed=<b>%s</b> からの移行が失敗しました。
migrate.migrating_failed.error=移行に失敗しました: %s
migrate.migrating_failed_no_addr=移行に失敗しました。
migrate.github.description=github.com やその他の GitHub インスタンスからデータを移行します。
migrate.git.description=Git サービスからリポジトリのみを移行します。
@ -1049,6 +1075,8 @@ migrate.migrating_labels=ラベル移行中
migrate.migrating_releases=リリース移行中
migrate.migrating_issues=イシュー移行中
migrate.migrating_pulls=プルリクエスト移行中
migrate.cancel_migrating_title=移行のキャンセル
migrate.cancel_migrating_confirm=この移行をキャンセルしますか?
mirror_from=ミラー元
forked_from=フォーク元
@ -1178,6 +1206,8 @@ editor.filename_is_invalid=`ファイル名が不正です: "%s"`
editor.branch_does_not_exist=このリポジトリにブランチ "%s" は存在しません。
editor.branch_already_exists=ブランチ "%s" は、このリポジトリに既に存在します。
editor.directory_is_a_file=ディレクトリ名 "%s" はすでにリポジトリ内のファイルで使用されています。
editor.file_is_a_symlink=`"%s" はシンボリックリンクです。 シンボリックリンクはWebエディターで編集できません。`
editor.filename_is_a_directory=ファイル名 "%s" は、このリポジトリ上でディレクトリ名としてすでに使用されています。
editor.file_editing_no_longer_exists=編集中のファイル "%s" が、もうリポジトリ内にありません。
editor.file_deleting_no_longer_exists=削除しようとしたファイル "%s" が、すでにリポジトリ内にありません。
editor.file_changed_while_editing=あなたが編集を開始したあと、ファイルの内容が変更されました。 <a target="_blank" rel="noopener noreferrer" href="%s">ここをクリック</a>して何が変更されたか確認するか、<strong>もう一度"変更をコミット"をクリック</strong>して上書きします。
@ -1343,6 +1373,10 @@ issues.filter_label_exclude=`ラベルで除外するには <code>alt</code> + <
issues.filter_label_no_select=すべてのラベル
issues.filter_label_select_no_label=ラベルなし
issues.filter_milestone=マイルストーン
issues.filter_milestone_all=すべてのマイルストーン
issues.filter_milestone_none=マイルストーンなし
issues.filter_milestone_open=オープン中のマイルストーン
issues.filter_milestone_closed=クローズ済みマイルストーン
issues.filter_project=プロジェクト
issues.filter_project_all=すべてのプロジェクト
issues.filter_project_none=プロジェクトなし
@ -1402,6 +1436,8 @@ issues.context.edit=編集
issues.context.delete=削除
issues.no_content=まだ内容がありません
issues.close=イシューをクローズ
issues.comment_pull_merged_at=がコミット %[1]s を %[2]s にマージ %[3]s
issues.comment_manually_pull_merged_at=がコミット %[1]s を %[2]s に手動マージ %[3]s
issues.close_comment_issue=コメントしてクローズ
issues.reopen_issue=再オープンする
issues.reopen_comment_issue=コメントして再オープン
@ -1452,6 +1488,10 @@ issues.attachment.open_tab=`クリックして新しいタブで "%s" を見る`
issues.attachment.download=`クリックして "%s" をダウンロード`
issues.subscribe=購読する
issues.unsubscribe=購読を解除
issues.unpin_issue=イシューのピン留めを解除
issues.max_pinned=これ以上イシューをピン留めできません
issues.pin_comment=がピン留め %s
issues.unpin_comment=がピン留めを解除 %s
issues.lock=会話をロック
issues.unlock=会話をアンロック
issues.lock.unknown_reason=未定義の理由ではイシューをロックできません。
@ -1531,6 +1571,7 @@ issues.dependency.issue_closing_blockedby=このイシューのクローズは
issues.dependency.issue_close_blocks=このイシューは、これらのイシューのクローズをブロックしています
issues.dependency.pr_close_blocks=このプルリクエストは、これらのイシューのクローズをブロックしています
issues.dependency.issue_close_blocked=このイシューをクローズするには、ブロックしているイシューをすべてクローズする必要があります。
issues.dependency.issue_batch_close_blocked=選択したイシューの一括クローズはできません。 イシュー #%d に、まだオープン中の依存関係があります。
issues.dependency.pr_close_blocked=このプルリクエストを操作するには、ブロックしているイシューをすべてクローズする必要があります。
issues.dependency.blocks_short=ブロック対象
issues.dependency.blocked_by_short=依存先
@ -1876,6 +1917,16 @@ settings.hooks=Webhook
settings.githooks=Gitフック
settings.basic_settings=基本設定
settings.mirror_settings=ミラー設定
settings.mirror_settings.docs=コミット、タグ、ブランチを他のリポジトリと自動的に同期するように、このリポジトリを設定します。
settings.mirror_settings.docs.disabled_pull_mirror.instructions=コミット、タグ、ブランチを他のリポジトリに自動的にプッシュするように、このプロジェクトを設定します。 プル方式のミラーはサイト管理者により無効化されています。
settings.mirror_settings.docs.disabled_push_mirror.instructions=コミット、タグ、ブランチを他のリポジトリから自動的にプルするように、このプロジェクトを設定します。
settings.mirror_settings.docs.disabled_push_mirror.pull_mirror_warning=現在は「新しい移行」メニューでのみ対応しています。 詳細は次を参照:
settings.mirror_settings.docs.disabled_push_mirror.info=プッシュ方式のミラーはサイト管理者により無効化されています。
settings.mirror_settings.docs.no_new_mirrors=このリポジトリは他のリポジトリと変更をミラーリングしています。 現時点では新しいミラーを作成することはできないことに留意してください。
settings.mirror_settings.docs.can_still_use=既存ミラーを変更したりミラーを新規に作成することはできませんが、既存ミラーを利用することは可能です。
settings.mirror_settings.docs.pull_mirror_instructions=プル方式のミラーを設定するには、次を参照:
settings.mirror_settings.docs.doc_link_title=リポジトリをミラーリングするには?
settings.mirror_settings.docs.pulling_remote_title=リモートリポジトリからのプル
settings.mirror_settings.mirrored_repository=同期するリポジトリ
settings.mirror_settings.direction=方向
settings.mirror_settings.direction.pull=プル
@ -1888,6 +1939,8 @@ settings.sync_mirror=今すぐ同期
settings.mirror_sync_in_progress=ミラー同期を実行しています。 しばらくあとでまた確認してください。
settings.site=Webサイト
settings.update_settings=設定を更新
settings.update_mirror_settings=ミラーリング設定を更新
settings.branches.switch_default_branch=デフォルトブランチを切り替え
settings.branches.update_default_branch=デフォルトブランチを更新
settings.branches.add_new_rule=新しいルールを追加
settings.advanced_settings=拡張設定
@ -1986,6 +2039,7 @@ settings.delete_notices_2=- この操作は、リポジトリ <strong>%s</strong
settings.delete_notices_fork_1=- このリポジトリのフォークは、このリポジトリを削除すると独立したリポジトリになります。
settings.deletion_success=リポジトリを削除しました。
settings.update_settings_success=リポジトリの設定を更新しました。
settings.update_settings_no_unit=リポジトリには、少なくとも何らかの操作可能な機能を許可する必要があります。
settings.confirm_delete=リポジトリを削除
settings.add_collaborator=共同作業者を追加
settings.add_collaborator_success=共同作業者を追加しました。
@ -2083,6 +2137,10 @@ settings.event_pull_request_review=プルリクエストのレビュー
settings.event_pull_request_review_desc=プルリクエストの承認・拒否、またはレビューコメントが付いたとき。
settings.event_pull_request_sync=プルリクエストの同期
settings.event_pull_request_sync_desc=プルリクエストが同期されたとき。
settings.event_pull_request_review_request=プルリクエストのレビュー依頼
settings.event_pull_request_review_request_desc=プルリクエストのレビューが依頼されたとき、または依頼が削除されたとき。
settings.event_pull_request_approvals=プルリクエストの承認
settings.event_pull_request_merge=プルリクエストのマージ
settings.event_package=パッケージ
settings.event_package_desc=リポジトリにパッケージが作成または削除されたとき。
settings.branch_filter=ブランチ フィルター
@ -2138,12 +2196,15 @@ settings.protected_branch.delete_rule=ルールを削除
settings.protected_branch_can_push=プッシュを許可する
settings.protected_branch_can_push_yes=プッシュできます
settings.protected_branch_can_push_no=プッシュできません
settings.branch_protection=ブランチ '<b>%s</b>' の保護ルール
settings.protect_this_branch=ブランチの保護を有効にする
settings.protect_this_branch_desc=ブランチの削除を防ぎ、ブランチへのプッシュやマージを制限します。
settings.protect_disable_push=プッシュ無効
settings.protect_disable_push_desc=このブランチへのプッシュは許可されません。
settings.protect_enable_push=プッシュ有効
settings.protect_enable_push_desc=誰でも書き込み権限があれば、このブランチへのプッシュが許可されます。(強制プッシュ以外)
settings.protect_enable_merge=マージ有効
settings.protect_enable_merge_desc=誰でも書き込み権限があれば、このブランチへのプルリクエストのマージが許可されます。
settings.protect_whitelist_committers=ホワイトリストでプッシュを制限
settings.protect_whitelist_committers_desc=ホワイトリストに登録したユーザーまたはチームにのみ、このブランチへのプッシュが許可されます。(強制プッシュ以外)
settings.protect_whitelist_deploy_keys=プッシュ可能な書き込み権限を持つデプロイキーをホワイトリストに含める。
@ -2156,7 +2217,13 @@ settings.protect_merge_whitelist_committers_desc=ホワイトリストに登録
settings.protect_merge_whitelist_users=マージ・ホワイトリストに含むユーザー:
settings.protect_merge_whitelist_teams=マージ・ホワイトリストに含むチーム:
settings.protect_check_status_contexts=ステータスチェックを有効にする
settings.protect_status_check_patterns=ステータスチェック パターン:
settings.protect_status_check_patterns_desc=このルールの対象ブランチがマージ可能になる前に、どのステータスチェックがパスしなければならないかを、パターンで入力します。 各行にパターンを指定します。 この設定は空にできません。
settings.protect_check_status_contexts_desc=マージの前にステータスチェックがパスしていることを必須にします。 有効にした場合、まず他のブランチにコミットをプッシュしておき、このルールの対象ブランチのステータスチェックがパスしたあとに、マージまたは直接プッシュする必要があります。 マッチするコンテキストが無い場合は、コンテキストに関係なく最後のコミットが成功している必要があります。
settings.protect_check_status_contexts_list=この1週間に、このリポジトリに対して行われたステータスチェック
settings.protect_status_check_matched=マッチ
settings.protect_invalid_status_check_pattern=`不正なステータスチェックパターン: "%s"`
settings.protect_no_valid_status_check_patterns=有効なステータスチェックパターンがありません。
settings.protect_required_approvals=必要な承認数:
settings.protect_required_approvals_desc=肯定的なレビューの数を満たしたプルリクエストしかマージできないようにします。
settings.protect_approvals_whitelist_enabled=ホワイトリストに登録したユーザーやチームに承認を制限
@ -2168,6 +2235,7 @@ settings.dismiss_stale_approvals_desc=プルリクエストの内容を変える
settings.require_signed_commits=コミット署名必須
settings.require_signed_commits_desc=署名されていない場合、または署名が検証できなかった場合は、このブランチへのプッシュを拒否します。
settings.protect_branch_name_pattern=保護ブランチ名のパターン
settings.protect_patterns=パターン
settings.protect_protected_file_patterns=保護されるファイルのパターン (セミコロン';'で区切る):
settings.protect_protected_file_patterns_desc=保護されたファイルは、このブランチにファイルを追加・編集・削除する権限を持つユーザーであっても、直接変更することができなくなります。 セミコロン(';')で区切って複数のパターンを指定できます。 パターンの文法については <a href='https://pkg.go.dev/github.com/gobwas/glob#Compile'>github.com/gobwas/glob</a> を参照してください。 例: <code>.drone.yml</code>, <code>/docs/**/*.txt</code>
settings.protect_unprotected_file_patterns=保護しないファイルのパターン (セミコロン';'で区切る):
@ -2382,10 +2450,13 @@ branch.protected_deletion_failed=ブランチ "%s" は保護されています
branch.default_deletion_failed=ブランチ "%s" はデフォルトブランチです。 削除できません。
branch.restore=ブランチ "%s" の復元
branch.download=ブランチ "%s" をダウンロード
branch.rename=ブランチ名 "%s" を変更
branch.included_desc=このブランチはデフォルトブランチに含まれています
branch.included=埋没
branch.create_new_branch=このブランチをもとに作成します:
branch.confirm_create_branch=ブランチを作成
branch.warning_rename_default_branch=デフォルトブランチの名前を変更しようとしています。
branch.rename_branch_to=`"%s" を変更:`
branch.confirm_rename_branch=ブランチ名を変更
branch.create_branch_operation=ブランチを作成
branch.new_branch=新しいブランチの作成
@ -2944,6 +3015,7 @@ config.mailer_sendmail_timeout=Sendmail のタイムアウト
config.mailer_use_dummy=Dummy
config.test_email_placeholder=Email (例 test@example.com)
config.send_test_mail=テストメールを送信
config.send_test_mail_submit=送信
config.test_mail_failed=`"%s" へのテストメール送信に失敗しました: %v`
config.test_mail_sent=テストメールを "%s" へ送信しました。
@ -2983,13 +3055,16 @@ config.git_pull_timeout=プル操作のタイムアウト
config.git_gc_timeout=GC操作のタイムアウト
config.log_config=ログ設定
config.logger_name_fmt=ロガー: %s
config.disabled_logger=無効
config.access_log_mode=アクセスログのモード
config.access_log_template=アクセスログ テンプレート
config.xorm_log_sql=SQLのログ出力
config.get_setting_failed=%s の取得に失敗しました
config.set_setting_failed=%s の設定に失敗しました
monitor.stats=統計
monitor.cron=Cronタスク
monitor.name=名称
@ -2999,6 +3074,8 @@ monitor.previous=前回
monitor.execute_times=実行回数
monitor.process=実行中のプロセス
monitor.stacktrace=スタックトレース
monitor.processes_count=%d プロセス
monitor.download_diagnosis_report=診断レポートをダウンロード
monitor.desc=説明
monitor.start=開始日時
monitor.execute_time=実行時間
@ -3019,11 +3096,14 @@ monitor.queue.numberinqueue=キュー内の数
monitor.queue.review=設定確認
monitor.queue.review_add=確認/ワーカー追加
monitor.queue.settings.title=プール設定
monitor.queue.settings.desc=プールはワーカーキューの待機状態に応じて動的に大きくなります。
monitor.queue.settings.maxnumberworkers=ワーカー数上限
monitor.queue.settings.maxnumberworkers.placeholder=現在の設定 %[1]d
monitor.queue.settings.maxnumberworkers.error=ワーカー数上限は数値にしてください
monitor.queue.settings.submit=設定を更新
monitor.queue.settings.changed=設定を更新しました
monitor.queue.settings.remove_all_items=すべて削除
monitor.queue.settings.remove_all_items_done=キュー内のすべての項目を削除しました。
notices.system_notice_list=システム通知
notices.view_detail_header=通知の詳細を表示
@ -3158,9 +3238,15 @@ versions=バージョン
versions.view_all=すべて表示
dependency.id=ID
dependency.version=バージョン
alpine.registry=あなたの <code>/etc/apk/repositories</code> ファイルにURLを追加して、このレジストリをセットアップします:
alpine.registry.key=インデックス署名の検証のため、レジストリのRSA公開鍵を <code>/etc/apk/keys/</code> フォルダにダウンロードします:
alpine.registry.info=$branch と $repository は下にあるリストから選んでください。
alpine.install=パッケージをインストールするには、次のコマンドを実行します:
alpine.repository.branches=ブランチ
alpine.repository.repositories=リポジトリ
alpine.documentation=Alpine レジストリの詳細については、<a target="_blank" rel="noopener noreferrer" href="%s">ドキュメント</a> を参照してください。
alpine.repository=リポジトリ情報
alpine.repository.branches=Branches
alpine.repository.repositories=Repositories
alpine.repository.architectures=Architectures
cargo.registry=Cargo 設定ファイルでこのレジストリをセットアップします。(例 <code>~/.cargo/config.toml</code>):
cargo.install=Cargo を使用してパッケージをインストールするには、次のコマンドを実行します:
cargo.documentation=Cargoレジストリの詳細については、 <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/cargo/">ドキュメント</a> を参照してください。
@ -3193,11 +3279,21 @@ container.layers=イメージレイヤー
container.labels=ラベル
container.labels.key=キー
container.labels.value=
cran.registry=あなたの <code>Rprofile.site</code> ファイルに、このレジストリをセットアップします:
cran.install=パッケージをインストールするには、次のコマンドを実行します:
cran.documentation=CRAN レジストリの詳細については、<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/cran/">ドキュメント</a> を参照してください。
debian.registry=このレジストリをコマンドラインからセットアップします:
debian.registry.info=$distribution と $component は下にあるリストから選んでください。
debian.install=パッケージをインストールするには、次のコマンドを実行します:
debian.documentation=Debian レジストリの詳細については、<a target="_blank" rel="noopener noreferrer" href="%s">ドキュメント</a> を参照してください。
debian.repository=リポジトリ情報
debian.repository.distributions=Distributions
debian.repository.components=Components
debian.repository.architectures=Architectures
generic.download=コマンドラインでパッケージをダウンロードします:
generic.documentation=汎用 レジストリの詳細については、<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/generic">ドキュメント</a> を参照してください。
go.install=コマンドラインでパッケージをインストール:
go.documentation=Go レジストリの詳細については、<a target="_blank" rel="noopener noreferrer" href="%s">ドキュメント</a> を参照してください。
helm.registry=このレジストリをコマンドラインからセットアップします:
helm.install=パッケージをインストールするには、次のコマンドを実行します:
helm.documentation=Helm レジストリの詳細については、 <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/helm/">ドキュメント</a> を参照してください。
@ -3226,6 +3322,7 @@ pypi.install=pip を使用してパッケージをインストールするには
pypi.documentation=PyPI レジストリの詳細については、<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/pypi/">ドキュメント</a> を参照してください。
rpm.registry=このレジストリをコマンドラインからセットアップします:
rpm.install=パッケージをインストールするには、次のコマンドを実行します:
rpm.documentation=RPM レジストリの詳細については、<a target="_blank" rel="noopener noreferrer" href="%s">ドキュメント</a> を参照してください。
rubygems.install=gem を使用してパッケージをインストールするには、次のコマンドを実行します:
rubygems.install2=または Gemfile に追加します:
rubygems.dependencies.runtime=実行用依存関係
@ -3298,6 +3395,7 @@ deletion=シークレットの削除
deletion.description=シークレットの削除は恒久的で元に戻すことはできません。 続行しますか?
deletion.success=シークレットを削除しました。
deletion.failed=シークレットの削除に失敗しました。
management=シークレット管理
[actions]
actions=Actions

View File

@ -119,7 +119,7 @@ func generateTaskContext(t *actions_model.ActionTask) *structpb.Struct {
"head_ref": headRef, // string, The head_ref or source branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either pull_request or pull_request_target.
"job": fmt.Sprint(t.JobID), // string, The job_id of the current job.
"ref": t.Job.Run.Ref, // string, The fully-formed ref of the branch or tag that triggered the workflow run. For workflows triggered by push, this is the branch or tag ref that was pushed. For workflows triggered by pull_request, this is the pull request merge branch. For workflows triggered by release, this is the release tag created. For other triggers, this is the branch or tag ref that triggered the workflow run. This is only set if a branch or tag is available for the event type. The ref given is fully-formed, meaning that for branches the format is refs/heads/<branch_name>, for pull requests it is refs/pull/<pr_number>/merge, and for tags it is refs/tags/<tag_name>. For example, refs/heads/feature-branch-1.
"ref_name": refName.String(), // string, The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on GitHub. For example, feature-branch-1.
"ref_name": refName.ShortName(), // string, The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on GitHub. For example, feature-branch-1.
"ref_protected": false, // boolean, true if branch protections are configured for the ref that triggered the workflow run.
"ref_type": refName.RefType(), // string, The type of ref that triggered the workflow run. Valid values are branch or tag.
"path": "", // string, Path on the runner to the file that sets system PATH variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see "Workflow commands for GitHub Actions."

View File

@ -2757,6 +2757,20 @@ func ListIssues(ctx *context.Context) {
ctx.JSON(http.StatusOK, convert.ToAPIIssueList(ctx, issues))
}
func BatchDeleteIssues(ctx *context.Context) {
issues := getActionIssues(ctx)
if ctx.Written() {
return
}
for _, issue := range issues {
if err := issue_service.DeleteIssue(ctx, ctx.Doer, ctx.Repo.GitRepo, issue); err != nil {
ctx.ServerError("DeleteIssue", err)
return
}
}
ctx.JSONOK()
}
// UpdateIssueStatus change issue's status
func UpdateIssueStatus(ctx *context.Context) {
issues := getActionIssues(ctx)
@ -2792,9 +2806,7 @@ func UpdateIssueStatus(ctx *context.Context) {
}
}
}
ctx.JSON(http.StatusOK, map[string]interface{}{
"ok": true,
})
ctx.JSONOK()
}
// NewComment create a comment for issue

View File

@ -37,7 +37,6 @@ import (
"code.gitea.io/gitea/modules/upload"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/modules/web"
"code.gitea.io/gitea/modules/web/middleware"
"code.gitea.io/gitea/routers/utils"
asymkey_service "code.gitea.io/gitea/services/asymkey"
"code.gitea.io/gitea/services/automerge"
@ -1206,36 +1205,12 @@ func CompareAndPullRequestPost(ctx *context.Context) {
}
if ctx.HasError() {
middleware.AssignForm(form, ctx.Data)
// This stage is already stop creating new pull request, so it does not matter if it has
// something to compare or not.
PrepareCompareDiff(ctx, ci,
gitdiff.GetWhitespaceFlag(ctx.Data["WhitespaceBehavior"].(string)))
if ctx.Written() {
return
}
if len(form.Title) > 255 {
var trailer string
form.Title, trailer = util.SplitStringAtByteN(form.Title, 255)
form.Content = trailer + "\n\n" + form.Content
}
middleware.AssignForm(form, ctx.Data)
ctx.HTML(http.StatusOK, tplCompareDiff)
ctx.JSONError(ctx.GetErrMsg())
return
}
if util.IsEmptyString(form.Title) {
PrepareCompareDiff(ctx, ci,
gitdiff.GetWhitespaceFlag(ctx.Data["WhitespaceBehavior"].(string)))
if ctx.Written() {
return
}
ctx.RenderWithErr(ctx.Tr("repo.issues.new.title_empty"), tplCompareDiff, form)
ctx.JSONError(ctx.Tr("repo.issues.new.title_empty"))
return
}
@ -1278,20 +1253,20 @@ func CompareAndPullRequestPost(ctx *context.Context) {
pushrejErr := err.(*git.ErrPushRejected)
message := pushrejErr.Message
if len(message) == 0 {
ctx.Flash.Error(ctx.Tr("repo.pulls.push_rejected_no_message"))
} else {
flashError, err := ctx.RenderToString(tplAlertDetails, map[string]interface{}{
"Message": ctx.Tr("repo.pulls.push_rejected"),
"Summary": ctx.Tr("repo.pulls.push_rejected_summary"),
"Details": utils.SanitizeFlashErrorString(pushrejErr.Message),
})
if err != nil {
ctx.ServerError("CompareAndPullRequest.HTMLString", err)
return
}
ctx.Flash.Error(flashError)
ctx.JSONError(ctx.Tr("repo.pulls.push_rejected_no_message"))
return
}
ctx.Redirect(pullIssue.Link())
flashError, err := ctx.RenderToString(tplAlertDetails, map[string]interface{}{
"Message": ctx.Tr("repo.pulls.push_rejected"),
"Summary": ctx.Tr("repo.pulls.push_rejected_summary"),
"Details": utils.SanitizeFlashErrorString(pushrejErr.Message),
})
if err != nil {
ctx.ServerError("CompareAndPullRequest.HTMLString", err)
return
}
ctx.Flash.Error(flashError)
ctx.JSONRedirect(pullIssue.Link()) // FIXME: it's unfriendly, and will make the content lost
return
}
ctx.ServerError("NewPullRequest", err)
@ -1299,7 +1274,7 @@ func CompareAndPullRequestPost(ctx *context.Context) {
}
log.Trace("Pull request created: %d/%d", repo.ID, pullIssue.ID)
ctx.Redirect(pullIssue.Link())
ctx.JSONRedirect(pullIssue.Link())
}
// CleanUpPullRequest responses for delete merged branch when PR has been merged

View File

@ -1025,6 +1025,7 @@ func registerRoutes(m *web.Route) {
m.Post("/request_review", reqRepoIssuesOrPullsReader, repo.UpdatePullReviewRequest)
m.Post("/dismiss_review", reqRepoAdmin, web.Bind(forms.DismissReviewForm{}), repo.DismissReview)
m.Post("/status", reqRepoIssuesOrPullsWriter, repo.UpdateIssueStatus)
m.Post("/delete", reqRepoAdmin, repo.BatchDeleteIssues)
m.Post("/resolve_conversation", reqRepoIssuesOrPullsReader, repo.UpdateResolveConversation)
m.Post("/attachments", repo.UploadIssueAttachment)
m.Post("/attachments/remove", repo.DeleteAttachment)

View File

@ -8,7 +8,9 @@
It might be renamed to "link-fetch-action" to match the "form-fetch-action".
</div>
<div>
<button class="link-action" data-url="fetch-action-test?k=1">test</button>
<button class="link-action" data-url="fetch-action-test?k=1">test action</button>
<button class="link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with confirm</button>
<button class="ui red button link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with risky confirm</button>
</div>
</div>
<div>

View File

@ -282,9 +282,15 @@
{{if not .Repository.IsArchived}}
<!-- Action Button -->
{{if .IsShowClosed}}
<button class="ui green active basic button issue-action gt-ml-auto" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_open"}}</button>
<button class="ui green basic button issue-action gt-ml-auto" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_open"}}</button>
{{else}}
<button class="ui red active basic button issue-action gt-ml-auto" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_close"}}</button>
<button class="ui red basic button issue-action gt-ml-auto" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_close"}}</button>
{{end}}
{{if $.IsRepoAdmin}}
<button class="ui red button issue-action gt-ml-auto"
data-action="delete" data-url="{{$.RepoLink}}/issues/delete"
data-action-delete-confirm="{{.locale.Tr "confirm_delete_selected"}}"
>{{.locale.Tr "repo.issues.delete"}}</button>
{{end}}
<!-- Labels -->
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item">

View File

@ -11,6 +11,7 @@ import (
"strings"
"testing"
"code.gitea.io/gitea/modules/test"
"code.gitea.io/gitea/tests"
"github.com/stretchr/testify/assert"
@ -39,8 +40,7 @@ func testPullCreate(t *testing.T, session *TestSession, user, repo, branch, titl
"_csrf": htmlDoc.GetCSRF(),
"title": title,
})
resp = session.MakeRequest(t, req, http.StatusSeeOther)
resp = session.MakeRequest(t, req, http.StatusOK)
return resp
}
@ -52,7 +52,7 @@ func TestPullCreate(t *testing.T) {
resp := testPullCreate(t, session, "user1", "repo1", "master", "This is a pull title")
// check the redirected URL
url := resp.Header().Get("Location")
url := test.RedirectURL(resp)
assert.Regexp(t, "^/user2/repo1/pulls/[0-9]*$", url)
// check .diff can be accessed and matches performed change
@ -80,7 +80,7 @@ func TestPullCreate_TitleEscape(t *testing.T) {
resp := testPullCreate(t, session, "user1", "repo1", "master", "<i>XSS PR</i>")
// check the redirected URL
url := resp.Header().Get("Location")
url := test.RedirectURL(resp)
assert.Regexp(t, "^/user2/repo1/pulls/[0-9]*$", url)
// Edit title
@ -145,7 +145,7 @@ func TestPullBranchDelete(t *testing.T) {
resp := testPullCreate(t, session, "user1", "repo1", "master1", "This is a pull title")
// check the redirected URL
url := resp.Header().Get("Location")
url := test.RedirectURL(resp)
assert.Regexp(t, "^/user2/repo1/pulls/[0-9]*$", url)
req := NewRequest(t, "GET", url)
session.MakeRequest(t, req, http.StatusOK)

View File

@ -199,7 +199,7 @@ func TestCantMergeWorkInProgress(t *testing.T) {
resp := testPullCreate(t, session, "user1", "repo1", "master", "[wip] This is a pull title")
req := NewRequest(t, "GET", resp.Header().Get("Location"))
req := NewRequest(t, "GET", test.RedirectURL(resp))
resp = session.MakeRequest(t, req, http.StatusOK)
htmlDoc := NewHTMLParser(t, resp.Body)
text := strings.TrimSpace(htmlDoc.doc.Find(".merge-section > .item").Last().Text())

View File

@ -30,7 +30,7 @@ func TestPullCreate_CommitStatus(t *testing.T) {
"title": "pull request from status1",
},
)
session.MakeRequest(t, req, http.StatusSeeOther)
session.MakeRequest(t, req, http.StatusOK)
req = NewRequest(t, "GET", "/user1/repo1/pulls")
resp := session.MakeRequest(t, req, http.StatusOK)
@ -127,7 +127,7 @@ func TestPullCreate_EmptyChangesWithDifferentCommits(t *testing.T) {
"title": "pull request from status1",
},
)
session.MakeRequest(t, req, http.StatusSeeOther)
session.MakeRequest(t, req, http.StatusOK)
req = NewRequest(t, "GET", "/user1/repo1/pulls/1")
resp := session.MakeRequest(t, req, http.StatusOK)
@ -150,7 +150,7 @@ func TestPullCreate_EmptyChangesWithSameCommits(t *testing.T) {
"title": "pull request from status1",
},
)
session.MakeRequest(t, req, http.StatusSeeOther)
session.MakeRequest(t, req, http.StatusOK)
req = NewRequest(t, "GET", "/user1/repo1/pulls/1")
resp := session.MakeRequest(t, req, http.StatusOK)
doc := NewHTMLParser(t, resp.Body)

View File

@ -18,10 +18,11 @@
position: absolute;
display: block;
height: 4rem;
max-height: 50%;
aspect-ratio: 1 / 1;
left: 50%;
top: 50%;
max-height: 100%;
max-width: 100%;
transform: translate(-50%, -50%);
animation: isloadingspin 500ms infinite linear;
border-width: 4px;
@ -40,6 +41,15 @@
height: var(--height-loading);
}
.markup .is-loading > * {
visibility: hidden;
}
.markup .is-loading {
color: transparent;
background: transparent;
}
/* TODO: not needed, use "is-loading small-loading-icon" instead */
.btn-octicon.is-loading::after {
border-width: 2px;

View File

@ -8,6 +8,7 @@ import {svg} from '../svg.js';
import {hideElem, showElem, toggleElem} from '../utils/dom.js';
import {htmlEscape} from 'escape-goat';
import {createTippy} from '../modules/tippy.js';
import {confirmModal} from './comp/ConfirmModal.js';
const {appUrl, appSubUrl, csrfToken, i18n} = window.config;
@ -264,7 +265,7 @@ export function initGlobalDropzone() {
}
}
function linkAction(e) {
async function linkAction(e) {
e.preventDefault();
// A "link-action" can post AJAX request to its "data-url"
@ -291,33 +292,16 @@ function linkAction(e) {
});
};
const modalConfirmHtml = htmlEscape($this.attr('data-modal-confirm') || '');
if (!modalConfirmHtml) {
const modalConfirmContent = htmlEscape($this.attr('data-modal-confirm') || '');
if (!modalConfirmContent) {
doRequest();
return;
}
const okButtonColor = $this.hasClass('red') || $this.hasClass('yellow') || $this.hasClass('orange') || $this.hasClass('negative') ? 'orange' : 'green';
const $modal = $(`
<div class="ui g-modal-confirm modal">
<div class="content">${modalConfirmHtml}</div>
<div class="actions">
<button class="ui basic cancel button">${svg('octicon-x')} ${i18n.modal_cancel}</button>
<button class="ui ${okButtonColor} ok button">${svg('octicon-check')} ${i18n.modal_confirm}</button>
</div>
</div>
`);
$modal.appendTo(document.body);
$modal.modal({
onApprove() {
doRequest();
},
onHidden() {
$modal.remove();
},
}).modal('show');
const isRisky = $this.hasClass('red') || $this.hasClass('yellow') || $this.hasClass('orange') || $this.hasClass('negative');
if (await confirmModal({content: modalConfirmContent, buttonColor: isRisky ? 'orange' : 'green'})) {
doRequest();
}
}
export function initGlobalLinkActions() {

View File

@ -0,0 +1,30 @@
import $ from 'jquery';
import {svg} from '../../svg.js';
import {htmlEscape} from 'escape-goat';
const {i18n} = window.config;
export async function confirmModal(opts = {content: '', buttonColor: 'green'}) {
return new Promise((resolve) => {
const $modal = $(`
<div class="ui g-modal-confirm modal">
<div class="content">${htmlEscape(opts.content)}</div>
<div class="actions">
<button class="ui basic cancel button">${svg('octicon-x')} ${i18n.modal_cancel}</button>
<button class="ui ${opts.buttonColor || 'green'} ok button">${svg('octicon-check')} ${i18n.modal_confirm}</button>
</div>
</div>
`);
$modal.appendTo(document.body);
$modal.modal({
onApprove() {
resolve(true);
},
onHidden() {
$modal.remove();
resolve(false);
},
}).modal('show');
});
}

View File

@ -3,6 +3,7 @@ import {updateIssuesMeta} from './repo-issue.js';
import {toggleElem} from '../utils/dom.js';
import {htmlEscape} from 'escape-goat';
import {Sortable} from 'sortablejs';
import {confirmModal} from './comp/ConfirmModal.js';
function initRepoIssueListCheckboxes() {
const $issueSelectAll = $('.issue-checkbox-all');
@ -36,19 +37,36 @@ function initRepoIssueListCheckboxes() {
$('.issue-action').on('click', async function (e) {
e.preventDefault();
const url = this.getAttribute('data-url');
let action = this.getAttribute('data-action');
let elementId = this.getAttribute('data-element-id');
const url = this.getAttribute('data-url');
const issueIDs = $('.issue-checkbox:checked').map((_, el) => {
return el.getAttribute('data-issue-id');
}).get().join(',');
if (elementId === '0' && url.slice(-9) === '/assignee') {
let issueIDs = [];
for (const el of document.querySelectorAll('.issue-checkbox:checked')) {
issueIDs.push(el.getAttribute('data-issue-id'));
}
issueIDs = issueIDs.join(',');
if (!issueIDs) return;
// for assignee
if (elementId === '0' && url.endsWith('/assignee')) {
elementId = '';
action = 'clear';
}
// for toggle
if (action === 'toggle' && e.altKey) {
action = 'toggle-alt';
}
// for delete
if (action === 'delete') {
const confirmText = e.target.getAttribute('data-action-delete-confirm');
if (!await confirmModal({content: confirmText, buttonColor: 'orange'})) {
return;
}
}
updateIssuesMeta(
url,
action,

View File

@ -3,11 +3,9 @@ import tippy from 'tippy.js';
const visibleInstances = new Set();
export function createTippy(target, opts = {}) {
const {role, content, onHide: optsOnHide, onDestroy: optsOnDestroy, onShow: optOnShow} = opts;
delete opts.onHide;
delete opts.onDestroy;
delete opts.onShow;
// the callback functions should be destructured from opts,
// because we should use our own wrapper functions to handle them, do not let the user override them
const {onHide, onShow, onDestroy, ...other} = opts;
const instance = tippy(target, {
appendTo: document.body,
animation: false,
@ -18,11 +16,11 @@ export function createTippy(target, opts = {}) {
maxWidth: 500, // increase over default 350px
onHide: (instance) => {
visibleInstances.delete(instance);
return optsOnHide?.(instance);
return onHide?.(instance);
},
onDestroy: (instance) => {
visibleInstances.delete(instance);
return optsOnDestroy?.(instance);
return onDestroy?.(instance);
},
onShow: (instance) => {
// hide other tooltip instances so only one tooltip shows at a time
@ -32,19 +30,19 @@ export function createTippy(target, opts = {}) {
}
}
visibleInstances.add(instance);
return optOnShow?.(instance);
return onShow?.(instance);
},
arrow: `<svg width="16" height="7"><path d="m0 7 8-7 8 7Z" class="tippy-svg-arrow-outer"/><path d="m0 8 8-7 8 7Z" class="tippy-svg-arrow-inner"/></svg>`,
role: 'menu', // HTML role attribute, only tooltips should use "tooltip"
theme: role || 'menu', // CSS theme, we support either "tooltip" or "menu"
...opts,
theme: other.role || 'menu', // CSS theme, we support either "tooltip" or "menu"
...other,
});
// for popups where content refers to a DOM element, we use the 'tippy-target' class
// to initially hide the content, now we can remove it as the content has been removed
// from the DOM by tippy
if (content instanceof Element) {
content.classList.remove('tippy-target');
if (other.content instanceof Element) {
other.content.classList.remove('tippy-target');
}
return instance;