From dc39043cd6b6a66d53d58fbd82a538cd19c44d9a Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 17 Apr 2024 11:04:48 +0200 Subject: [PATCH 001/401] Change the default SSH clone url to the ssh:// style Rather than using an scp-style URI, use the same URL style for SSH clones as for HTTP(S) ones. This is not only more consistent, but the URL style allows one to specify a port, and makes it clear that it is an SSH clone URL. git itself favours the URL style, and mentions the scp-style in passing only. Said style is prominently used by GitHub, and might be more familiar for a lot of people, but other than familiarity, it has no advantage over the URL style. For the benefit of consistency, and flexibility, lets flip the default, and make it the URL style. Instance admins who prefer to use the scp-style, and are running SSH on its standard port, can change the setting back to false. This addresses #3193. Signed-off-by: Gergely Nagy --- modules/setting/repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/setting/repository.go b/modules/setting/repository.go index 50f0fd704c..6086dd1d57 100644 --- a/modules/setting/repository.go +++ b/modules/setting/repository.go @@ -162,7 +162,7 @@ var ( PreferredLicenses: []string{"Apache-2.0", "MIT"}, DisableHTTPGit: false, AccessControlAllowOrigin: "", - UseCompatSSHURI: false, + UseCompatSSHURI: true, DefaultCloseIssuesViaCommitsInAnyBranch: false, EnablePushCreateUser: false, EnablePushCreateOrg: false, From f23fd221e4f8c68eb7f3be3411f71ad93e23ac97 Mon Sep 17 00:00:00 2001 From: Otto Richter Date: Tue, 23 Apr 2024 00:41:52 +0200 Subject: [PATCH 002/401] Limit database max connections by default Our default of unlimited database connections is not sane, because every database has a limit, and our default should just follow this. Otherwise it will lead to issues every time a small instance gets a high traffic peak. Part of https://codeberg.org/forgejo/forgejo/issues/3381 The value of 100 is the lowest value from: - 100 Postgres https://www.postgresql.org/docs/current/runtime-config-connection.html#GUC-MAX-CONNECTIONS - 151 MySQL https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_max_connections - 151 MariaDB https://mariadb.com/docs/server/ref/mdb/system-variables/max_connections/ --- custom/conf/app.example.ini | 4 ++-- modules/setting/database.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 23b41e0853..4eee2cd1ff 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -407,8 +407,8 @@ USER = root ;; Database connection max life time, default is 0 or 3s mysql (See #6804 & #7071 for reasoning) ;CONN_MAX_LIFETIME = 3s ;; -;; Database maximum number of open connections, default is 0 meaning no maximum -;MAX_OPEN_CONNS = 0 +;; Database maximum number of open connections, default is 100 which is the lowest default from Postgres (MariaDB + MySQL default to 151). Ensure you only increase the value if you configured your database server accordingly. +;MAX_OPEN_CONNS = 100 ;; ;; Whether execute database models migrations automatically ;AUTO_MIGRATION = true diff --git a/modules/setting/database.go b/modules/setting/database.go index 6abef42cba..76fae27164 100644 --- a/modules/setting/database.go +++ b/modules/setting/database.go @@ -83,7 +83,7 @@ func loadDBSetting(rootCfg ConfigProvider) { Database.ConnMaxLifetime = sec.Key("CONN_MAX_LIFETIME").MustDuration(0) } Database.ConnMaxIdleTime = sec.Key("CONN_MAX_IDLETIME").MustDuration(0) - Database.MaxOpenConns = sec.Key("MAX_OPEN_CONNS").MustInt(0) + Database.MaxOpenConns = sec.Key("MAX_OPEN_CONNS").MustInt(100) Database.IterateBufferSize = sec.Key("ITERATE_BUFFER_SIZE").MustInt(50) Database.LogSQL = sec.Key("LOG_SQL").MustBool(false) From 314bac6ceee87659aa725da83dd2abc622c9c623 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 24 Apr 2024 00:04:34 +0000 Subject: [PATCH 003/401] Update dependency vitest to v1.5.0 --- package-lock.json | 77 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 38 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index 62628a8c8d..ca40d445b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -96,7 +96,7 @@ "svgo": "3.2.0", "updates": "16.0.1", "vite-string-plugin": "1.2.0", - "vitest": "1.4.0" + "vitest": "1.5.0" }, "engines": { "node": ">= 18.0.0" @@ -2545,13 +2545,13 @@ } }, "node_modules/@vitest/expect": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.4.0.tgz", - "integrity": "sha512-Jths0sWCJZ8BxjKe+p+eKsoqev1/T8lYcrjavEaz8auEJ4jAVY0GwW3JKmdVU4mmNPLPHixh4GNXP7GFtAiDHA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.5.0.tgz", + "integrity": "sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA==", "dev": true, "dependencies": { - "@vitest/spy": "1.4.0", - "@vitest/utils": "1.4.0", + "@vitest/spy": "1.5.0", + "@vitest/utils": "1.5.0", "chai": "^4.3.10" }, "funding": { @@ -2559,12 +2559,12 @@ } }, "node_modules/@vitest/runner": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.4.0.tgz", - "integrity": "sha512-EDYVSmesqlQ4RD2VvWo3hQgTJ7ZrFQ2VSJdfiJiArkCerDAGeyF1i6dHkmySqk573jLp6d/cfqCN+7wUB5tLgg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.5.0.tgz", + "integrity": "sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ==", "dev": true, "dependencies": { - "@vitest/utils": "1.4.0", + "@vitest/utils": "1.5.0", "p-limit": "^5.0.0", "pathe": "^1.1.1" }, @@ -2600,9 +2600,9 @@ } }, "node_modules/@vitest/snapshot": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.4.0.tgz", - "integrity": "sha512-saAFnt5pPIA5qDGxOHxJ/XxhMFKkUSBJmVt5VgDsAqPTX6JP326r5C/c9UuCMPoXNzuudTPsYDZCoJ5ilpqG2A==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.5.0.tgz", + "integrity": "sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A==", "dev": true, "dependencies": { "magic-string": "^0.30.5", @@ -2626,9 +2626,9 @@ } }, "node_modules/@vitest/spy": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.4.0.tgz", - "integrity": "sha512-Ywau/Qs1DzM/8Uc+yA77CwSegizMlcgTJuYGAi0jujOteJOUf1ujunHThYo243KG9nAyWT3L9ifPYZ5+As/+6Q==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.5.0.tgz", + "integrity": "sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w==", "dev": true, "dependencies": { "tinyspy": "^2.2.0" @@ -2638,9 +2638,9 @@ } }, "node_modules/@vitest/utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.4.0.tgz", - "integrity": "sha512-mx3Yd1/6e2Vt/PUC98DcqTirtfxUyAZ32uK82r8rZzbtBeBo+nqgnjx/LvqQdWsrvNtm14VmurNgcf4nqY5gJg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.5.0.tgz", + "integrity": "sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==", "dev": true, "dependencies": { "diff-sequences": "^29.6.3", @@ -12157,9 +12157,9 @@ } }, "node_modules/vite-node": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.4.0.tgz", - "integrity": "sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.5.0.tgz", + "integrity": "sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==", "dev": true, "dependencies": { "cac": "^6.7.14", @@ -12239,16 +12239,16 @@ } }, "node_modules/vitest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.4.0.tgz", - "integrity": "sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.5.0.tgz", + "integrity": "sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw==", "dev": true, "dependencies": { - "@vitest/expect": "1.4.0", - "@vitest/runner": "1.4.0", - "@vitest/snapshot": "1.4.0", - "@vitest/spy": "1.4.0", - "@vitest/utils": "1.4.0", + "@vitest/expect": "1.5.0", + "@vitest/runner": "1.5.0", + "@vitest/snapshot": "1.5.0", + "@vitest/spy": "1.5.0", + "@vitest/utils": "1.5.0", "acorn-walk": "^8.3.2", "chai": "^4.3.10", "debug": "^4.3.4", @@ -12260,9 +12260,9 @@ "std-env": "^3.5.0", "strip-literal": "^2.0.0", "tinybench": "^2.5.1", - "tinypool": "^0.8.2", + "tinypool": "^0.8.3", "vite": "^5.0.0", - "vite-node": "1.4.0", + "vite-node": "1.5.0", "why-is-node-running": "^2.2.2" }, "bin": { @@ -12277,8 +12277,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.4.0", - "@vitest/ui": "1.4.0", + "@vitest/browser": "1.5.0", + "@vitest/ui": "1.5.0", "happy-dom": "*", "jsdom": "*" }, @@ -12304,15 +12304,12 @@ } }, "node_modules/vitest/node_modules/magic-string": { - "version": "0.30.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.9.tgz", - "integrity": "sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==", + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" } }, "node_modules/vue": { diff --git a/package.json b/package.json index 0f1daf3a93..9b2a12e077 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "svgo": "3.2.0", "updates": "16.0.1", "vite-string-plugin": "1.2.0", - "vitest": "1.4.0" + "vitest": "1.5.0" }, "browserslist": ["defaults"] } From 92ef180efa43d4bf0497f67b5425f1bfa35a9c21 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 24 Apr 2024 02:04:15 +0000 Subject: [PATCH 004/401] Update linters --- package-lock.json | 158 +++++++++++++++++++++++++++++++++++++--------- package.json | 10 +-- 2 files changed, 134 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 62628a8c8d..081db4c5fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,18 +78,18 @@ "eslint-plugin-jquery": "1.5.1", "eslint-plugin-no-jquery": "2.7.0", "eslint-plugin-no-use-extend-native": "0.5.0", - "eslint-plugin-regexp": "2.4.0", + "eslint-plugin-regexp": "2.5.0", "eslint-plugin-sonarjs": "0.25.1", "eslint-plugin-unicorn": "52.0.0", - "eslint-plugin-vitest": "0.4.1", + "eslint-plugin-vitest": "0.5.4", "eslint-plugin-vitest-globals": "1.5.0", - "eslint-plugin-vue": "9.24.0", + "eslint-plugin-vue": "9.25.0", "eslint-plugin-vue-scoped-css": "2.8.0", - "eslint-plugin-wc": "2.0.4", + "eslint-plugin-wc": "2.1.0", "happy-dom": "14.7.1", "markdownlint-cli": "0.39.0", "postcss-html": "1.6.0", - "stylelint": "16.3.1", + "stylelint": "16.4.0", "stylelint-declaration-block-no-ignored-properties": "2.8.0", "stylelint-declaration-strict-value": "1.10.4", "stylelint-value-no-unknown-custom-properties": "6.0.1", @@ -3990,9 +3990,9 @@ } }, "node_modules/css-functions-list": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.1.tgz", - "integrity": "sha512-Nj5YcaGgBtuUmn1D7oHqPW0c9iui7xsTsj5lIX8ZgevdfhmjFfKB3r8moHJtNJnctnYXJyYX5I1pp90HM4TPgQ==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz", + "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==", "dev": true, "engines": { "node": ">=12 || >=16" @@ -5770,9 +5770,9 @@ } }, "node_modules/eslint-plugin-regexp": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-2.4.0.tgz", - "integrity": "sha512-OL2S6VPjQhs9s/NclQ0qattVq1J0GU8ox70/HIVy5Dxw+qbbdd7KQkyucsez2clEQjvdtDe12DTnPphFFUyXFg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-2.5.0.tgz", + "integrity": "sha512-I7vKcP0o75WS5SHiVNXN+Eshq49sbrweMQIuqSL3AId9AwDe9Dhbfug65vw64LxmOd4v+yf5l5Xt41y9puiq0g==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -5836,18 +5836,18 @@ } }, "node_modules/eslint-plugin-vitest": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-vitest/-/eslint-plugin-vitest-0.4.1.tgz", - "integrity": "sha512-+PnZ2u/BS+f5FiuHXz4zKsHPcMKHie+K+1Uvu/x91ovkCMEOJqEI8E9Tw1Wzx2QRz4MHOBHYf1ypO8N1K0aNAA==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-vitest/-/eslint-plugin-vitest-0.5.4.tgz", + "integrity": "sha512-um+odCkccAHU53WdKAw39MY61+1x990uXjSPguUCq3VcEHdqJrOb8OTMrbYlY6f9jAKx7x98kLVlIe3RJeJqoQ==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "^7.4.0" + "@typescript-eslint/utils": "^7.7.1" }, "engines": { "node": "^18.0.0 || >= 20.0.0" }, "peerDependencies": { - "eslint": ">=8.0.0", + "eslint": "^8.57.0 || ^9.0.0", "vitest": "*" }, "peerDependenciesMeta": { @@ -5865,10 +5865,110 @@ "integrity": "sha512-ZSsVOaOIig0oVLzRTyk8lUfBfqzWxr/J3/NFMfGGRIkGQPejJYmDH3gXmSJxAojts77uzAGB/UmVrwi2DC4LYA==", "dev": true }, + "node_modules/eslint-plugin-vitest/node_modules/@typescript-eslint/scope-manager": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz", + "integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.7.1", + "@typescript-eslint/visitor-keys": "7.7.1" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-vitest/node_modules/@typescript-eslint/types": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz", + "integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==", + "dev": true, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-vitest/node_modules/@typescript-eslint/typescript-estree": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz", + "integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.7.1", + "@typescript-eslint/visitor-keys": "7.7.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-vitest/node_modules/@typescript-eslint/utils": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.1.tgz", + "integrity": "sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.15", + "@types/semver": "^7.5.8", + "@typescript-eslint/scope-manager": "7.7.1", + "@typescript-eslint/types": "7.7.1", + "@typescript-eslint/typescript-estree": "7.7.1", + "semver": "^7.6.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/eslint-plugin-vitest/node_modules/@typescript-eslint/visitor-keys": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz", + "integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.7.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/eslint-plugin-vue": { - "version": "9.24.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.24.0.tgz", - "integrity": "sha512-9SkJMvF8NGMT9aQCwFc5rj8Wo1XWSMSHk36i7ZwdI614BU7sIOR28ZjuFPKp8YGymZN12BSEbiSwa7qikp+PBw==", + "version": "9.25.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.25.0.tgz", + "integrity": "sha512-tDWlx14bVe6Bs+Nnh3IGrD+hb11kf2nukfm6jLsmJIhmiRQ1SUaksvwY9U5MvPB0pcrg0QK0xapQkfITs3RKOA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", @@ -5884,7 +5984,7 @@ "node": "^14.17.0 || >=16.0.0" }, "peerDependencies": { - "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0" + "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/eslint-plugin-vue-scoped-css": { @@ -5914,9 +6014,9 @@ } }, "node_modules/eslint-plugin-wc": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-wc/-/eslint-plugin-wc-2.0.4.tgz", - "integrity": "sha512-ORu7MBv0hXIvq894EJad70m+AvHGbmrDdKT6lcgtCVVhEbuIAyxg0ilfqqqHOmsh8PfcUBeEae3y7CElKvm1KQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-wc/-/eslint-plugin-wc-2.1.0.tgz", + "integrity": "sha512-s/BGOtmpgQ2yifR6EC1OM9t0DwYLgg4ZAL07Kw4eXvBb5TYaPafI+65tswvnZvhH8FqcjERLbBZPPvYsvinkfg==", "dev": true, "dependencies": { "is-valid-element-name": "^1.0.0", @@ -11031,20 +11131,20 @@ "dev": true }, "node_modules/stylelint": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.3.1.tgz", - "integrity": "sha512-/JOwQnBvxEKOT2RtNgGpBVXnCSMBgKOL2k7w0K52htwCyJls4+cHvc4YZgXlVoAZS9QJd2DgYAiRnja96pTgxw==", + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.4.0.tgz", + "integrity": "sha512-uSx7VMuXwLuYcNSIg+0/fFNv0WinsfLAqsVVy7h7p80clKOHiGE8pfY6UjqwylTHiJrRIahTl6a8FPxGezhWoA==", "dev": true, "dependencies": { "@csstools/css-parser-algorithms": "^2.6.1", "@csstools/css-tokenizer": "^2.2.4", "@csstools/media-query-list-parser": "^2.1.9", - "@csstools/selector-specificity": "^3.0.2", + "@csstools/selector-specificity": "^3.0.3", "@dual-bundle/import-meta-resolve": "^4.0.0", "balanced-match": "^2.0.0", "colord": "^2.9.3", "cosmiconfig": "^9.0.0", - "css-functions-list": "^3.2.1", + "css-functions-list": "^3.2.2", "css-tree": "^2.3.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", @@ -11073,7 +11173,7 @@ "strip-ansi": "^7.1.0", "supports-hyperlinks": "^3.0.0", "svg-tags": "^1.0.0", - "table": "^6.8.1", + "table": "^6.8.2", "write-file-atomic": "^5.0.1" }, "bin": { diff --git a/package.json b/package.json index 0f1daf3a93..43ff54ba71 100644 --- a/package.json +++ b/package.json @@ -77,18 +77,18 @@ "eslint-plugin-jquery": "1.5.1", "eslint-plugin-no-jquery": "2.7.0", "eslint-plugin-no-use-extend-native": "0.5.0", - "eslint-plugin-regexp": "2.4.0", + "eslint-plugin-regexp": "2.5.0", "eslint-plugin-sonarjs": "0.25.1", "eslint-plugin-unicorn": "52.0.0", - "eslint-plugin-vitest": "0.4.1", + "eslint-plugin-vitest": "0.5.4", "eslint-plugin-vitest-globals": "1.5.0", - "eslint-plugin-vue": "9.24.0", + "eslint-plugin-vue": "9.25.0", "eslint-plugin-vue-scoped-css": "2.8.0", - "eslint-plugin-wc": "2.0.4", + "eslint-plugin-wc": "2.1.0", "happy-dom": "14.7.1", "markdownlint-cli": "0.39.0", "postcss-html": "1.6.0", - "stylelint": "16.3.1", + "stylelint": "16.4.0", "stylelint-declaration-block-no-ignored-properties": "2.8.0", "stylelint-declaration-strict-value": "1.10.4", "stylelint-value-no-unknown-custom-properties": "6.0.1", From 4b573620560b753a466a1d3c303592355565c630 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 24 Apr 2024 07:26:20 +0200 Subject: [PATCH 005/401] fix(docs): v7.0.0 admin user create regression The tests in Forgejo extensively rely on admin user create to create the first admin user. This regression was not noticed because it is an exception and a password change will not be required. Refs: https://codeberg.org/forgejo/forgejo/issues/3399 --- RELEASE-NOTES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 1e30666b78..1574a403ca 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -13,6 +13,8 @@ $ git clone https://codeberg.org/forgejo/forgejo/ $ git -C forgejo log --oneline --no-merges origin/v1.21/forgejo..origin/v7.0/forgejo ``` +* **Regression and workaround:** + * The [`fogejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command [requires a password](https://codeberg.org/forgejo/forgejo/commit/b122c6ef8b9254120432aed373cbe075331132ac) change by default. The `--must-change-password=false` argument must be given to not require a password change. The first user created on a new Forgejo instance is the exception, it will not require a password change by default. This regression will be [fixed in 7.0.1](https://codeberg.org/forgejo/forgejo/issues/3399). * **Breaking changes requiring manual intervention:** * [MySQL 8.0 or PostgreSQL 12](https://codeberg.org/forgejo/forgejo/commit/e94f9fcafdcf284561e7fb33f60156a69c4ad6a5) are the minimum supported versions. The database must be migrated before upgrading. The requirements regarding SQLite did not change. * The `per_page` parameter is [no longer a synonym for `limit`](https://codeberg.org/forgejo/forgejo/commit/0aab2d38a7d91bc8caff332e452364468ce52d9a) in the [/repos/{owner}/{repo}/releases](https://code.forgejo.org/api/swagger/#/repository/repoListReleases) API endpoint. From a7602781c494bc7061f0e7d31f2dd82b3adc9504 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 24 Apr 2024 08:36:24 +0200 Subject: [PATCH 006/401] feat(docs): 7.0.1 release notes template so that individual commits can include additions to the release notes when relevant. --- RELEASE-NOTES.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 1574a403ca..9a1c19632d 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -4,6 +4,14 @@ A minor or major Forgejo release is published every [three months](https://forge A [patch or minor release](https://semver.org/spec/v2.0.0.html) (e.g. upgrading from v7.0.0 to v7.0.1 or v7.1.0) does not require manual intervention. But [major releases](https://semver.org/spec/v2.0.0.html#spec-item-8) where the first version number changes (e.g. upgrading from v1.21 to v7.0) contain breaking changes and the release notes explain how to deal with them. +## 7.0.1 + +This is a bug fix release. See the documentation for more information on the [upgrade procedure](https://forgejo.org/docs/v7.0/admin/upgrade/). + +In addition to the following notable bug fixes, you can browse the [full list of commits](https://codeberg.org/forgejo/forgejo/compare/v7.0.0...v7.0.1) included in this release. + +* **Bug fixes:** + ## 7.0.0 The [complete list of commits](https://codeberg.org/forgejo/forgejo/commits/branch/v7.0/forgejo) included in the `Forgejo v7.0.0` release can be reviewed from the command line with: From 01ea982fca07ed6a5d56e560707d6d1071016ac8 Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Wed, 24 Apr 2024 08:53:27 +0200 Subject: [PATCH 007/401] chore(renovate): enable automerge and require release age for some packages --- renovate.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/renovate.json b/renovate.json index 35dbcc3343..919bd59d93 100644 --- a/renovate.json +++ b/renovate.json @@ -18,6 +18,7 @@ "automergeStrategy": "merge-commit", "postUpdateOptions": ["gomodTidy", "gomodUpdateImportPaths", "npmDedupe"], "prConcurrentLimit": 5, + "internalChecksFilter": "strict", "packageRules": [ { "description": "Require approval for go and python minor version", @@ -74,6 +75,16 @@ "matchDepNames": ["actions/cascading-pr"], "matchManagers": ["github-actions"], "enabled": false + }, + { + "description": "Automerge some packages when ci succeeds", + "extends": ["packages:linters"], + "matchDepNames": ["vitest"], + "automerge": true + }, { + "description": "Hold back on some package updates for a few days", + "matchDepNames": ["monaco-editor"], + "minimumReleaseAge": "30 days" } ], "customManagers": [ From b127b24f023d56ed20c480e7d2bd86709d175a64 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 24 Apr 2024 12:41:14 +0200 Subject: [PATCH 008/401] fix(docs): v7.0.0 admin user create regression (take2) The scope of the regression is limited to the first created user when it is not an admin. Refs: https://codeberg.org/forgejo/forgejo/issues/3399 --- RELEASE-NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 9a1c19632d..2ad10ff564 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -22,7 +22,7 @@ $ git -C forgejo log --oneline --no-merges origin/v1.21/forgejo..origin/v7.0/for ``` * **Regression and workaround:** - * The [`fogejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command [requires a password](https://codeberg.org/forgejo/forgejo/commit/b122c6ef8b9254120432aed373cbe075331132ac) change by default. The `--must-change-password=false` argument must be given to not require a password change. The first user created on a new Forgejo instance is the exception, it will not require a password change by default. This regression will be [fixed in 7.0.1](https://codeberg.org/forgejo/forgejo/issues/3399). + * The [`fogejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command [requires a password](https://codeberg.org/forgejo/forgejo/commit/b122c6ef8b9254120432aed373cbe075331132ac) change by default when creating the first user and the `--admin` flag is not specified. The `--must-change-password=false` argument must be given to not require a password change. This regression will be [fixed in 7.0.1](https://codeberg.org/forgejo/forgejo/issues/3399). * **Breaking changes requiring manual intervention:** * [MySQL 8.0 or PostgreSQL 12](https://codeberg.org/forgejo/forgejo/commit/e94f9fcafdcf284561e7fb33f60156a69c4ad6a5) are the minimum supported versions. The database must be migrated before upgrading. The requirements regarding SQLite did not change. * The `per_page` parameter is [no longer a synonym for `limit`](https://codeberg.org/forgejo/forgejo/commit/0aab2d38a7d91bc8caff332e452364468ce52d9a) in the [/repos/{owner}/{repo}/releases](https://code.forgejo.org/api/swagger/#/repository/repoListReleases) API endpoint. From f5028865101ba041912ca2a1eaac202b3f7c322b Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Wed, 24 Apr 2024 13:47:47 +0200 Subject: [PATCH 009/401] chore(renovate): require more approvals --- renovate.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/renovate.json b/renovate.json index 919bd59d93..4fefa8d1c2 100644 --- a/renovate.json +++ b/renovate.json @@ -34,7 +34,11 @@ }, { "description": "Require dashboard approval for some deps", - "matchDepNames": ["github.com/go-ap/activitypub", "bitnami/minio"], + "matchDepNames": [ + "bitnami/minio", + "github.com/go-ap/activitypub", + "github.com/nektos/act" + ], "dependencyDashboardApproval": true }, { @@ -81,7 +85,8 @@ "extends": ["packages:linters"], "matchDepNames": ["vitest"], "automerge": true - }, { + }, + { "description": "Hold back on some package updates for a few days", "matchDepNames": ["monaco-editor"], "minimumReleaseAge": "30 days" From 97dab9be8dca64c2db6187597ecbbb9dc039e067 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 24 Apr 2024 14:24:44 +0200 Subject: [PATCH 010/401] feat(docs): 8.0.0 release notes template so that individual commits can include additions to the release notes when relevant. --- RELEASE-NOTES.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 9a1c19632d..414b7b8d20 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -4,6 +4,20 @@ A minor or major Forgejo release is published every [three months](https://forge A [patch or minor release](https://semver.org/spec/v2.0.0.html) (e.g. upgrading from v7.0.0 to v7.0.1 or v7.1.0) does not require manual intervention. But [major releases](https://semver.org/spec/v2.0.0.html#spec-item-8) where the first version number changes (e.g. upgrading from v1.21 to v7.0) contain breaking changes and the release notes explain how to deal with them. +## 8.0.0 + +This is a major release. It contains breaking changes that may require manual intervention. See the documentation for more information on the [upgrade procedure](https://forgejo.org/docs/v7.0/admin/upgrade/). + +* **Breaking changes:** + +In addition to the following notable bug fixes, you can browse the [full list of commits](https://codeberg.org/forgejo/forgejo/compare/v8.0.0...v7.0.0) included in this release. + +If you have any feedback or suggestions for Forgejo do not hold back, it is also your project. +Open an issue in [the issue tracker](https://codeberg.org/forgejo/forgejo/issues) +for feature requests or bug reports, reach out [on the Fediverse](https://floss.social/@forgejo), +or drop into [the Matrix space](https://matrix.to/#/#forgejo:matrix.org) +([main chat room](https://matrix.to/#/#forgejo-chat:matrix.org)) and say hi! + ## 7.0.1 This is a bug fix release. See the documentation for more information on the [upgrade procedure](https://forgejo.org/docs/v7.0/admin/upgrade/). From eb74846d7db769dc377b6c9276b04427bffc5a09 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 24 Apr 2024 12:22:39 +0200 Subject: [PATCH 011/401] test(cli): admin user create and must change password value --- tests/integration/cmd_admin_test.go | 138 ++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 tests/integration/cmd_admin_test.go diff --git a/tests/integration/cmd_admin_test.go b/tests/integration/cmd_admin_test.go new file mode 100644 index 0000000000..4bccee3a79 --- /dev/null +++ b/tests/integration/cmd_admin_test.go @@ -0,0 +1,138 @@ +// Copyright 2024 The Forgejo Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package integration + +import ( + "net/url" + "testing" + + "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/models/unittest" + user_model "code.gitea.io/gitea/models/user" + + "github.com/stretchr/testify/assert" +) + +func Test_Cmd_AdminUser(t *testing.T) { + onGiteaRun(t, func(*testing.T, *url.URL) { + for _, testCase := range []struct { + name string + options []string + mustChangePassword bool + }{ + { + name: "default", + options: []string{}, + mustChangePassword: true, + }, + { + name: "--must-change-password=false", + options: []string{"--must-change-password=false"}, + mustChangePassword: false, + }, + { + name: "--must-change-password=true", + options: []string{"--must-change-password=true"}, + mustChangePassword: true, + }, + { + name: "--must-change-password", + options: []string{"--must-change-password"}, + mustChangePassword: true, + }, + } { + t.Run(testCase.name, func(t *testing.T) { + name := "testuser" + + options := []string{"user", "create", "--username", name, "--password", "password", "--email", name + "@example.com"} + options = append(options, testCase.options...) + output, err := runMainApp("admin", options...) + assert.NoError(t, err) + assert.Contains(t, output, "has been successfully created") + user := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: name}) + assert.Equal(t, testCase.mustChangePassword, user.MustChangePassword) + + _, err = runMainApp("admin", "user", "delete", "--username", name) + assert.NoError(t, err) + unittest.AssertNotExistsBean(t, &user_model.User{Name: name}) + }) + } + }) +} + +func Test_Cmd_AdminFirstUser(t *testing.T) { + onGiteaRun(t, func(*testing.T, *url.URL) { + for _, testCase := range []struct { + name string + options []string + mustChangePassword bool + isAdmin bool + }{ + { + name: "default", + options: []string{}, + mustChangePassword: false, + isAdmin: false, + }, + { + name: "--must-change-password=false", + options: []string{"--must-change-password=false"}, + mustChangePassword: false, + isAdmin: false, + }, + { + name: "--must-change-password=true", + options: []string{"--must-change-password=true"}, + mustChangePassword: true, + isAdmin: false, + }, + { + name: "--must-change-password", + options: []string{"--must-change-password"}, + mustChangePassword: true, + isAdmin: false, + }, + { + name: "--admin default", + options: []string{"--admin"}, + mustChangePassword: false, + isAdmin: true, + }, + { + name: "--admin --must-change-password=false", + options: []string{"--admin", "--must-change-password=false"}, + mustChangePassword: false, + isAdmin: true, + }, + { + name: "--admin --must-change-password=true", + options: []string{"--admin", "--must-change-password=true"}, + mustChangePassword: true, + isAdmin: true, + }, + { + name: "--admin --must-change-password", + options: []string{"--admin", "--must-change-password"}, + mustChangePassword: true, + isAdmin: true, + }, + } { + t.Run(testCase.name, func(t *testing.T) { + db.GetEngine(db.DefaultContext).Exec("DELETE FROM `user`") + db.GetEngine(db.DefaultContext).Exec("DELETE FROM `email_address`") + assert.Equal(t, int64(0), user_model.CountUsers(db.DefaultContext, nil)) + name := "testuser" + + options := []string{"user", "create", "--username", name, "--password", "password", "--email", name + "@example.com"} + options = append(options, testCase.options...) + output, err := runMainApp("admin", options...) + assert.NoError(t, err) + assert.Contains(t, output, "has been successfully created") + user := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: name}) + assert.Equal(t, testCase.mustChangePassword, user.MustChangePassword) + assert.Equal(t, testCase.isAdmin, user.IsAdmin) + }) + } + }) +} From b9424e634f0ee1818d5b7d1e1f701fd67d0adbad Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 24 Apr 2024 12:24:19 +0200 Subject: [PATCH 012/401] test(cli): admin user change-password --must-change-password --- tests/integration/cmd_admin_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/integration/cmd_admin_test.go b/tests/integration/cmd_admin_test.go index 4bccee3a79..6a85460450 100644 --- a/tests/integration/cmd_admin_test.go +++ b/tests/integration/cmd_admin_test.go @@ -53,6 +53,14 @@ func Test_Cmd_AdminUser(t *testing.T) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: name}) assert.Equal(t, testCase.mustChangePassword, user.MustChangePassword) + options = []string{"user", "change-password", "--username", name, "--password", "password"} + options = append(options, testCase.options...) + output, err = runMainApp("admin", options...) + assert.NoError(t, err) + assert.Contains(t, output, "has been successfully updated") + user = unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: name}) + assert.Equal(t, testCase.mustChangePassword, user.MustChangePassword) + _, err = runMainApp("admin", "user", "delete", "--username", name) assert.NoError(t, err) unittest.AssertNotExistsBean(t, &user_model.User{Name: name}) From ec334239e08a755c9ff5d9c461bf456d498256b8 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 24 Apr 2024 12:27:20 +0200 Subject: [PATCH 013/401] fix(cli): admin user create first user never require a password change Fixes: https://codeberg.org/forgejo/forgejo/issues/3399 --- RELEASE-NOTES.md | 1 + cmd/admin_user_create.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 9a1c19632d..65146b950f 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -11,6 +11,7 @@ This is a bug fix release. See the documentation for more information on the [up In addition to the following notable bug fixes, you can browse the [full list of commits](https://codeberg.org/forgejo/forgejo/compare/v7.0.0...v7.0.1) included in this release. * **Bug fixes:** + * The regression in the [`fogejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command [is fixed](https://codeberg.org/forgejo/forgejo/issues/3399) and it is backward compatible. ## 7.0.0 diff --git a/cmd/admin_user_create.go b/cmd/admin_user_create.go index caafef536c..dfc484aeb2 100644 --- a/cmd/admin_user_create.go +++ b/cmd/admin_user_create.go @@ -124,7 +124,7 @@ func runCreateUser(c *cli.Context) error { if err != nil { return fmt.Errorf("IsTableNotEmpty: %w", err) } - if !hasUserRecord && isAdmin { + if !hasUserRecord { // if this is the first admin being created, don't force to change password (keep the old behavior) mustChangePassword = false } From 09564157071feb575f1ccf31896fa502522295c7 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Wed, 24 Apr 2024 19:07:16 +0500 Subject: [PATCH 014/401] UI: fix rounding of vertical menus on /issues, /pulls --- web_src/css/themes/theme-forgejo-dark.css | 3 --- web_src/css/themes/theme-forgejo-light.css | 3 --- 2 files changed, 6 deletions(-) diff --git a/web_src/css/themes/theme-forgejo-dark.css b/web_src/css/themes/theme-forgejo-dark.css index 3b11d16cd9..7ff071bbb0 100644 --- a/web_src/css/themes/theme-forgejo-dark.css +++ b/web_src/css/themes/theme-forgejo-dark.css @@ -271,9 +271,6 @@ i.grey.icon.icon.icon.icon { border-radius: 0.28571429rem !important; overflow: hidden; } -.ui.secondary.vertical.menu > .item { - border-radius: 0 !important; -} .ui.basic.primary.button.item { background-color: var(--color-active) !important; color: var(--color-text) !important; diff --git a/web_src/css/themes/theme-forgejo-light.css b/web_src/css/themes/theme-forgejo-light.css index 7e3aa69344..0ee7020a5e 100644 --- a/web_src/css/themes/theme-forgejo-light.css +++ b/web_src/css/themes/theme-forgejo-light.css @@ -262,9 +262,6 @@ border-radius: 0.28571429rem !important; overflow: hidden; } -.ui.secondary.vertical.menu > .item { - border-radius: 0 !important; -} .ui.basic.primary.button.item { background-color: var(--color-active) !important; color: var(--color-text) !important; From 1bce2dc5c576b4818b407efcb04e90019bbe8af6 Mon Sep 17 00:00:00 2001 From: JakobDev Date: Wed, 24 Apr 2024 15:15:55 +0000 Subject: [PATCH 015/401] [FEAT]Add Option to hide Release Archive links (#3139) This adds a new options to releases to hide the links to the automatically generated archives. This is useful, when the automatically generated Archives are broken e.g. because of Submodules. ![grafik](/attachments/5686edf6-f318-4175-8459-89c33973b181) ![grafik](/attachments/74a8bf92-2abb-47a0-876d-d41024770d0b) Note: This juts hides the Archives from the UI. Users can still download 5the Archive if they know t correct URL. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3139 Reviewed-by: Otto Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: JakobDev Co-committed-by: JakobDev --- models/forgejo_migrations/migrate.go | 2 + models/forgejo_migrations/v13.go | 15 +++++ models/repo/release.go | 1 + modules/structs/release.go | 51 ++++++++-------- options/locale/locale_en-US.ini | 2 + routers/api/v1/repo/release.go | 27 +++++---- routers/web/repo/release.go | 41 +++++++++---- services/convert/release.go | 1 + services/forms/repo_form.go | 30 +++++----- templates/repo/release/list.tmpl | 83 +++++++++++++------------- templates/repo/release/new.tmpl | 9 +++ templates/swagger/v1_json.tmpl | 12 ++++ tests/integration/api_releases_test.go | 17 ++++-- tests/integration/release_test.go | 35 +++++++++++ 14 files changed, 220 insertions(+), 106 deletions(-) create mode 100644 models/forgejo_migrations/v13.go diff --git a/models/forgejo_migrations/migrate.go b/models/forgejo_migrations/migrate.go index 697efb5b56..b9e0e384cf 100644 --- a/models/forgejo_migrations/migrate.go +++ b/models/forgejo_migrations/migrate.go @@ -62,6 +62,8 @@ var migrations = []*Migration{ NewMigration("Add the `created` column to the `issue` table", forgejo_v1_22.AddCreatedToIssue), // v12 -> v13 NewMigration("Add repo_archive_download_count table", forgejo_v1_22.AddRepoArchiveDownloadCount), + // v13 -> v14 + NewMigration("Add `hide_archive_links` column to `release` table", AddHideArchiveLinksToRelease), } // GetCurrentDBVersion returns the current Forgejo database version. diff --git a/models/forgejo_migrations/v13.go b/models/forgejo_migrations/v13.go new file mode 100644 index 0000000000..614f68249d --- /dev/null +++ b/models/forgejo_migrations/v13.go @@ -0,0 +1,15 @@ +// Copyright 2024 The Forgejo Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package forgejo_migrations //nolint:revive + +import "xorm.io/xorm" + +func AddHideArchiveLinksToRelease(x *xorm.Engine) error { + type Release struct { + ID int64 `xorm:"pk autoincr"` + HideArchiveLinks bool `xorm:"NOT NULL DEFAULT false"` + } + + return x.Sync(&Release{}) +} diff --git a/models/repo/release.go b/models/repo/release.go index 3168bdaaea..075e287174 100644 --- a/models/repo/release.go +++ b/models/repo/release.go @@ -78,6 +78,7 @@ type Release struct { TargetBehind string `xorm:"-"` // to handle non-existing or empty target Title string Sha1 string `xorm:"VARCHAR(64)"` + HideArchiveLinks bool `xorm:"NOT NULL DEFAULT false"` NumCommits int64 NumCommitsBehind int64 `xorm:"-"` Note string `xorm:"TEXT"` diff --git a/modules/structs/release.go b/modules/structs/release.go index 02c68af188..d8da924f54 100644 --- a/modules/structs/release.go +++ b/modules/structs/release.go @@ -9,18 +9,19 @@ import ( // Release represents a repository release type Release struct { - ID int64 `json:"id"` - TagName string `json:"tag_name"` - Target string `json:"target_commitish"` - Title string `json:"name"` - Note string `json:"body"` - URL string `json:"url"` - HTMLURL string `json:"html_url"` - TarURL string `json:"tarball_url"` - ZipURL string `json:"zipball_url"` - UploadURL string `json:"upload_url"` - IsDraft bool `json:"draft"` - IsPrerelease bool `json:"prerelease"` + ID int64 `json:"id"` + TagName string `json:"tag_name"` + Target string `json:"target_commitish"` + Title string `json:"name"` + Note string `json:"body"` + URL string `json:"url"` + HTMLURL string `json:"html_url"` + TarURL string `json:"tarball_url"` + ZipURL string `json:"zipball_url"` + HideArchiveLinks bool `json:"hide_archive_links"` + UploadURL string `json:"upload_url"` + IsDraft bool `json:"draft"` + IsPrerelease bool `json:"prerelease"` // swagger:strfmt date-time CreatedAt time.Time `json:"created_at"` // swagger:strfmt date-time @@ -33,20 +34,22 @@ type Release struct { // CreateReleaseOption options when creating a release type CreateReleaseOption struct { // required: true - TagName string `json:"tag_name" binding:"Required"` - Target string `json:"target_commitish"` - Title string `json:"name"` - Note string `json:"body"` - IsDraft bool `json:"draft"` - IsPrerelease bool `json:"prerelease"` + TagName string `json:"tag_name" binding:"Required"` + Target string `json:"target_commitish"` + Title string `json:"name"` + Note string `json:"body"` + IsDraft bool `json:"draft"` + IsPrerelease bool `json:"prerelease"` + HideArchiveLinks bool `json:"hide_archive_links"` } // EditReleaseOption options when editing a release type EditReleaseOption struct { - TagName string `json:"tag_name"` - Target string `json:"target_commitish"` - Title string `json:"name"` - Note string `json:"body"` - IsDraft *bool `json:"draft"` - IsPrerelease *bool `json:"prerelease"` + TagName string `json:"tag_name"` + Target string `json:"target_commitish"` + Title string `json:"name"` + Note string `json:"body"` + IsDraft *bool `json:"draft"` + IsPrerelease *bool `json:"prerelease"` + HideArchiveLinks *bool `json:"hide_archive_links"` } diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 2c6d831c88..d7680f3545 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -2662,6 +2662,8 @@ release.downloads = Downloads release.download_count_one = %s download release.download_count_few = %s downloads release.add_tag_msg = Use the title and content of release as tag message. +release.hide_archive_links = Hide automatically generated archives +release.hide_archive_links_helper = Hide automatically generated source code archives for this release. For example, if you are uploading your own. release.add_tag = Create Tag Only release.releases_for = Releases for %s release.tags_for = Tags for %s diff --git a/routers/api/v1/repo/release.go b/routers/api/v1/repo/release.go index c6495c3de8..057282b210 100644 --- a/routers/api/v1/repo/release.go +++ b/routers/api/v1/repo/release.go @@ -231,17 +231,18 @@ func CreateRelease(ctx *context.APIContext) { form.Target = ctx.Repo.Repository.DefaultBranch } rel = &repo_model.Release{ - RepoID: ctx.Repo.Repository.ID, - PublisherID: ctx.Doer.ID, - Publisher: ctx.Doer, - TagName: form.TagName, - Target: form.Target, - Title: form.Title, - Note: form.Note, - IsDraft: form.IsDraft, - IsPrerelease: form.IsPrerelease, - IsTag: false, - Repo: ctx.Repo.Repository, + RepoID: ctx.Repo.Repository.ID, + PublisherID: ctx.Doer.ID, + Publisher: ctx.Doer, + TagName: form.TagName, + Target: form.Target, + Title: form.Title, + Note: form.Note, + IsDraft: form.IsDraft, + IsPrerelease: form.IsPrerelease, + HideArchiveLinks: form.HideArchiveLinks, + IsTag: false, + Repo: ctx.Repo.Repository, } if err := release_service.CreateRelease(ctx.Repo.GitRepo, rel, nil, ""); err != nil { if repo_model.IsErrReleaseAlreadyExist(err) { @@ -261,6 +262,7 @@ func CreateRelease(ctx *context.APIContext) { rel.Note = form.Note rel.IsDraft = form.IsDraft rel.IsPrerelease = form.IsPrerelease + rel.HideArchiveLinks = form.HideArchiveLinks rel.PublisherID = ctx.Doer.ID rel.IsTag = false rel.Repo = ctx.Repo.Repository @@ -341,6 +343,9 @@ func EditRelease(ctx *context.APIContext) { if form.IsPrerelease != nil { rel.IsPrerelease = *form.IsPrerelease } + if form.HideArchiveLinks != nil { + rel.HideArchiveLinks = *form.HideArchiveLinks + } if err := release_service.UpdateRelease(ctx, ctx.Doer, ctx.Repo.GitRepo, rel, nil, nil, nil, false); err != nil { ctx.Error(http.StatusInternalServerError, "UpdateRelease", err) return diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go index bb1644b899..3927e3d2d9 100644 --- a/routers/web/repo/release.go +++ b/routers/web/repo/release.go @@ -441,6 +441,20 @@ func NewRelease(ctx *context.Context) { } ctx.Data["Tags"] = tags + // We set the value of the hide_archive_link textbox depending on the latest release + latestRelease, err := repo_model.GetLatestReleaseByRepoID(ctx, ctx.Repo.Repository.ID) + if err != nil { + if repo_model.IsErrReleaseNotExist(err) { + ctx.Data["hide_archive_links"] = false + } else { + ctx.ServerError("GetLatestReleaseByRepoID", err) + return + } + } + if latestRelease != nil { + ctx.Data["hide_archive_links"] = latestRelease.HideArchiveLinks + } + ctx.HTML(http.StatusOK, tplReleaseNew) } @@ -525,17 +539,18 @@ func NewReleasePost(ctx *context.Context) { } rel = &repo_model.Release{ - RepoID: ctx.Repo.Repository.ID, - Repo: ctx.Repo.Repository, - PublisherID: ctx.Doer.ID, - Publisher: ctx.Doer, - Title: form.Title, - TagName: form.TagName, - Target: form.Target, - Note: form.Content, - IsDraft: len(form.Draft) > 0, - IsPrerelease: form.Prerelease, - IsTag: false, + RepoID: ctx.Repo.Repository.ID, + Repo: ctx.Repo.Repository, + PublisherID: ctx.Doer.ID, + Publisher: ctx.Doer, + Title: form.Title, + TagName: form.TagName, + Target: form.Target, + Note: form.Content, + IsDraft: len(form.Draft) > 0, + IsPrerelease: form.Prerelease, + HideArchiveLinks: form.HideArchiveLinks, + IsTag: false, } if err = releaseservice.CreateRelease(ctx.Repo.GitRepo, rel, attachmentUUIDs, msg); err != nil { @@ -565,6 +580,7 @@ func NewReleasePost(ctx *context.Context) { rel.IsDraft = len(form.Draft) > 0 rel.IsPrerelease = form.Prerelease rel.PublisherID = ctx.Doer.ID + rel.HideArchiveLinks = form.HideArchiveLinks rel.IsTag = false if err = releaseservice.UpdateRelease(ctx, ctx.Doer, ctx.Repo.GitRepo, rel, attachmentUUIDs, nil, nil, true); err != nil { @@ -602,6 +618,7 @@ func EditRelease(ctx *context.Context) { ctx.Data["title"] = rel.Title ctx.Data["content"] = rel.Note ctx.Data["prerelease"] = rel.IsPrerelease + ctx.Data["hide_archive_links"] = rel.HideArchiveLinks ctx.Data["IsDraft"] = rel.IsDraft rel.Repo = ctx.Repo.Repository @@ -648,6 +665,7 @@ func EditReleasePost(ctx *context.Context) { ctx.Data["title"] = rel.Title ctx.Data["content"] = rel.Note ctx.Data["prerelease"] = rel.IsPrerelease + ctx.Data["hide_archive_links"] = rel.HideArchiveLinks if ctx.HasError() { ctx.HTML(http.StatusOK, tplReleaseNew) @@ -673,6 +691,7 @@ func EditReleasePost(ctx *context.Context) { rel.Note = form.Content rel.IsDraft = len(form.Draft) > 0 rel.IsPrerelease = form.Prerelease + rel.HideArchiveLinks = form.HideArchiveLinks if err = releaseservice.UpdateRelease(ctx, ctx.Doer, ctx.Repo.GitRepo, rel, addAttachmentUUIDs, delAttachmentUUIDs, editAttachments, false); err != nil { ctx.ServerError("UpdateRelease", err) diff --git a/services/convert/release.go b/services/convert/release.go index fb8bd45678..8c0f61b56c 100644 --- a/services/convert/release.go +++ b/services/convert/release.go @@ -22,6 +22,7 @@ func ToAPIRelease(ctx context.Context, repo *repo_model.Repository, r *repo_mode HTMLURL: r.HTMLURL(), TarURL: r.TarURL(), ZipURL: r.ZipURL(), + HideArchiveLinks: r.HideArchiveLinks, UploadURL: r.APIUploadURL(), IsDraft: r.IsDraft, IsPrerelease: r.IsPrerelease, diff --git a/services/forms/repo_form.go b/services/forms/repo_form.go index e0540852af..e4fcf8e0c0 100644 --- a/services/forms/repo_form.go +++ b/services/forms/repo_form.go @@ -559,15 +559,16 @@ type UpdateAllowEditsForm struct { // NewReleaseForm form for creating release type NewReleaseForm struct { - TagName string `binding:"Required;GitRefName;MaxSize(255)"` - Target string `form:"tag_target" binding:"Required;MaxSize(255)"` - Title string `binding:"MaxSize(255)"` - Content string - Draft string - TagOnly string - Prerelease bool - AddTagMsg bool - Files []string + TagName string `binding:"Required;GitRefName;MaxSize(255)"` + Target string `form:"tag_target" binding:"Required;MaxSize(255)"` + Title string `binding:"MaxSize(255)"` + Content string + Draft string + TagOnly string + Prerelease bool + AddTagMsg bool + HideArchiveLinks bool + Files []string } // Validate validates the fields @@ -578,11 +579,12 @@ func (f *NewReleaseForm) Validate(req *http.Request, errs binding.Errors) bindin // EditReleaseForm form for changing release type EditReleaseForm struct { - Title string `form:"title" binding:"Required;MaxSize(255)"` - Content string `form:"content"` - Draft string `form:"draft"` - Prerelease bool `form:"prerelease"` - Files []string + Title string `form:"title" binding:"Required;MaxSize(255)"` + Content string `form:"content"` + Draft string `form:"draft"` + Prerelease bool `form:"prerelease"` + HideArchiveLinks bool + Files []string } // Validate validates the fields diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 2d38cacfcd..4755da091a 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -61,46 +61,49 @@
{{$release.RenderedNote}}
-
-
- - {{ctx.Locale.Tr "repo.release.downloads"}} - - -
+ {{$hasReleaseAttachment := gt (len $release.Attachments) 0}} + {{$hasArchiveLinks := and (not $.DisableDownloadSourceArchives) (not $release.IsDraft) (not $release.HideArchiveLinks) ($.Permission.CanRead $.UnitTypeCode)}} + {{if or $hasArchiveLinks $hasReleaseAttachment}} +
+
+ + {{ctx.Locale.Tr "repo.release.downloads"}} + + +
+ {{end}}
diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl index 81104a70d2..e1881b1d94 100644 --- a/templates/repo/release/new.tmpl +++ b/templates/repo/release/new.tmpl @@ -98,6 +98,15 @@ {{ctx.Locale.Tr "repo.release.prerelease_helper"}} + {{if not .DisableDownloadSourceArchives}} +
+
+ + +
+
+ {{ctx.Locale.Tr "repo.release.hide_archive_links_helper"}} + {{end}}
{{if .PageIsEditRelease}} diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index c68a90a4c5..c49c6208ef 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -19890,6 +19890,10 @@ "type": "boolean", "x-go-name": "IsDraft" }, + "hide_archive_links": { + "type": "boolean", + "x-go-name": "HideArchiveLinks" + }, "name": { "type": "string", "x-go-name": "Title" @@ -20795,6 +20799,10 @@ "type": "boolean", "x-go-name": "IsDraft" }, + "hide_archive_links": { + "type": "boolean", + "x-go-name": "HideArchiveLinks" + }, "name": { "type": "string", "x-go-name": "Title" @@ -23562,6 +23570,10 @@ "type": "boolean", "x-go-name": "IsDraft" }, + "hide_archive_links": { + "type": "boolean", + "x-go-name": "HideArchiveLinks" + }, "html_url": { "type": "string", "x-go-name": "HTMLURL" diff --git a/tests/integration/api_releases_test.go b/tests/integration/api_releases_test.go index 5dc51044eb..0a392d0a15 100644 --- a/tests/integration/api_releases_test.go +++ b/tests/integration/api_releases_test.go @@ -133,14 +133,18 @@ func TestAPICreateAndUpdateRelease(t *testing.T) { assert.Equal(t, newRelease.TagName, release.TagName) assert.Equal(t, newRelease.Title, release.Title) assert.Equal(t, newRelease.Note, release.Note) + assert.False(t, newRelease.HideArchiveLinks) + + hideArchiveLinks := true req = NewRequestWithJSON(t, "PATCH", urlStr, &api.EditReleaseOption{ - TagName: release.TagName, - Title: release.Title, - Note: "updated", - IsDraft: &release.IsDraft, - IsPrerelease: &release.IsPrerelease, - Target: release.Target, + TagName: release.TagName, + Title: release.Title, + Note: "updated", + IsDraft: &release.IsDraft, + IsPrerelease: &release.IsPrerelease, + Target: release.Target, + HideArchiveLinks: &hideArchiveLinks, }).AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) @@ -152,6 +156,7 @@ func TestAPICreateAndUpdateRelease(t *testing.T) { } unittest.AssertExistsAndLoadBean(t, rel) assert.EqualValues(t, rel.Note, newRelease.Note) + assert.True(t, newRelease.HideArchiveLinks) } func TestAPICreateReleaseToDefaultBranch(t *testing.T) { diff --git a/tests/integration/release_test.go b/tests/integration/release_test.go index acc8cb68c2..ad3c7bf325 100644 --- a/tests/integration/release_test.go +++ b/tests/integration/release_test.go @@ -9,15 +9,19 @@ import ( "testing" "time" + auth_model "code.gitea.io/gitea/models/auth" + "code.gitea.io/gitea/models/db" repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" "code.gitea.io/gitea/modules/translation" "code.gitea.io/gitea/tests" "github.com/PuerkitoBio/goquery" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func createNewRelease(t *testing.T, session *TestSession, repoURL, tag, title string, preRelease, draft bool) { @@ -307,3 +311,34 @@ func TestDownloadReleaseAttachment(t *testing.T) { session := loginUser(t, "user2") session.MakeRequest(t, req, http.StatusOK) } + +func TestReleaseHideArchiveLinksUI(t *testing.T) { + defer tests.PrepareTestEnv(t)() + + release := unittest.AssertExistsAndLoadBean(t, &repo_model.Release{TagName: "v2.0"}) + + require.NoError(t, release.LoadAttributes(db.DefaultContext)) + + session := loginUser(t, release.Repo.OwnerName) + token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) + + zipURL := fmt.Sprintf("%s/archive/%s.zip", release.Repo.Link(), release.TagName) + tarGzURL := fmt.Sprintf("%s/archive/%s.tar.gz", release.Repo.Link(), release.TagName) + + resp := session.MakeRequest(t, NewRequest(t, "GET", release.HTMLURL()), http.StatusOK) + body := resp.Body.String() + assert.Contains(t, body, zipURL) + assert.Contains(t, body, tarGzURL) + + hideArchiveLinks := true + + req := NewRequestWithJSON(t, "PATCH", release.APIURL(), &api.EditReleaseOption{ + HideArchiveLinks: &hideArchiveLinks, + }).AddTokenAuth(token) + MakeRequest(t, req, http.StatusOK) + + resp = session.MakeRequest(t, NewRequest(t, "GET", release.HTMLURL()), http.StatusOK) + body = resp.Body.String() + assert.NotContains(t, body, zipURL) + assert.NotContains(t, body, tarGzURL) +} From aa66d0a0ebf3e5f6d0b2f47cdcb5b50d8cbd71cb Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 24 Apr 2024 18:26:34 +0200 Subject: [PATCH 016/401] test(ldap): add LDAP tests --- .forgejo/workflows/testing.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.forgejo/workflows/testing.yml b/.forgejo/workflows/testing.yml index be0689006c..cd955c01af 100644 --- a/.forgejo/workflows/testing.yml +++ b/.forgejo/workflows/testing.yml @@ -140,6 +140,8 @@ jobs: env: MINIO_ROOT_USER: 123456 MINIO_ROOT_PASSWORD: 12345678 + ldap: + image: docker.io/gitea/test-openldap:latest pgsql: image: 'docker.io/postgres:15' env: @@ -176,6 +178,7 @@ jobs: TAGS: bindata RACE_ENABLED: true USE_REPO_TEST_DIR: 1 + TEST_LDAP: 1 test-sqlite: if: ${{ !startsWith(vars.ROLE, 'forgejo-') }} runs-on: docker From e7fcf3f1893534c12e4cb81b387b24dbcf91a811 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 24 Apr 2024 23:33:08 +0200 Subject: [PATCH 017/401] tests: Refactor CreateDeclarativeRepo Lets introduce a new helper function, `CreateDeclarativeRepoWithOptions`! This is almost the same as the existing `CreateDeclarativeRepo` helper, but instead of taking a list of random parameters the author thought of at the time of its introduction, it takes a `DeclarativeRepoOptions` struct, with optional members. This makes it easier to extend the function, as new members can be added without breaking or having to update existing callsites, as long as the newly added members default to compatible values. `CreateDeclarativeRepo` is then reimplemented on top of the new function. Callsites aren't updated yet, we can do that organically, whenever touching code that uses the older function. No new functionality is introduced just yet, this is merely a refactor. Signed-off-by: Gergely Nagy --- tests/integration/integration_test.go | 65 ++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/tests/integration/integration_test.go b/tests/integration/integration_test.go index adba52fee0..7a373c74ee 100644 --- a/tests/integration/integration_test.go +++ b/tests/integration/integration_test.go @@ -36,6 +36,7 @@ import ( "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/optional" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/testlogger" "code.gitea.io/gitea/modules/util" @@ -652,15 +653,26 @@ func GetHTMLTitle(t testing.TB, session *TestSession, urlStr string) string { return doc.Find("head title").Text() } -func CreateDeclarativeRepo(t *testing.T, owner *user_model.User, name string, enabledUnits, disabledUnits []unit_model.Type, files []*files_service.ChangeRepoFile) (*repo_model.Repository, string, func()) { +type DeclarativeRepoOptions struct { + Name optional.Option[string] + EnabledUnits optional.Option[[]unit_model.Type] + DisabledUnits optional.Option[[]unit_model.Type] + Files optional.Option[[]*files_service.ChangeRepoFile] +} + +func CreateDeclarativeRepoWithOptions(t *testing.T, owner *user_model.User, opts DeclarativeRepoOptions) (*repo_model.Repository, string, func()) { t.Helper() - repoName := name - if repoName == "" { + // Not using opts.Name.ValueOrDefault() here to avoid unnecessarily + // generating an UUID when a name is specified. + var repoName string + if opts.Name.Has() { + repoName = opts.Name.Value() + } else { repoName = gouuid.NewString() } - // Create a new repository + // Create the repository repo, err := repo_service.CreateRepository(db.DefaultContext, owner, owner, repo_service.CreateRepoOptions{ Name: repoName, Description: "Temporary Repo", @@ -673,21 +685,31 @@ func CreateDeclarativeRepo(t *testing.T, owner *user_model.User, name string, en assert.NoError(t, err) assert.NotEmpty(t, repo) - if enabledUnits != nil || disabledUnits != nil { - units := make([]repo_model.RepoUnit, len(enabledUnits)) - for i, unitType := range enabledUnits { - units[i] = repo_model.RepoUnit{ + // Populate `enabledUnits` if we have any enabled. + var enabledUnits []repo_model.RepoUnit + if opts.EnabledUnits.Has() { + units := opts.EnabledUnits.Value() + enabledUnits = make([]repo_model.RepoUnit, len(units)) + + for i, unitType := range units { + enabledUnits[i] = repo_model.RepoUnit{ RepoID: repo.ID, Type: unitType, } } + } - err := repo_service.UpdateRepositoryUnits(db.DefaultContext, repo, units, disabledUnits) + // Adjust the repo units according to our parameters. + if opts.EnabledUnits.Has() || opts.DisabledUnits.Has() { + err := repo_service.UpdateRepositoryUnits(db.DefaultContext, repo, enabledUnits, opts.DisabledUnits.ValueOrDefault(nil)) assert.NoError(t, err) } + // Add files, if any. var sha string - if len(files) > 0 { + if opts.Files.Has() { + files := opts.Files.Value() + resp, err := files_service.ChangeRepoFiles(git.DefaultContext, repo, owner, &files_service.ChangeRepoFilesOptions{ Files: files, Message: "add files", @@ -712,7 +734,30 @@ func CreateDeclarativeRepo(t *testing.T, owner *user_model.User, name string, en sha = resp.Commit.SHA } + // Return the repo, the top commit, and a defer-able function to delete the + // repo. return repo, sha, func() { repo_service.DeleteRepository(db.DefaultContext, owner, repo, false) } } + +func CreateDeclarativeRepo(t *testing.T, owner *user_model.User, name string, enabledUnits, disabledUnits []unit_model.Type, files []*files_service.ChangeRepoFile) (*repo_model.Repository, string, func()) { + t.Helper() + + var opts DeclarativeRepoOptions + + if name != "" { + opts.Name = optional.Some(name) + } + if enabledUnits != nil { + opts.EnabledUnits = optional.Some(enabledUnits) + } + if disabledUnits != nil { + opts.DisabledUnits = optional.Some(disabledUnits) + } + if files != nil { + opts.Files = optional.Some(files) + } + + return CreateDeclarativeRepoWithOptions(t, owner, opts) +} From c647e8639f30ef57fe1f6598208bc1aa72371389 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 24 Apr 2024 22:16:21 +0200 Subject: [PATCH 018/401] api: The repo wiki APIs should respect WikiBranch Back in #2264, we made it possible to change the branch wikis use from the hardcoded "master" branch to `[repository].DEFAULT_BRANCH`. However, the API endpoints were not updated, and the "master" branch remained hardcoded there. This change fixes that, the API endpoints will now respect the repository's `WikiBranch`. Fixes #3391. Signed-off-by: Gergely Nagy --- routers/api/v1/repo/wiki.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routers/api/v1/repo/wiki.go b/routers/api/v1/repo/wiki.go index f18ea087c4..b6f51cdadc 100644 --- a/routers/api/v1/repo/wiki.go +++ b/routers/api/v1/repo/wiki.go @@ -193,7 +193,7 @@ func getWikiPage(ctx *context.APIContext, wikiName wiki_service.WebPath) *api.Wi } // get commit count - wiki revisions - commitsCount, _ := wikiRepo.FileCommitsCount("master", pageFilename) + commitsCount, _ := wikiRepo.FileCommitsCount(ctx.Repo.Repository.GetWikiBranchName(), pageFilename) // Get last change information. lastCommit, err := wikiRepo.GetCommitByPath(pageFilename) @@ -432,7 +432,7 @@ func ListPageRevisions(ctx *context.APIContext) { } // get commit count - wiki revisions - commitsCount, _ := wikiRepo.FileCommitsCount("master", pageFilename) + commitsCount, _ := wikiRepo.FileCommitsCount(ctx.Repo.Repository.GetWikiBranchName(), pageFilename) page := ctx.FormInt("page") if page <= 1 { @@ -442,7 +442,7 @@ func ListPageRevisions(ctx *context.APIContext) { // get Commit Count commitsHistory, err := wikiRepo.CommitsByFileAndRange( git.CommitsByFileAndRangeOptions{ - Revision: "master", + Revision: ctx.Repo.Repository.GetWikiBranchName(), File: pageFilename, Page: page, }) @@ -487,7 +487,7 @@ func findWikiRepoCommit(ctx *context.APIContext) (*git.Repository, *git.Commit) return nil, nil } - commit, err := wikiRepo.GetBranchCommit("master") + commit, err := wikiRepo.GetBranchCommit(ctx.Repo.Repository.GetWikiBranchName()) if err != nil { if git.IsErrNotExist(err) { ctx.NotFound(err) From 6d2f6453637cc4335dca74f1afad5a80c6d34282 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 25 Apr 2024 00:08:53 +0200 Subject: [PATCH 019/401] tests: Let CreateDeclarativeRepoWithOptions create a Wiki too Add a new member to `DeclarativeRepoOptions`: `WikiBranch`. If specified, create a Wiki with the given branch, and a single "Home" page. This will be used by an upcoming test. Signed-off-by: Gergely Nagy --- tests/integration/integration_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/integration/integration_test.go b/tests/integration/integration_test.go index 7a373c74ee..61a243e52f 100644 --- a/tests/integration/integration_test.go +++ b/tests/integration/integration_test.go @@ -46,6 +46,7 @@ import ( repo_service "code.gitea.io/gitea/services/repository" files_service "code.gitea.io/gitea/services/repository/files" user_service "code.gitea.io/gitea/services/user" + wiki_service "code.gitea.io/gitea/services/wiki" "code.gitea.io/gitea/tests" "github.com/PuerkitoBio/goquery" @@ -658,6 +659,7 @@ type DeclarativeRepoOptions struct { EnabledUnits optional.Option[[]unit_model.Type] DisabledUnits optional.Option[[]unit_model.Type] Files optional.Option[[]*files_service.ChangeRepoFile] + WikiBranch optional.Option[string] } func CreateDeclarativeRepoWithOptions(t *testing.T, owner *user_model.User, opts DeclarativeRepoOptions) (*repo_model.Repository, string, func()) { @@ -734,6 +736,22 @@ func CreateDeclarativeRepoWithOptions(t *testing.T, owner *user_model.User, opts sha = resp.Commit.SHA } + // If there's a Wiki branch specified, create a wiki, and a default wiki page. + if opts.WikiBranch.Has() { + // Set the wiki branch in the database first + repo.WikiBranch = opts.WikiBranch.Value() + err := repo_model.UpdateRepositoryCols(db.DefaultContext, repo, "wiki_branch") + assert.NoError(t, err) + + // Initialize the wiki + err = wiki_service.InitWiki(db.DefaultContext, repo) + assert.NoError(t, err) + + // Add a new wiki page + err = wiki_service.AddWikiPage(db.DefaultContext, owner, repo, "Home", "Welcome to the wiki!", "Add a Home page") + assert.NoError(t, err) + } + // Return the repo, the top commit, and a defer-able function to delete the // repo. return repo, sha, func() { From a1dfe07bfcbedd895602609ad1846356ab342d76 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 25 Apr 2024 00:17:53 +0200 Subject: [PATCH 020/401] tests: Test the Wiki APIs with a non-master branch Signed-off-by: Gergely Nagy --- tests/integration/api_wiki_test.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/integration/api_wiki_test.go b/tests/integration/api_wiki_test.go index 2b71616112..400cf068b4 100644 --- a/tests/integration/api_wiki_test.go +++ b/tests/integration/api_wiki_test.go @@ -16,6 +16,7 @@ import ( unit_model "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/modules/optional" api "code.gitea.io/gitea/modules/structs" repo_service "code.gitea.io/gitea/services/repository" "code.gitea.io/gitea/tests" @@ -382,3 +383,28 @@ func TestAPIListPageRevisions(t *testing.T) { assert.Equal(t, dummyrevisions, revisions) } + +func TestAPIWikiNonMasterBranch(t *testing.T) { + defer tests.PrepareTestEnv(t)() + + user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) + repo, _, f := CreateDeclarativeRepoWithOptions(t, user, DeclarativeRepoOptions{ + WikiBranch: optional.Some("main"), + }) + defer f() + + uris := []string{ + "revisions/Home", + "pages", + "page/Home", + } + baseURL := fmt.Sprintf("/api/v1/repos/%s/wiki", repo.FullName()) + for _, uri := range uris { + t.Run(uri, func(t *testing.T) { + defer tests.PrintCurrentTest(t)() + + req := NewRequestf(t, "GET", "%s/%s", baseURL, uri) + MakeRequest(t, req, http.StatusOK) + }) + } +} From 1d894dda241f9bba46c09bb7d83f60811b715665 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 25 Apr 2024 01:07:41 +0200 Subject: [PATCH 021/401] Add a note about the previous bugfix to RELEASE-NOTES Signed-off-by: Gergely Nagy --- RELEASE-NOTES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 2ad10ff564..f38182a6eb 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -12,6 +12,8 @@ In addition to the following notable bug fixes, you can browse the [full list of * **Bug fixes:** +- Fixed a bug where the `/api/v1/repos/{owner}/{repo}/wiki` API endpoints were using a hardcoded "master" branch for the wiki, rather than the branch they really use. ([#3430](https://codeberg.org/forgejo/forgejo/pulls/3430)) + ## 7.0.0 The [complete list of commits](https://codeberg.org/forgejo/forgejo/commits/branch/v7.0/forgejo) included in the `Forgejo v7.0.0` release can be reviewed from the command line with: From d7ce77b7c6eda5f0155b8f582c4651d5a1977714 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 25 Apr 2024 00:05:18 +0000 Subject: [PATCH 022/401] Update dependency swagger-ui-dist to v5.17.1 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 08ff3af9e9..25ca9c62fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "postcss-nesting": "12.1.2", "pretty-ms": "9.0.0", "sortablejs": "1.15.2", - "swagger-ui-dist": "5.17.0", + "swagger-ui-dist": "5.17.1", "tailwindcss": "3.4.3", "temporal-polyfill": "0.2.4", "throttle-debounce": "5.0.0", @@ -11495,9 +11495,9 @@ } }, "node_modules/swagger-ui-dist": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.17.0.tgz", - "integrity": "sha512-PtEozc87rN6i6rqLYNVTK+1ZAYmCMy6poU6I2MOJXD19BVv6D7U9zwS8geRbtfamCM5yUwWkSNQKWGK58vculg==" + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.17.1.tgz", + "integrity": "sha512-6MNu1MYNALLFvcPpo2MJVJFIxz2rFkH+XoX+J72LBLdj4JLjVaP4lHmNHtJ/tXZUXHdsb2Iw9JhPlqspjkomQg==" }, "node_modules/sync-fetch": { "version": "0.4.5", diff --git a/package.json b/package.json index a74beadce3..5d7e2b482f 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "postcss-nesting": "12.1.2", "pretty-ms": "9.0.0", "sortablejs": "1.15.2", - "swagger-ui-dist": "5.17.0", + "swagger-ui-dist": "5.17.1", "tailwindcss": "3.4.3", "temporal-polyfill": "0.2.4", "throttle-debounce": "5.0.0", From f1afbb3442d4b96df005f2fda889595913703e17 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 25 Apr 2024 06:03:55 +0000 Subject: [PATCH 023/401] Update dependency vitest to v1.5.1 --- package-lock.json | 66 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 08ff3af9e9..cfde6a5941 100644 --- a/package-lock.json +++ b/package-lock.json @@ -96,7 +96,7 @@ "svgo": "3.2.0", "updates": "16.0.1", "vite-string-plugin": "1.2.0", - "vitest": "1.5.0" + "vitest": "1.5.1" }, "engines": { "node": ">= 18.0.0" @@ -2545,13 +2545,13 @@ } }, "node_modules/@vitest/expect": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.5.0.tgz", - "integrity": "sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.5.1.tgz", + "integrity": "sha512-w3Bn+VUMqku+oWmxvPhTE86uMTbfmBl35aGaIPlwVW7Q89ZREC/icfo2HBsEZ3AAW6YR9lObfZKPEzstw9tJOQ==", "dev": true, "dependencies": { - "@vitest/spy": "1.5.0", - "@vitest/utils": "1.5.0", + "@vitest/spy": "1.5.1", + "@vitest/utils": "1.5.1", "chai": "^4.3.10" }, "funding": { @@ -2559,12 +2559,12 @@ } }, "node_modules/@vitest/runner": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.5.0.tgz", - "integrity": "sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.5.1.tgz", + "integrity": "sha512-mt372zsz0vFR7L1xF/ert4t+teD66oSuXoTyaZbl0eJgilvyzCKP1tJ21gVa8cDklkBOM3DLnkE1ljj/BskyEw==", "dev": true, "dependencies": { - "@vitest/utils": "1.5.0", + "@vitest/utils": "1.5.1", "p-limit": "^5.0.0", "pathe": "^1.1.1" }, @@ -2600,9 +2600,9 @@ } }, "node_modules/@vitest/snapshot": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.5.0.tgz", - "integrity": "sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.5.1.tgz", + "integrity": "sha512-h/1SGaZYXmjn6hULRBOlqam2z4oTlEe6WwARRzLErAPBqljAs6eX7tfdyN0K+MpipIwSZ5sZsubDWkCPAiVXZQ==", "dev": true, "dependencies": { "magic-string": "^0.30.5", @@ -2626,9 +2626,9 @@ } }, "node_modules/@vitest/spy": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.5.0.tgz", - "integrity": "sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.5.1.tgz", + "integrity": "sha512-vsqczk6uPJjmPLy6AEtqfbFqgLYcGBe9BTY+XL8L6y8vrGOhyE23CJN9P/hPimKXnScbqiZ/r/UtUSOQ2jIDGg==", "dev": true, "dependencies": { "tinyspy": "^2.2.0" @@ -2638,9 +2638,9 @@ } }, "node_modules/@vitest/utils": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.5.0.tgz", - "integrity": "sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.5.1.tgz", + "integrity": "sha512-92pE17bBXUxA0Y7goPcvnATMCuq4NQLOmqsG0e2BtzRi7KLwZB5jpiELi/8ybY8IQNWemKjSD5rMoO7xTdv8ug==", "dev": true, "dependencies": { "diff-sequences": "^29.6.3", @@ -12257,9 +12257,9 @@ } }, "node_modules/vite-node": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.5.0.tgz", - "integrity": "sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.5.1.tgz", + "integrity": "sha512-HNpfV7BrAsjkYVNWIcPleJwvJmydJqqJRrRbpoQ/U7QDwJKyEzNa4g5aYg8MjXJyKsk29IUCcMLFRcsEvqUIsA==", "dev": true, "dependencies": { "cac": "^6.7.14", @@ -12339,16 +12339,16 @@ } }, "node_modules/vitest": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.5.0.tgz", - "integrity": "sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.5.1.tgz", + "integrity": "sha512-3GvBMpoRnUNbZRX1L3mJCv3Ou3NAobb4dM48y8k9ZGwDofePpclTOyO+lqJFKSQpubH1V8tEcAEw/Y3mJKGJQQ==", "dev": true, "dependencies": { - "@vitest/expect": "1.5.0", - "@vitest/runner": "1.5.0", - "@vitest/snapshot": "1.5.0", - "@vitest/spy": "1.5.0", - "@vitest/utils": "1.5.0", + "@vitest/expect": "1.5.1", + "@vitest/runner": "1.5.1", + "@vitest/snapshot": "1.5.1", + "@vitest/spy": "1.5.1", + "@vitest/utils": "1.5.1", "acorn-walk": "^8.3.2", "chai": "^4.3.10", "debug": "^4.3.4", @@ -12362,7 +12362,7 @@ "tinybench": "^2.5.1", "tinypool": "^0.8.3", "vite": "^5.0.0", - "vite-node": "1.5.0", + "vite-node": "1.5.1", "why-is-node-running": "^2.2.2" }, "bin": { @@ -12377,8 +12377,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.5.0", - "@vitest/ui": "1.5.0", + "@vitest/browser": "1.5.1", + "@vitest/ui": "1.5.1", "happy-dom": "*", "jsdom": "*" }, diff --git a/package.json b/package.json index a74beadce3..359b14afad 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "svgo": "3.2.0", "updates": "16.0.1", "vite-string-plugin": "1.2.0", - "vitest": "1.5.0" + "vitest": "1.5.1" }, "browserslist": ["defaults"] } From 0d37f3a79bd1aa0bea391a4ca978c722666698d3 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Thu, 25 Apr 2024 11:20:04 +0200 Subject: [PATCH 024/401] test: empty existing comment --- tests/integration/issue_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index 84487a847a..49d1cbb016 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -307,6 +307,16 @@ func TestIssueCommentUpdate(t *testing.T) { comment = unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{ID: commentID}) assert.Equal(t, modifiedContent, comment.Content) + + // make the comment empty + req = NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/comments/%d", "user2", "repo1", commentID), map[string]string{ + "_csrf": GetCSRF(t, session, issueURL), + "content": "", + }) + session.MakeRequest(t, req, http.StatusOK) + + comment = unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{ID: commentID}) + assert.Equal(t, "", comment.Content) } func TestIssueReaction(t *testing.T) { From ea9051624d174808b6f3a656f050240c1e0347f4 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Thu, 25 Apr 2024 11:21:39 +0200 Subject: [PATCH 025/401] comment: save empty comments --- routers/web/repo/issue.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 520737809b..b0b4b65331 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -3160,12 +3160,6 @@ func UpdateCommentContent(ctx *context.Context) { oldContent := comment.Content comment.Content = ctx.FormString("content") - if len(comment.Content) == 0 { - ctx.JSON(http.StatusOK, map[string]any{ - "content": "", - }) - return - } if err = issue_service.UpdateComment(ctx, comment, ctx.Doer, oldContent); err != nil { ctx.ServerError("UpdateComment", err) return From 7cabc5670d6c9561c48dc2eb279e510825336713 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sun, 25 Feb 2024 11:32:59 +0100 Subject: [PATCH 026/401] Implement remote user login source and promotion to regular user A remote user (UserTypeRemoteUser) is a placeholder that can be promoted to a regular user (UserTypeIndividual). It represents users that exist somewhere else. Although the UserTypeRemoteUser already exists in Forgejo, it is neither used or documented. A new login type / source (Remote) is introduced and set to be the login type of remote users. Type UserTypeRemoteUser LogingType Remote The association between a remote user and its counterpart in another environment (for instance another forge) is via the OAuth2 login source: LoginName set to the unique identifier relative to the login source LoginSource set to the identifier of the remote source For instance when migrating from GitLab.com, a user can be created as if it was authenticated using GitLab.com as an OAuth2 authentication source. When a user authenticates to Forejo from the same authentication source and the identifier match, the remote user is promoted to a regular user. For instance if 43 is the ID of the GitLab.com OAuth2 login source, 88 is the ID of the Remote loging source, and 48323 is the identifier of the foo user: Type UserTypeRemoteUser LogingType Remote LoginName 48323 LoginSource 88 Email (empty) Name foo Will be promoted to the following when the user foo authenticates to the Forgejo instance using GitLab.com as an OAuth2 provider. All users with a LoginType of Remote and a LoginName of 48323 are examined. If the LoginSource has a provider name that matches the provider name of GitLab.com (usually just "gitlab"), it is a match and can be promoted. The email is obtained via the OAuth2 provider and the user set to: Type UserTypeIndividual LogingType OAuth2 LoginName 48323 LoginSource 43 Email foo@example.com Name foo Note: the Remote login source is an indirection to the actual login source, i.e. the provider string my be set to a login source that does not exist yet. --- models/auth/source.go | 6 + models/user/fixtures/user.yml | 36 +++++ models/user/search.go | 6 +- models/user/user.go | 9 +- models/user/user_test.go | 53 ++++++- routers/web/auth/oauth.go | 46 ++++-- services/auth/source/remote/source.go | 33 +++++ services/remote/promote.go | 133 +++++++++++++++++ tests/integration/integration_test.go | 34 ++++- tests/integration/remote_test.go | 205 ++++++++++++++++++++++++++ 10 files changed, 540 insertions(+), 21 deletions(-) create mode 100644 models/user/fixtures/user.yml create mode 100644 services/auth/source/remote/source.go create mode 100644 services/remote/promote.go create mode 100644 tests/integration/remote_test.go diff --git a/models/auth/source.go b/models/auth/source.go index 1a3a1b20a6..d03d4975dc 100644 --- a/models/auth/source.go +++ b/models/auth/source.go @@ -33,6 +33,7 @@ const ( DLDAP // 5 OAuth2 // 6 SSPI // 7 + Remote // 8 ) // String returns the string name of the LoginType @@ -53,6 +54,7 @@ var Names = map[Type]string{ PAM: "PAM", OAuth2: "OAuth2", SSPI: "SPNEGO with SSPI", + Remote: "Remote", } // Config represents login config as far as the db is concerned @@ -181,6 +183,10 @@ func (source *Source) IsSSPI() bool { return source.Type == SSPI } +func (source *Source) IsRemote() bool { + return source.Type == Remote +} + // HasTLS returns true of this source supports TLS. func (source *Source) HasTLS() bool { hasTLSer, ok := source.Cfg.(HasTLSer) diff --git a/models/user/fixtures/user.yml b/models/user/fixtures/user.yml new file mode 100644 index 0000000000..b1892f331b --- /dev/null +++ b/models/user/fixtures/user.yml @@ -0,0 +1,36 @@ +- + id: 1041 + lower_name: remote01 + name: remote01 + full_name: Remote01 + email: remote01@example.com + keep_email_private: false + email_notifications_preference: onmention + passwd: ZogKvWdyEx:password + passwd_hash_algo: dummy + must_change_password: false + login_source: 1001 + login_name: 123 + type: 5 + salt: ZogKvWdyEx + max_repo_creation: -1 + is_active: true + is_admin: false + is_restricted: false + allow_git_hook: false + allow_import_local: false + allow_create_organization: true + prohibit_login: true + avatar: avatarremote01 + avatar_email: avatarremote01@example.com + use_custom_avatar: false + num_followers: 0 + num_following: 0 + num_stars: 0 + num_repos: 0 + num_teams: 0 + num_members: 0 + visibility: 0 + repo_admin_change_team_access: false + theme: "" + keep_activity_private: false diff --git a/models/user/search.go b/models/user/search.go index a710b70287..04c434e4fa 100644 --- a/models/user/search.go +++ b/models/user/search.go @@ -45,7 +45,11 @@ type SearchUserOptions struct { func (opts *SearchUserOptions) toSearchQueryBase(ctx context.Context) *xorm.Session { var cond builder.Cond - cond = builder.Eq{"type": opts.Type} + if opts.Type == UserTypeIndividual { + cond = builder.In("type", UserTypeIndividual, UserTypeRemoteUser) + } else { + cond = builder.Eq{"type": opts.Type} + } if opts.IncludeReserved { if opts.Type == UserTypeIndividual { cond = cond.Or(builder.Eq{"type": UserTypeUserReserved}).Or( diff --git a/models/user/user.go b/models/user/user.go index 8452e3c7cf..df129a5efe 100644 --- a/models/user/user.go +++ b/models/user/user.go @@ -216,7 +216,7 @@ func (u *User) GetEmail() string { // GetAllUsers returns a slice of all individual users found in DB. func GetAllUsers(ctx context.Context) ([]*User, error) { users := make([]*User, 0) - return users, db.GetEngine(ctx).OrderBy("id").Where("type = ?", UserTypeIndividual).Find(&users) + return users, db.GetEngine(ctx).OrderBy("id").In("type", UserTypeIndividual, UserTypeRemoteUser).Find(&users) } // GetAllAdmins returns a slice of all adminusers found in DB. @@ -416,6 +416,10 @@ func (u *User) IsBot() bool { return u.Type == UserTypeBot } +func (u *User) IsRemote() bool { + return u.Type == UserTypeRemoteUser +} + // DisplayName returns full name if it's not empty, // returns username otherwise. func (u *User) DisplayName() string { @@ -918,7 +922,8 @@ func GetUserByName(ctx context.Context, name string) (*User, error) { if len(name) == 0 { return nil, ErrUserNotExist{Name: name} } - u := &User{LowerName: strings.ToLower(name), Type: UserTypeIndividual} + // adding Type: UserTypeIndividual is a noop because it is zero and discarded + u := &User{LowerName: strings.ToLower(name)} has, err := db.GetEngine(ctx).Get(u) if err != nil { return nil, err diff --git a/models/user/user_test.go b/models/user/user_test.go index 7888c2638f..571b8b2a93 100644 --- a/models/user/user_test.go +++ b/models/user/user_test.go @@ -21,6 +21,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -33,6 +34,35 @@ func TestOAuth2Application_LoadUser(t *testing.T) { assert.NotNil(t, user) } +func TestGetUserByName(t *testing.T) { + defer tests.AddFixtures("models/user/fixtures/")() + assert.NoError(t, unittest.PrepareTestDatabase()) + + { + _, err := user_model.GetUserByName(db.DefaultContext, "") + assert.True(t, user_model.IsErrUserNotExist(err), err) + } + { + _, err := user_model.GetUserByName(db.DefaultContext, "UNKNOWN") + assert.True(t, user_model.IsErrUserNotExist(err), err) + } + { + user, err := user_model.GetUserByName(db.DefaultContext, "USER2") + assert.NoError(t, err) + assert.Equal(t, user.Name, "user2") + } + { + user, err := user_model.GetUserByName(db.DefaultContext, "org3") + assert.NoError(t, err) + assert.Equal(t, user.Name, "org3") + } + { + user, err := user_model.GetUserByName(db.DefaultContext, "remote01") + assert.NoError(t, err) + assert.Equal(t, user.Name, "remote01") + } +} + func TestGetUserEmailsByNames(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) @@ -61,7 +91,24 @@ func TestCanCreateOrganization(t *testing.T) { assert.False(t, user.CanCreateOrganization()) } +func TestGetAllUsers(t *testing.T) { + defer tests.AddFixtures("models/user/fixtures/")() + assert.NoError(t, unittest.PrepareTestDatabase()) + + users, err := user_model.GetAllUsers(db.DefaultContext) + assert.NoError(t, err) + + found := make(map[user_model.UserType]bool, 0) + for _, user := range users { + found[user.Type] = true + } + assert.True(t, found[user_model.UserTypeIndividual], users) + assert.True(t, found[user_model.UserTypeRemoteUser], users) + assert.False(t, found[user_model.UserTypeOrganization], users) +} + func TestSearchUsers(t *testing.T) { + defer tests.AddFixtures("models/user/fixtures/")() assert.NoError(t, unittest.PrepareTestDatabase()) testSuccess := func(opts *user_model.SearchUserOptions, expectedUserOrOrgIDs []int64) { users, _, err := user_model.SearchUsers(db.DefaultContext, opts) @@ -102,13 +149,13 @@ func TestSearchUsers(t *testing.T) { } testUserSuccess(&user_model.SearchUserOptions{OrderBy: "id ASC", ListOptions: db.ListOptions{Page: 1}}, - []int64{1, 2, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 27, 28, 29, 30, 32, 34, 37, 38, 39, 40}) + []int64{1, 2, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 27, 28, 29, 30, 32, 34, 37, 38, 39, 40, 1041}) testUserSuccess(&user_model.SearchUserOptions{ListOptions: db.ListOptions{Page: 1}, IsActive: optional.Some(false)}, []int64{9}) testUserSuccess(&user_model.SearchUserOptions{OrderBy: "id ASC", ListOptions: db.ListOptions{Page: 1}, IsActive: optional.Some(true)}, - []int64{1, 2, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 27, 28, 29, 30, 32, 34, 37, 38, 39, 40}) + []int64{1, 2, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 27, 28, 29, 30, 32, 34, 37, 38, 39, 40, 1041}) testUserSuccess(&user_model.SearchUserOptions{Keyword: "user1", OrderBy: "id ASC", ListOptions: db.ListOptions{Page: 1}, IsActive: optional.Some(true)}, []int64{1, 10, 11, 12, 13, 14, 15, 16, 18}) @@ -124,7 +171,7 @@ func TestSearchUsers(t *testing.T) { []int64{29}) testUserSuccess(&user_model.SearchUserOptions{ListOptions: db.ListOptions{Page: 1}, IsProhibitLogin: optional.Some(true)}, - []int64{37}) + []int64{1041, 37}) testUserSuccess(&user_model.SearchUserOptions{ListOptions: db.ListOptions{Page: 1}, IsTwoFactorEnabled: optional.Some(true)}, []int64{24}) diff --git a/routers/web/auth/oauth.go b/routers/web/auth/oauth.go index f5ca0bda5e..b48345684b 100644 --- a/routers/web/auth/oauth.go +++ b/routers/web/auth/oauth.go @@ -35,6 +35,7 @@ import ( "code.gitea.io/gitea/services/context" "code.gitea.io/gitea/services/externalaccount" "code.gitea.io/gitea/services/forms" + remote_service "code.gitea.io/gitea/services/remote" user_service "code.gitea.io/gitea/services/user" "gitea.com/go-chi/binding" @@ -1202,9 +1203,21 @@ func handleOAuth2SignIn(ctx *context.Context, source *auth.Source, u *user_model ctx.Redirect(setting.AppSubURL + "/user/two_factor") } -// OAuth2UserLoginCallback attempts to handle the callback from the OAuth2 provider and if successful -// login the user func oAuth2UserLoginCallback(ctx *context.Context, authSource *auth.Source, request *http.Request, response http.ResponseWriter) (*user_model.User, goth.User, error) { + gothUser, err := oAuth2FetchUser(ctx, authSource, request, response) + if err != nil { + return nil, goth.User{}, err + } + + if _, _, err := remote_service.MaybePromoteRemoteUser(ctx, authSource, gothUser.UserID, gothUser.Email); err != nil { + return nil, goth.User{}, err + } + + u, err := oAuth2GothUserToUser(request.Context(), authSource, gothUser) + return u, gothUser, err +} + +func oAuth2FetchUser(ctx *context.Context, authSource *auth.Source, request *http.Request, response http.ResponseWriter) (goth.User, error) { oauth2Source := authSource.Cfg.(*oauth2.Source) // Make sure that the response is not an error response. @@ -1216,10 +1229,10 @@ func oAuth2UserLoginCallback(ctx *context.Context, authSource *auth.Source, requ // Delete the goth session err := gothic.Logout(response, request) if err != nil { - return nil, goth.User{}, err + return goth.User{}, err } - return nil, goth.User{}, errCallback{ + return goth.User{}, errCallback{ Code: errorName, Description: errorDescription, } @@ -1232,24 +1245,28 @@ func oAuth2UserLoginCallback(ctx *context.Context, authSource *auth.Source, requ log.Error("OAuth2 Provider %s returned too long a token. Current max: %d. Either increase the [OAuth2] MAX_TOKEN_LENGTH or reduce the information returned from the OAuth2 provider", authSource.Name, setting.OAuth2.MaxTokenLength) err = fmt.Errorf("OAuth2 Provider %s returned too long a token. Current max: %d. Either increase the [OAuth2] MAX_TOKEN_LENGTH or reduce the information returned from the OAuth2 provider", authSource.Name, setting.OAuth2.MaxTokenLength) } - return nil, goth.User{}, err + return goth.User{}, err } if oauth2Source.RequiredClaimName != "" { claimInterface, has := gothUser.RawData[oauth2Source.RequiredClaimName] if !has { - return nil, goth.User{}, user_model.ErrUserProhibitLogin{Name: gothUser.UserID} + return goth.User{}, user_model.ErrUserProhibitLogin{Name: gothUser.UserID} } if oauth2Source.RequiredClaimValue != "" { groups := claimValueToStringSet(claimInterface) if !groups.Contains(oauth2Source.RequiredClaimValue) { - return nil, goth.User{}, user_model.ErrUserProhibitLogin{Name: gothUser.UserID} + return goth.User{}, user_model.ErrUserProhibitLogin{Name: gothUser.UserID} } } } + return gothUser, nil +} + +func oAuth2GothUserToUser(ctx go_context.Context, authSource *auth.Source, gothUser goth.User) (*user_model.User, error) { user := &user_model.User{ LoginName: gothUser.UserID, LoginType: auth.OAuth2, @@ -1258,27 +1275,28 @@ func oAuth2UserLoginCallback(ctx *context.Context, authSource *auth.Source, requ hasUser, err := user_model.GetUser(ctx, user) if err != nil { - return nil, goth.User{}, err + return nil, err } if hasUser { - return user, gothUser, nil + return user, nil } + log.Debug("no user found for LoginName %v, LoginSource %v, LoginType %v", user.LoginName, user.LoginSource, user.LoginType) // search in external linked users externalLoginUser := &user_model.ExternalLoginUser{ ExternalID: gothUser.UserID, LoginSourceID: authSource.ID, } - hasUser, err = user_model.GetExternalLogin(request.Context(), externalLoginUser) + hasUser, err = user_model.GetExternalLogin(ctx, externalLoginUser) if err != nil { - return nil, goth.User{}, err + return nil, err } if hasUser { - user, err = user_model.GetUserByID(request.Context(), externalLoginUser.UserID) - return user, gothUser, err + user, err = user_model.GetUserByID(ctx, externalLoginUser.UserID) + return user, err } // no user found to login - return nil, gothUser, nil + return nil, nil } diff --git a/services/auth/source/remote/source.go b/services/auth/source/remote/source.go new file mode 100644 index 0000000000..4165858a56 --- /dev/null +++ b/services/auth/source/remote/source.go @@ -0,0 +1,33 @@ +// Copyright Earl Warren +// SPDX-License-Identifier: MIT + +package remote + +import ( + "code.gitea.io/gitea/models/auth" + "code.gitea.io/gitea/modules/json" +) + +type Source struct { + URL string + MatchingSource string + + // reference to the authSource + authSource *auth.Source +} + +func (source *Source) FromDB(bs []byte) error { + return json.UnmarshalHandleDoubleEncode(bs, &source) +} + +func (source *Source) ToDB() ([]byte, error) { + return json.Marshal(source) +} + +func (source *Source) SetAuthSource(authSource *auth.Source) { + source.authSource = authSource +} + +func init() { + auth.RegisterTypeConfig(auth.Remote, &Source{}) +} diff --git a/services/remote/promote.go b/services/remote/promote.go new file mode 100644 index 0000000000..6709b4cc1d --- /dev/null +++ b/services/remote/promote.go @@ -0,0 +1,133 @@ +// Copyright Earl Warren +// SPDX-License-Identifier: MIT + +package remote + +import ( + "context" + + auth_model "code.gitea.io/gitea/models/auth" + "code.gitea.io/gitea/models/db" + user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/services/auth/source/oauth2" + remote_source "code.gitea.io/gitea/services/auth/source/remote" +) + +type Reason int + +const ( + ReasonNoMatch Reason = iota + ReasonNotAuth2 + ReasonBadAuth2 + ReasonLoginNameNotExists + ReasonNotRemote + ReasonEmailIsSet + ReasonNoSource + ReasonSourceWrongType + ReasonCanPromote + ReasonPromoted + ReasonUpdateFail + ReasonErrorLoginName + ReasonErrorGetSource +) + +func NewReason(level log.Level, reason Reason, message string, args ...any) Reason { + log.Log(1, level, message, args...) + return reason +} + +func getUsersByLoginName(ctx context.Context, name string) ([]*user_model.User, error) { + if len(name) == 0 { + return nil, user_model.ErrUserNotExist{Name: name} + } + + users := make([]*user_model.User, 0, 5) + + return users, db.GetEngine(ctx). + Table("user"). + Where("login_name = ? AND login_type = ? AND type = ?", name, auth_model.Remote, user_model.UserTypeRemoteUser). + Find(&users) +} + +// The remote user has: +// +// Type UserTypeRemoteUser +// LogingType Remote +// LoginName set to the unique identifier of the originating authentication source +// LoginSource set to the Remote source that can be matched against an OAuth2 source +// +// If the source from which an authentification happens is OAuth2, an existing +// remote user will be promoted to an OAuth2 user provided: +// +// user.LoginName is the same as goth.UserID (argument loginName) +// user.LoginSource has a MatchingSource equals to the name of the OAuth2 provider +// +// Once promoted, the user will be logged in without further interaction from the +// user and will own all repositories, issues, etc. associated with it. +func MaybePromoteRemoteUser(ctx context.Context, source *auth_model.Source, loginName, email string) (promoted bool, reason Reason, err error) { + user, reason, err := getRemoteUserToPromote(ctx, source, loginName, email) + if err != nil || user == nil { + return false, reason, err + } + promote := &user_model.User{ + ID: user.ID, + Type: user_model.UserTypeIndividual, + Email: email, + LoginSource: source.ID, + LoginType: source.Type, + } + reason = NewReason(log.DEBUG, ReasonPromoted, "promote user %v: LoginName %v => %v, LoginSource %v => %v, LoginType %v => %v, Email %v => %v", user.ID, user.LoginName, promote.LoginName, user.LoginSource, promote.LoginSource, user.LoginType, promote.LoginType, user.Email, promote.Email) + if err := user_model.UpdateUserCols(ctx, promote, "type", "email", "login_source", "login_type"); err != nil { + return false, ReasonUpdateFail, err + } + return true, reason, nil +} + +func getRemoteUserToPromote(ctx context.Context, source *auth_model.Source, loginName, email string) (*user_model.User, Reason, error) { + if !source.IsOAuth2() { + return nil, NewReason(log.DEBUG, ReasonNotAuth2, "source %v is not OAuth2", source), nil + } + oauth2Source, ok := source.Cfg.(*oauth2.Source) + if !ok { + return nil, NewReason(log.ERROR, ReasonBadAuth2, "source claims to be OAuth2 but is not"), nil + } + + users, err := getUsersByLoginName(ctx, loginName) + if err != nil { + return nil, NewReason(log.ERROR, ReasonErrorLoginName, "getUserByLoginName('%s') %v", loginName, err), err + } + if len(users) == 0 { + return nil, NewReason(log.ERROR, ReasonLoginNameNotExists, "no user with LoginType UserTypeRemoteUser and LoginName '%s'", loginName), nil + } + + reason := ReasonNoSource + for _, u := range users { + userSource, err := auth_model.GetSourceByID(ctx, u.LoginSource) + if err != nil { + if auth_model.IsErrSourceNotExist(err) { + reason = NewReason(log.DEBUG, ReasonNoSource, "source id = %v for user %v not found %v", u.LoginSource, u.ID, err) + continue + } + return nil, NewReason(log.ERROR, ReasonErrorGetSource, "GetSourceByID('%s') %v", u.LoginSource, err), err + } + if u.Email != "" { + reason = NewReason(log.DEBUG, ReasonEmailIsSet, "the user email is already set to '%s'", u.Email) + continue + } + remoteSource, ok := userSource.Cfg.(*remote_source.Source) + if !ok { + reason = NewReason(log.DEBUG, ReasonSourceWrongType, "expected a remote source but got %T %v", userSource, userSource) + continue + } + + if oauth2Source.Provider != remoteSource.MatchingSource { + reason = NewReason(log.DEBUG, ReasonNoMatch, "skip OAuth2 source %s because it is different from %s which is the expected match for the remote source %s", oauth2Source.Provider, remoteSource.MatchingSource, remoteSource.URL) + continue + } + + return u, ReasonCanPromote, nil + } + + return nil, reason, nil +} diff --git a/tests/integration/integration_test.go b/tests/integration/integration_test.go index 61a243e52f..f5b87231f3 100644 --- a/tests/integration/integration_test.go +++ b/tests/integration/integration_test.go @@ -42,6 +42,7 @@ import ( "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers" + "code.gitea.io/gitea/services/auth/source/remote" gitea_context "code.gitea.io/gitea/services/context" repo_service "code.gitea.io/gitea/services/repository" files_service "code.gitea.io/gitea/services/repository/files" @@ -53,7 +54,8 @@ import ( gouuid "github.com/google/uuid" "github.com/markbates/goth" "github.com/markbates/goth/gothic" - goth_gitlab "github.com/markbates/goth/providers/gitlab" + goth_gitlab "github.com/markbates/goth/providers/github" + goth_github "github.com/markbates/goth/providers/gitlab" "github.com/santhosh-tekuri/jsonschema/v5" "github.com/stretchr/testify/assert" ) @@ -338,6 +340,36 @@ func authSourcePayloadGitLabCustom(name string) map[string]string { return payload } +func authSourcePayloadGitHub(name string) map[string]string { + payload := authSourcePayloadOAuth2(name) + payload["oauth2_provider"] = "github" + return payload +} + +func authSourcePayloadGitHubCustom(name string) map[string]string { + payload := authSourcePayloadGitHub(name) + payload["oauth2_use_custom_url"] = "on" + payload["oauth2_auth_url"] = goth_github.AuthURL + payload["oauth2_token_url"] = goth_github.TokenURL + payload["oauth2_profile_url"] = goth_github.ProfileURL + return payload +} + +func createRemoteAuthSource(t *testing.T, name, url, matchingSource string) *auth.Source { + assert.NoError(t, auth.CreateSource(context.Background(), &auth.Source{ + Type: auth.Remote, + Name: name, + IsActive: true, + Cfg: &remote.Source{ + URL: url, + MatchingSource: matchingSource, + }, + })) + source, err := auth.GetSourceByName(context.Background(), name) + assert.NoError(t, err) + return source +} + func createUser(ctx context.Context, t testing.TB, user *user_model.User) func() { user.MustChangePassword = false user.LowerName = strings.ToLower(user.Name) diff --git a/tests/integration/remote_test.go b/tests/integration/remote_test.go new file mode 100644 index 0000000000..d905f88a81 --- /dev/null +++ b/tests/integration/remote_test.go @@ -0,0 +1,205 @@ +// Copyright Earl Warren +// SPDX-License-Identifier: MIT + +package integration + +import ( + "context" + "fmt" + "net/http" + "testing" + + auth_model "code.gitea.io/gitea/models/auth" + "code.gitea.io/gitea/models/unittest" + user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/modules/test" + remote_service "code.gitea.io/gitea/services/remote" + "code.gitea.io/gitea/tests" + + "github.com/markbates/goth" + "github.com/stretchr/testify/assert" +) + +func TestRemote_MaybePromoteUserSuccess(t *testing.T) { + defer tests.PrepareTestEnv(t)() + + // + // OAuth2 authentication source GitLab + // + gitlabName := "gitlab" + _ = addAuthSource(t, authSourcePayloadGitLabCustom(gitlabName)) + // + // Remote authentication source matching the GitLab authentication source + // + remoteName := "remote" + remote := createRemoteAuthSource(t, remoteName, "http://mygitlab.eu", gitlabName) + + // + // Create a user as if it had previously been created by the remote + // authentication source. + // + gitlabUserID := "5678" + gitlabEmail := "gitlabuser@example.com" + userBeforeSignIn := &user_model.User{ + Name: "gitlabuser", + Type: user_model.UserTypeRemoteUser, + LoginType: auth_model.Remote, + LoginSource: remote.ID, + LoginName: gitlabUserID, + } + defer createUser(context.Background(), t, userBeforeSignIn)() + + // + // A request for user information sent to Goth will return a + // goth.User exactly matching the user created above. + // + defer mockCompleteUserAuth(func(res http.ResponseWriter, req *http.Request) (goth.User, error) { + return goth.User{ + Provider: gitlabName, + UserID: gitlabUserID, + Email: gitlabEmail, + }, nil + })() + req := NewRequest(t, "GET", fmt.Sprintf("/user/oauth2/%s/callback?code=XYZ&state=XYZ", gitlabName)) + resp := MakeRequest(t, req, http.StatusSeeOther) + assert.Equal(t, "/", test.RedirectURL(resp)) + userAfterSignIn := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: userBeforeSignIn.ID}) + + // both are about the same user + assert.Equal(t, userAfterSignIn.ID, userBeforeSignIn.ID) + // the login time was updated, proof the login succeeded + assert.Greater(t, userAfterSignIn.LastLoginUnix, userBeforeSignIn.LastLoginUnix) + // the login type was promoted from Remote to OAuth2 + assert.Equal(t, userBeforeSignIn.LoginType, auth_model.Remote) + assert.Equal(t, userAfterSignIn.LoginType, auth_model.OAuth2) + // the OAuth2 email was used to set the missing user email + assert.Equal(t, userBeforeSignIn.Email, "") + assert.Equal(t, userAfterSignIn.Email, gitlabEmail) +} + +func TestRemote_MaybePromoteUserFail(t *testing.T) { + defer tests.PrepareTestEnv(t)() + + ctx := context.Background() + // + // OAuth2 authentication source GitLab + // + gitlabName := "gitlab" + gitlabSource := addAuthSource(t, authSourcePayloadGitLabCustom(gitlabName)) + // + // Remote authentication source matching the GitLab authentication source + // + remoteName := "remote" + remoteSource := createRemoteAuthSource(t, remoteName, "http://mygitlab.eu", gitlabName) + + { + promoted, reason, err := remote_service.MaybePromoteRemoteUser(ctx, &auth_model.Source{}, "", "") + assert.NoError(t, err) + assert.False(t, promoted) + assert.Equal(t, remote_service.ReasonNotAuth2, reason) + } + + { + remoteSource.Type = auth_model.OAuth2 + promoted, reason, err := remote_service.MaybePromoteRemoteUser(ctx, remoteSource, "", "") + assert.NoError(t, err) + assert.False(t, promoted) + assert.Equal(t, remote_service.ReasonBadAuth2, reason) + remoteSource.Type = auth_model.Remote + } + + { + promoted, reason, err := remote_service.MaybePromoteRemoteUser(ctx, gitlabSource, "unknownloginname", "") + assert.NoError(t, err) + assert.False(t, promoted) + assert.Equal(t, remote_service.ReasonLoginNameNotExists, reason) + } + + { + remoteUserID := "844" + remoteUser := &user_model.User{ + Name: "withmailuser", + Type: user_model.UserTypeRemoteUser, + LoginType: auth_model.Remote, + LoginSource: remoteSource.ID, + LoginName: remoteUserID, + Email: "some@example.com", + } + defer createUser(context.Background(), t, remoteUser)() + promoted, reason, err := remote_service.MaybePromoteRemoteUser(ctx, gitlabSource, remoteUserID, "") + assert.NoError(t, err) + assert.False(t, promoted) + assert.Equal(t, remote_service.ReasonEmailIsSet, reason) + } + + { + remoteUserID := "7464" + nonexistentloginsource := int64(4344) + remoteUser := &user_model.User{ + Name: "badsourceuser", + Type: user_model.UserTypeRemoteUser, + LoginType: auth_model.Remote, + LoginSource: nonexistentloginsource, + LoginName: remoteUserID, + } + defer createUser(context.Background(), t, remoteUser)() + promoted, reason, err := remote_service.MaybePromoteRemoteUser(ctx, gitlabSource, remoteUserID, "") + assert.NoError(t, err) + assert.False(t, promoted) + assert.Equal(t, remote_service.ReasonNoSource, reason) + } + + { + remoteUserID := "33335678" + remoteUser := &user_model.User{ + Name: "badremoteuser", + Type: user_model.UserTypeRemoteUser, + LoginType: auth_model.Remote, + LoginSource: gitlabSource.ID, + LoginName: remoteUserID, + } + defer createUser(context.Background(), t, remoteUser)() + promoted, reason, err := remote_service.MaybePromoteRemoteUser(ctx, gitlabSource, remoteUserID, "") + assert.NoError(t, err) + assert.False(t, promoted) + assert.Equal(t, remote_service.ReasonSourceWrongType, reason) + } + + { + unrelatedName := "unrelated" + unrelatedSource := addAuthSource(t, authSourcePayloadGitHubCustom(unrelatedName)) + assert.NotNil(t, unrelatedSource) + + remoteUserID := "488484" + remoteEmail := "4848484@example.com" + remoteUser := &user_model.User{ + Name: "unrelateduser", + Type: user_model.UserTypeRemoteUser, + LoginType: auth_model.Remote, + LoginSource: remoteSource.ID, + LoginName: remoteUserID, + } + defer createUser(context.Background(), t, remoteUser)() + promoted, reason, err := remote_service.MaybePromoteRemoteUser(ctx, unrelatedSource, remoteUserID, remoteEmail) + assert.NoError(t, err) + assert.False(t, promoted) + assert.Equal(t, remote_service.ReasonNoMatch, reason) + } + + { + remoteUserID := "5678" + remoteEmail := "gitlabuser@example.com" + remoteUser := &user_model.User{ + Name: "remoteuser", + Type: user_model.UserTypeRemoteUser, + LoginType: auth_model.Remote, + LoginSource: remoteSource.ID, + LoginName: remoteUserID, + } + defer createUser(context.Background(), t, remoteUser)() + promoted, reason, err := remote_service.MaybePromoteRemoteUser(ctx, gitlabSource, remoteUserID, remoteEmail) + assert.NoError(t, err) + assert.True(t, promoted) + assert.Equal(t, remote_service.ReasonPromoted, reason) + } +} From f136cca5df95be7913ab961eedb5b2b97e003026 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Thu, 25 Apr 2024 11:15:23 +0200 Subject: [PATCH 027/401] feat(renovate): automerge swagger-ui-dist patch updates Looking at https://github.com/swagger-api/swagger-ui/graphs/contributors it looks like https://github.com/char0n is actively maintaining the package and the changes of the last release suggest it can be trusted with patch upgrades. --- renovate.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/renovate.json b/renovate.json index 4fefa8d1c2..74432c9dca 100644 --- a/renovate.json +++ b/renovate.json @@ -68,6 +68,21 @@ "matchUpdateTypes": ["minor", "patch", "digest"], "automerge": true }, + { + "description": "Split minor and patch updates", + "matchDepNames": [ + "swagger-ui-dist" + ], + "separateMinorPatch": true + }, + { + "description": "Automerge patch updates", + "matchDepNames": [ + "swagger-ui-dist" + ], + "matchUpdateTypes": ["patch"], + "automerge": true + }, { "description": "Update renovate with higher prio to come through rate limit", "matchDatasources": ["docker"], From 44a1f90308051773bf95541eef161db0a8be89af Mon Sep 17 00:00:00 2001 From: Percy Ma Date: Thu, 25 Apr 2024 21:49:18 +0800 Subject: [PATCH 028/401] chore(eslint): avoid lint the build --- .eslintrc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 5fd0a245f2..f28d2ac247 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -4,6 +4,7 @@ reportUnusedDisableDirectives: true ignorePatterns: - /web_src/js/vendor - /web_src/fomantic + - /public/assets/js parserOptions: sourceType: module From 078229a5e458c850a9fff711b4ebb11c5ce61756 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Thu, 25 Apr 2024 16:23:12 +0200 Subject: [PATCH 029/401] fix(ui): /settings/lfs/find 500 error When in the repository settings, visiting - `LFS` to `/{owner}/{repo}/settings/lfs` - `Find pointer files` to `/{owner}/{repo}/settings/lfs/pointers` - `Find commits` to `/{owner}/{repo}/settings/lfs/find?oid=...` failed with an error 500 because of an incorrect evaluation of the template. Regression introduced by https://codeberg.org/forgejo/forgejo/commit/cbf923e87bca0f50c2c01a60ccf544b63c365e98 A test is added to visit the page and guard against future regressions. Refs: https://codeberg.org/forgejo/forgejo/issues/3438 --- RELEASE-NOTES.md | 4 ++-- templates/repo/settings/lfs_file_find.tmpl | 4 ++-- tests/integration/lfs_view_test.go | 22 ++++++++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index f5df5b6aa4..981a07b07f 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -26,8 +26,8 @@ In addition to the following notable bug fixes, you can browse the [full list of * **Bug fixes:** * The regression in the [`fogejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command [is fixed](https://codeberg.org/forgejo/forgejo/issues/3399) and it is backward compatible. - -- Fixed a bug where the `/api/v1/repos/{owner}/{repo}/wiki` API endpoints were using a hardcoded "master" branch for the wiki, rather than the branch they really use. ([#3430](https://codeberg.org/forgejo/forgejo/pulls/3430)) + * Fixed a bug where the `/api/v1/repos/{owner}/{repo}/wiki` API endpoints were using a hardcoded "master" branch for the wiki, rather than the branch they really use. ([#3430](https://codeberg.org/forgejo/forgejo/pulls/3430)) + * Fixed an error 500 when visiting [the LFS settings]() at `/{owner}/{repo}/settings/lfs/find?oid=...`. ## 7.0.0 diff --git a/templates/repo/settings/lfs_file_find.tmpl b/templates/repo/settings/lfs_file_find.tmpl index 809a028b2c..54dbdb482b 100644 --- a/templates/repo/settings/lfs_file_find.tmpl +++ b/templates/repo/settings/lfs_file_find.tmpl @@ -23,9 +23,9 @@ {{svg "octicon-git-branch"}}{{.BranchName}} - {{if .ParentHashes}} + {{if .ParentIDs}} {{ctx.Locale.Tr "repo.diff.parent"}} - {{range .ParentHashes}} + {{range .ParentIDs}} {{ShortSha .String}} {{end}} {{end}} diff --git a/tests/integration/lfs_view_test.go b/tests/integration/lfs_view_test.go index 1775fa629f..b50c075ccf 100644 --- a/tests/integration/lfs_view_test.go +++ b/tests/integration/lfs_view_test.go @@ -80,4 +80,26 @@ func TestLFSRender(t *testing.T) { content := doc.Find("div.file-view").Text() assert.Contains(t, content, "Testing READMEs in LFS") }) + + t.Run("/settings/lfs/pointers", func(t *testing.T) { + defer tests.PrintCurrentTest(t)() + + // visit /user2/lfs/settings/lfs/pointer + req := NewRequest(t, "GET", "/user2/lfs/settings/lfs/pointers") + resp := session.MakeRequest(t, req, http.StatusOK) + + // follow the first link to /user2/lfs/settings/lfs/find?oid=.... + filesTable := NewHTMLParser(t, resp.Body).doc.Find("#lfs-files-table") + assert.Contains(t, filesTable.Text(), "Find commits") + lfsFind := filesTable.Find(`.primary.button[href^="/user2"]`) + assert.Greater(t, lfsFind.Length(), 0) + lfsFindPath, exists := lfsFind.First().Attr("href") + assert.True(t, exists) + + assert.Contains(t, lfsFindPath, "oid=") + req = NewRequest(t, "GET", lfsFindPath) + resp = session.MakeRequest(t, req, http.StatusOK) + doc := NewHTMLParser(t, resp.Body).doc + assert.Contains(t, doc.Text(), "README.md") + }) } From a278e925a125a1aca17a029638ffaba2839dde03 Mon Sep 17 00:00:00 2001 From: Beowulf Date: Wed, 24 Apr 2024 23:54:14 +0200 Subject: [PATCH 030/401] Fix Repository icon, name and label not centered vertically Readded correct tailwind class for vertical centering Regression introduced by 65e190ae8b Fixes #3428. --- templates/repo/header.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index f8821e7a35..bbc3b9c008 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -2,7 +2,7 @@ {{with .Repository}}
-
+
{{template "repo/icon" .}}
From ad9872d884de568a8f4da6f3f57177d21f7e65c8 Mon Sep 17 00:00:00 2001 From: Nicolas CARPi Date: Thu, 25 Apr 2024 19:10:43 +0000 Subject: [PATCH 031/401] docs: contributing: avoid information duplication (#3454) The file CONTRIBUTING.md contains a list of links that points to different parts of the developer documentation. Unfortunately, this list is now incomplete and contains a dead link for the Developer Workflow. Given that a more complete similar list is present at: https://forgejo.org/docs/latest/developer/, this patch removes the duplication of information, which leads to dead links and maintenance burden, and replaces the list with simply a link to the page that has all the current links. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3454 Reviewed-by: Earl Warren Co-authored-by: Nicolas CARPi Co-committed-by: Nicolas CARPi --- CONTRIBUTING.md | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2344d371cc..77c6463fbf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,21 +4,4 @@ The Forgejo project is run by a community of people who are expected to follow t Sensitive security-related issues should be reported to [security@forgejo.org](mailto:security@forgejo.org) using [encryption](https://keyoxide.org/security@forgejo.org). -## For everyone involved - -- [Documentation](https://forgejo.org/docs/next/) -- [Code of Conduct](https://forgejo.org/docs/latest/developer/coc/) -- [Bugs, features, security and others discussions](https://forgejo.org/docs/latest/developer/discussions/) -- [Governance](https://forgejo.org/docs/latest/developer/governance/) -- [Sustainability and funding](https://codeberg.org/forgejo/sustainability/src/branch/main/README.md) - -## For contributors - -- [Developer Certificate of Origin (DCO)](https://forgejo.org/docs/latest/developer/dco/) -- [Development workflow](https://forgejo.org/docs/latest/developer/workflow/) -- [Compiling from source](https://forgejo.org/docs/latest/developer/from-source/) - -## For maintainers - -- [Release management](https://forgejo.org/docs/latest/developer/release/) -- [Secrets](https://forgejo.org/docs/latest/developer/secrets/) +You can find links to the different aspects of Developer documentation on this page: [Forgejo developer guide](https://forgejo.org/docs/next/developer/). From 4036448c0251860fbe0d42f58c5757822b4aba1e Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Thu, 25 Apr 2024 23:00:11 +0200 Subject: [PATCH 032/401] fix(ui): /settings/lfs/find 500 error (take 2) Make the test actually fails on error and not just report failure on the output and succeed. --- tests/integration/lfs_view_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/lfs_view_test.go b/tests/integration/lfs_view_test.go index b50c075ccf..9dfcb3e698 100644 --- a/tests/integration/lfs_view_test.go +++ b/tests/integration/lfs_view_test.go @@ -100,6 +100,6 @@ func TestLFSRender(t *testing.T) { req = NewRequest(t, "GET", lfsFindPath) resp = session.MakeRequest(t, req, http.StatusOK) doc := NewHTMLParser(t, resp.Body).doc - assert.Contains(t, doc.Text(), "README.md") + assert.Equal(t, 1, doc.Find(`.sha.label[href="/user2/lfs/commit/73cf03db6ece34e12bf91e8853dc58f678f2f82d"]`).Length(), "could not find link to commit") }) } From ca9c039ba6117460cdf39d30ecb521d7569c8770 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 26 Apr 2024 02:05:51 +0000 Subject: [PATCH 033/401] Update module github.com/minio/minio-go/v7 to v7.0.70 --- go.mod | 3 +-- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 2f4c64b2da..4f9028fe68 100644 --- a/go.mod +++ b/go.mod @@ -73,7 +73,7 @@ require ( github.com/meilisearch/meilisearch-go v0.26.1 github.com/mholt/archiver/v3 v3.5.1 github.com/microcosm-cc/bluemonday v1.0.26 - github.com/minio/minio-go/v7 v7.0.69 + github.com/minio/minio-go/v7 v7.0.70 github.com/msteinert/pam v1.2.0 github.com/nektos/act v0.2.52 github.com/niklasfasching/go-org v1.7.0 @@ -222,7 +222,6 @@ require ( github.com/mholt/acmez v1.2.0 // indirect github.com/miekg/dns v1.1.58 // indirect github.com/minio/md5-simd v1.1.2 // indirect - github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect diff --git a/go.sum b/go.sum index ce55e89399..9897914ab2 100644 --- a/go.sum +++ b/go.sum @@ -618,10 +618,8 @@ github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.69 h1:l8AnsQFyY1xiwa/DaQskY4NXSLA2yrGsW5iD9nRPVS0= -github.com/minio/minio-go/v7 v7.0.69/go.mod h1:XAvOPJQ5Xlzk5o3o/ArO2NMbhSGkimC+bpW/ngRKDmQ= -github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= -github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= +github.com/minio/minio-go/v7 v7.0.70 h1:1u9NtMgfK1U42kUxcsl5v0yj6TEOPR497OAQxpJnn2g= +github.com/minio/minio-go/v7 v7.0.70/go.mod h1:4yBA8v80xGA30cfM3fz0DKYMXunWl/AV/6tWEs9ryzo= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= From a3be70f0a59aa89b6c8c2a6f5d2e3fab441f69c2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 26 Apr 2024 04:02:40 +0000 Subject: [PATCH 034/401] Update ghcr.io/visualon/renovate Docker tag to v37.323.3 --- .forgejo/workflows/renovate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/renovate.yml b/.forgejo/workflows/renovate.yml index 8306e5ddea..6212b8ef0b 100644 --- a/.forgejo/workflows/renovate.yml +++ b/.forgejo/workflows/renovate.yml @@ -22,7 +22,7 @@ jobs: runs-on: docker container: - image: ghcr.io/visualon/renovate:37.316.2 + image: ghcr.io/visualon/renovate:37.323.3 steps: - name: Load renovate repo cache From b51c608d3f10fc6bbdc5ccace03bd5c79ce079c3 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 26 Apr 2024 08:06:46 +0200 Subject: [PATCH 035/401] docs(release-notes): 7.0.0 LFS garbage collection and workaround Refs: https://codeberg.org/forgejo/forgejo/issues/3438 (cherry picked from commit a37836f228617b8e5b437114e9100f2fc7d9f00e) --- RELEASE-NOTES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 981a07b07f..10bad6e916 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -38,7 +38,8 @@ $ git clone https://codeberg.org/forgejo/forgejo/ $ git -C forgejo log --oneline --no-merges origin/v1.21/forgejo..origin/v7.0/forgejo ``` -* **Regression and workaround:** +* **Regressions and workarounds:** + * Running the [`forgejo doctor check --fix`](https://forgejo.org/docs/v7.0/admin/command-line/#doctor-check) CLI command or setting [`[cron.gc_lfs].ENABLED=true`](https://forgejo.org/docs/v7.0/admin/config-cheat-sheet/#cron---garbage-collect-lfs-pointers-in-repositories-crongc_lfs) (the default is `false`) will corrupt the LFS storage. The workaround is to not run the doctor CLI command and disable the `cron.gc_lfs`. This regression will be [fixed in 7.0.1](https://codeberg.org/forgejo/forgejo/issues/3438). * The [`fogejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command [requires a password](https://codeberg.org/forgejo/forgejo/commit/b122c6ef8b9254120432aed373cbe075331132ac) change by default when creating the first user and the `--admin` flag is not specified. The `--must-change-password=false` argument must be given to not require a password change. This regression will be [fixed in 7.0.1](https://codeberg.org/forgejo/forgejo/issues/3399). * **Breaking changes requiring manual intervention:** * [MySQL 8.0 or PostgreSQL 12](https://codeberg.org/forgejo/forgejo/commit/e94f9fcafdcf284561e7fb33f60156a69c4ad6a5) are the minimum supported versions. The database must be migrated before upgrading. The requirements regarding SQLite did not change. From 2385f3c9db9c116d213dfeb722522f4e2a47a52d Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Fri, 26 Apr 2024 09:25:30 +0200 Subject: [PATCH 036/401] services/convert: Convert a Repository's ObjectFormatName too When converting a `repo_model.Repository` to `api.Repository`, copy the `ObjectFormatName` field too. Fixes #3458. Signed-off-by: Gergely Nagy --- services/convert/repository.go | 1 + tests/integration/api_repo_test.go | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/services/convert/repository.go b/services/convert/repository.go index fcd0824e45..35becd96d0 100644 --- a/services/convert/repository.go +++ b/services/convert/repository.go @@ -237,6 +237,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR MirrorInterval: mirrorInterval, MirrorUpdated: mirrorUpdated, RepoTransfer: transfer, + ObjectFormatName: repo.ObjectFormatName, } } diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index 8ae2622976..2fb89cfa6e 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -701,3 +701,14 @@ func TestAPIRepoGetAssignees(t *testing.T) { DecodeJSON(t, resp, &assignees) assert.Len(t, assignees, 1) } + +func TestAPIViewRepoObjectFormat(t *testing.T) { + defer tests.PrepareTestEnv(t)() + + var repo api.Repository + + req := NewRequest(t, "GET", "/api/v1/repos/user2/repo1") + resp := MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &repo) + assert.EqualValues(t, "sha1", repo.ObjectFormatName) +} From a641ebf2213b8b69698f898ad76ccb4a52dd6cf6 Mon Sep 17 00:00:00 2001 From: Shiny Nematoda Date: Fri, 26 Apr 2024 08:08:47 +0000 Subject: [PATCH 037/401] [FIX] Set max fuzziness to 2 for bleve (#3444) closes #3443 regression from ab5f0b7558 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3444 Reviewed-by: Otto Co-authored-by: Shiny Nematoda Co-committed-by: Shiny Nematoda --- modules/indexer/code/bleve/bleve.go | 4 +++- modules/indexer/code/indexer_test.go | 6 ++++++ modules/indexer/issues/bleve/bleve.go | 4 +++- modules/indexer/issues/internal/tests/tests.go | 14 ++++++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/modules/indexer/code/bleve/bleve.go b/modules/indexer/code/bleve/bleve.go index c607d780ef..ff0e37ca29 100644 --- a/modules/indexer/code/bleve/bleve.go +++ b/modules/indexer/code/bleve/bleve.go @@ -41,6 +41,8 @@ const ( maxBatchSize = 16 // fuzzyDenominator determines the levenshtein distance per each character of a keyword fuzzyDenominator = 4 + // see https://github.com/blevesearch/bleve/issues/1563#issuecomment-786822311 + maxFuzziness = 2 ) func addUnicodeNormalizeTokenFilter(m *mapping.IndexMappingImpl) error { @@ -246,7 +248,7 @@ func (b *Indexer) Search(ctx context.Context, opts *internal.SearchOptions) (int phraseQuery.Analyzer = repoIndexerAnalyzer keywordQuery = phraseQuery if opts.IsKeywordFuzzy { - phraseQuery.Fuzziness = len(opts.Keyword) / fuzzyDenominator + phraseQuery.Fuzziness = min(maxFuzziness, len(opts.Keyword)/fuzzyDenominator) } if len(opts.RepoIDs) > 0 { diff --git a/modules/indexer/code/indexer_test.go b/modules/indexer/code/indexer_test.go index 8975c5ce40..2d013e08ed 100644 --- a/modules/indexer/code/indexer_test.go +++ b/modules/indexer/code/indexer_test.go @@ -49,6 +49,12 @@ func testIndexer(name string, t *testing.T, indexer internal.Indexer) { IDs: []int64{}, Langs: 0, }, + { + RepoIDs: nil, + Keyword: "Description for", + IDs: []int64{repoID}, + Langs: 1, + }, { RepoIDs: nil, Keyword: "repo1", diff --git a/modules/indexer/issues/bleve/bleve.go b/modules/indexer/issues/bleve/bleve.go index 1f54be721b..e3193dbc02 100644 --- a/modules/indexer/issues/bleve/bleve.go +++ b/modules/indexer/issues/bleve/bleve.go @@ -39,6 +39,8 @@ const ( maxBatchSize = 16 // fuzzyDenominator determines the levenshtein distance per each character of a keyword fuzzyDenominator = 4 + // see https://github.com/blevesearch/bleve/issues/1563#issuecomment-786822311 + maxFuzziness = 2 ) // IndexerData an update to the issue indexer @@ -162,7 +164,7 @@ func (b *Indexer) Search(ctx context.Context, options *internal.SearchOptions) ( if options.Keyword != "" { fuzziness := 0 if options.IsFuzzyKeyword { - fuzziness = len(options.Keyword) / fuzzyDenominator + fuzziness = min(maxFuzziness, len(options.Keyword)/fuzzyDenominator) } queries = append(queries, bleve.NewDisjunctionQuery([]query.Query{ diff --git a/modules/indexer/issues/internal/tests/tests.go b/modules/indexer/issues/internal/tests/tests.go index 7f32876d80..7144174087 100644 --- a/modules/indexer/issues/internal/tests/tests.go +++ b/modules/indexer/issues/internal/tests/tests.go @@ -130,6 +130,20 @@ var cases = []*testIndexerCase{ ExpectedIDs: []int64{1002, 1001, 1000}, ExpectedTotal: 3, }, + { + Name: "Keyword Fuzzy", + ExtraData: []*internal.IndexerData{ + {ID: 1000, Title: "hi hello world"}, + {ID: 1001, Content: "hi hello world"}, + {ID: 1002, Comments: []string{"hi", "hello world"}}, + }, + SearchOptions: &internal.SearchOptions{ + Keyword: "hello wrold", + IsFuzzyKeyword: true, + }, + ExpectedIDs: []int64{1002, 1001, 1000}, + ExpectedTotal: 3, + }, { Name: "RepoIDs", ExtraData: []*internal.IndexerData{ From aa2af10f6722c3e6d2d08e369613da375db5b404 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 26 Apr 2024 08:10:19 +0000 Subject: [PATCH 038/401] Update dependency swagger-ui-dist to v5.17.2 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index aae652c719..60f8f4cdf7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "postcss-nesting": "12.1.2", "pretty-ms": "9.0.0", "sortablejs": "1.15.2", - "swagger-ui-dist": "5.17.1", + "swagger-ui-dist": "5.17.2", "tailwindcss": "3.4.3", "temporal-polyfill": "0.2.4", "throttle-debounce": "5.0.0", @@ -11495,9 +11495,9 @@ } }, "node_modules/swagger-ui-dist": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.17.1.tgz", - "integrity": "sha512-6MNu1MYNALLFvcPpo2MJVJFIxz2rFkH+XoX+J72LBLdj4JLjVaP4lHmNHtJ/tXZUXHdsb2Iw9JhPlqspjkomQg==" + "version": "5.17.2", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.17.2.tgz", + "integrity": "sha512-V/NqUw6QoTrjSpctp2oLQvxrl3vW29UsUtZyq7B1CF0v870KOFbYGDQw8rpKaKm0JxTwHpWnW1SN9YuKZdiCyw==" }, "node_modules/sync-fetch": { "version": "0.4.5", diff --git a/package.json b/package.json index 8d97388e2b..230e1617ed 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "postcss-nesting": "12.1.2", "pretty-ms": "9.0.0", "sortablejs": "1.15.2", - "swagger-ui-dist": "5.17.1", + "swagger-ui-dist": "5.17.2", "tailwindcss": "3.4.3", "temporal-polyfill": "0.2.4", "throttle-debounce": "5.0.0", From 90c56a9d66f38c69829c0b12523242505fef7d52 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 26 Apr 2024 08:10:29 +0000 Subject: [PATCH 039/401] Update dependency vitest to v1.5.2 --- package-lock.json | 66 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index aae652c719..04cccc7acc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -96,7 +96,7 @@ "svgo": "3.2.0", "updates": "16.0.1", "vite-string-plugin": "1.2.0", - "vitest": "1.5.1" + "vitest": "1.5.2" }, "engines": { "node": ">= 18.0.0" @@ -2545,13 +2545,13 @@ } }, "node_modules/@vitest/expect": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.5.1.tgz", - "integrity": "sha512-w3Bn+VUMqku+oWmxvPhTE86uMTbfmBl35aGaIPlwVW7Q89ZREC/icfo2HBsEZ3AAW6YR9lObfZKPEzstw9tJOQ==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.5.2.tgz", + "integrity": "sha512-rf7MTD1WCoDlN3FfYJ9Llfp0PbdtOMZ3FIF0AVkDnKbp3oiMW1c8AmvRZBcqbAhDUAvF52e9zx4WQM1r3oraVA==", "dev": true, "dependencies": { - "@vitest/spy": "1.5.1", - "@vitest/utils": "1.5.1", + "@vitest/spy": "1.5.2", + "@vitest/utils": "1.5.2", "chai": "^4.3.10" }, "funding": { @@ -2559,12 +2559,12 @@ } }, "node_modules/@vitest/runner": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.5.1.tgz", - "integrity": "sha512-mt372zsz0vFR7L1xF/ert4t+teD66oSuXoTyaZbl0eJgilvyzCKP1tJ21gVa8cDklkBOM3DLnkE1ljj/BskyEw==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.5.2.tgz", + "integrity": "sha512-7IJ7sJhMZrqx7HIEpv3WrMYcq8ZNz9L6alo81Y6f8hV5mIE6yVZsFoivLZmr0D777klm1ReqonE9LyChdcmw6g==", "dev": true, "dependencies": { - "@vitest/utils": "1.5.1", + "@vitest/utils": "1.5.2", "p-limit": "^5.0.0", "pathe": "^1.1.1" }, @@ -2600,9 +2600,9 @@ } }, "node_modules/@vitest/snapshot": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.5.1.tgz", - "integrity": "sha512-h/1SGaZYXmjn6hULRBOlqam2z4oTlEe6WwARRzLErAPBqljAs6eX7tfdyN0K+MpipIwSZ5sZsubDWkCPAiVXZQ==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.5.2.tgz", + "integrity": "sha512-CTEp/lTYos8fuCc9+Z55Ga5NVPKUgExritjF5VY7heRFUfheoAqBneUlvXSUJHUZPjnPmyZA96yLRJDP1QATFQ==", "dev": true, "dependencies": { "magic-string": "^0.30.5", @@ -2626,9 +2626,9 @@ } }, "node_modules/@vitest/spy": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.5.1.tgz", - "integrity": "sha512-vsqczk6uPJjmPLy6AEtqfbFqgLYcGBe9BTY+XL8L6y8vrGOhyE23CJN9P/hPimKXnScbqiZ/r/UtUSOQ2jIDGg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.5.2.tgz", + "integrity": "sha512-xCcPvI8JpCtgikT9nLpHPL1/81AYqZy1GCy4+MCHBE7xi8jgsYkULpW5hrx5PGLgOQjUpb6fd15lqcriJ40tfQ==", "dev": true, "dependencies": { "tinyspy": "^2.2.0" @@ -2638,9 +2638,9 @@ } }, "node_modules/@vitest/utils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.5.1.tgz", - "integrity": "sha512-92pE17bBXUxA0Y7goPcvnATMCuq4NQLOmqsG0e2BtzRi7KLwZB5jpiELi/8ybY8IQNWemKjSD5rMoO7xTdv8ug==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.5.2.tgz", + "integrity": "sha512-sWOmyofuXLJ85VvXNsroZur7mOJGiQeM0JN3/0D1uU8U9bGFM69X1iqHaRXl6R8BwaLY6yPCogP257zxTzkUdA==", "dev": true, "dependencies": { "diff-sequences": "^29.6.3", @@ -12257,9 +12257,9 @@ } }, "node_modules/vite-node": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.5.1.tgz", - "integrity": "sha512-HNpfV7BrAsjkYVNWIcPleJwvJmydJqqJRrRbpoQ/U7QDwJKyEzNa4g5aYg8MjXJyKsk29IUCcMLFRcsEvqUIsA==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.5.2.tgz", + "integrity": "sha512-Y8p91kz9zU+bWtF7HGt6DVw2JbhyuB2RlZix3FPYAYmUyZ3n7iTp8eSyLyY6sxtPegvxQtmlTMhfPhUfCUF93A==", "dev": true, "dependencies": { "cac": "^6.7.14", @@ -12339,16 +12339,16 @@ } }, "node_modules/vitest": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.5.1.tgz", - "integrity": "sha512-3GvBMpoRnUNbZRX1L3mJCv3Ou3NAobb4dM48y8k9ZGwDofePpclTOyO+lqJFKSQpubH1V8tEcAEw/Y3mJKGJQQ==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.5.2.tgz", + "integrity": "sha512-l9gwIkq16ug3xY7BxHwcBQovLZG75zZL0PlsiYQbf76Rz6QGs54416UWMtC0jXeihvHvcHrf2ROEjkQRVpoZYw==", "dev": true, "dependencies": { - "@vitest/expect": "1.5.1", - "@vitest/runner": "1.5.1", - "@vitest/snapshot": "1.5.1", - "@vitest/spy": "1.5.1", - "@vitest/utils": "1.5.1", + "@vitest/expect": "1.5.2", + "@vitest/runner": "1.5.2", + "@vitest/snapshot": "1.5.2", + "@vitest/spy": "1.5.2", + "@vitest/utils": "1.5.2", "acorn-walk": "^8.3.2", "chai": "^4.3.10", "debug": "^4.3.4", @@ -12362,7 +12362,7 @@ "tinybench": "^2.5.1", "tinypool": "^0.8.3", "vite": "^5.0.0", - "vite-node": "1.5.1", + "vite-node": "1.5.2", "why-is-node-running": "^2.2.2" }, "bin": { @@ -12377,8 +12377,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.5.1", - "@vitest/ui": "1.5.1", + "@vitest/browser": "1.5.2", + "@vitest/ui": "1.5.2", "happy-dom": "*", "jsdom": "*" }, diff --git a/package.json b/package.json index 8d97388e2b..96f9335b1f 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "svgo": "3.2.0", "updates": "16.0.1", "vite-string-plugin": "1.2.0", - "vitest": "1.5.1" + "vitest": "1.5.2" }, "browserslist": ["defaults"] } From 3dfa5ba43a907959f279273032a4448cd7e40924 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Thu, 25 Apr 2024 23:03:53 +0200 Subject: [PATCH 040/401] test: LFS gc should not delete all metadata objects and ComputeBlobHash should depend on the blob content (not only the length) --- models/fixtures/lfs_meta_object.yml | 2 +- modules/git/object_id_test.go | 4 ++++ services/repository/lfs_test.go | 13 +++++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/models/fixtures/lfs_meta_object.yml b/models/fixtures/lfs_meta_object.yml index 1c29e02d44..cef4824d64 100644 --- a/models/fixtures/lfs_meta_object.yml +++ b/models/fixtures/lfs_meta_object.yml @@ -9,7 +9,7 @@ - - id: 2 + id: 2 # this is an LFS orphan object oid: 2eccdb43825d2a49d99d542daa20075cff1d97d9d2349a8977efe9c03661737c size: 107 repository_id: 54 diff --git a/modules/git/object_id_test.go b/modules/git/object_id_test.go index 1ad40096a0..6f365d6b19 100644 --- a/modules/git/object_id_test.go +++ b/modules/git/object_id_test.go @@ -18,4 +18,8 @@ func TestIsValidSHAPattern(t *testing.T) { assert.False(t, h.IsValid("abc")) assert.False(t, h.IsValid("123g")) assert.False(t, h.IsValid("some random text")) + + assert.Equal(t, "79ee38a6416c1ede423ec7ee0a8639ceea4aad22", ComputeBlobHash(Sha1ObjectFormat, []byte("some random blob")).String()) + assert.Equal(t, "d5c6407415d85df49592672aa421aed39b9db5e3", ComputeBlobHash(Sha1ObjectFormat, []byte("same length blob")).String()) + assert.Equal(t, "df0b5174ed06ae65aea40d43316bcbc21d82c9e3158ce2661df2ad28d7931dd6", ComputeBlobHash(Sha256ObjectFormat, []byte("some random blob")).String()) } diff --git a/services/repository/lfs_test.go b/services/repository/lfs_test.go index ee0b8f6b89..52ee05a147 100644 --- a/services/repository/lfs_test.go +++ b/services/repository/lfs_test.go @@ -28,9 +28,13 @@ func TestGarbageCollectLFSMetaObjects(t *testing.T) { err := storage.Init() assert.NoError(t, err) - repo, err := repo_model.GetRepositoryByOwnerAndName(db.DefaultContext, "user2", "repo1") + repo, err := repo_model.GetRepositoryByOwnerAndName(db.DefaultContext, "user2", "lfs") assert.NoError(t, err) + validLFSObjects, err := db.GetEngine(db.DefaultContext).Count(git_model.LFSMetaObject{RepositoryID: repo.ID}) + assert.NoError(t, err) + assert.Greater(t, validLFSObjects, int64(1)) + // add lfs object lfsContent := []byte("gitea1") lfsOid := storeObjectInRepo(t, repo.ID, &lfsContent) @@ -39,13 +43,18 @@ func TestGarbageCollectLFSMetaObjects(t *testing.T) { err = repo_service.GarbageCollectLFSMetaObjects(context.Background(), repo_service.GarbageCollectLFSMetaObjectsOptions{ AutoFix: true, OlderThan: time.Now().Add(7 * 24 * time.Hour).Add(5 * 24 * time.Hour), - UpdatedLessRecentlyThan: time.Now().Add(7 * 24 * time.Hour).Add(3 * 24 * time.Hour), + UpdatedLessRecentlyThan: time.Time{}, // ensure that the models/fixtures/lfs_meta_object.yml objects are considered as well + LogDetail: t.Logf, }) assert.NoError(t, err) // lfs meta has been deleted _, err = git_model.GetLFSMetaObjectByOid(db.DefaultContext, repo.ID, lfsOid) assert.ErrorIs(t, err, git_model.ErrLFSObjectNotExist) + + remainingLFSObjects, err := db.GetEngine(db.DefaultContext).Count(git_model.LFSMetaObject{RepositoryID: repo.ID}) + assert.NoError(t, err) + assert.Equal(t, validLFSObjects-1, remainingLFSObjects) } func storeObjectInRepo(t *testing.T, repositoryID int64, content *[]byte) string { From 5247fd50dbd94de30c96feca844ff65286935404 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Fri, 26 Apr 2024 10:02:47 +0200 Subject: [PATCH 041/401] fix: git.ComputeHash did not write the content --- modules/git/object_format.go | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/modules/git/object_format.go b/modules/git/object_format.go index a056b20e8a..c2fcf4c063 100644 --- a/modules/git/object_format.go +++ b/modules/git/object_format.go @@ -6,6 +6,7 @@ package git import ( "crypto/sha1" "crypto/sha256" + "hash" "regexp" "strconv" ) @@ -33,6 +34,15 @@ type ObjectFormat interface { ComputeHash(t ObjectType, content []byte) ObjectID } +func computeHash(dst []byte, hasher hash.Hash, t ObjectType, content []byte) []byte { + _, _ = hasher.Write(t.Bytes()) + _, _ = hasher.Write([]byte(" ")) + _, _ = hasher.Write([]byte(strconv.Itoa(len(content)))) + _, _ = hasher.Write([]byte{0}) + _, _ = hasher.Write(content) + return hasher.Sum(dst) +} + /* SHA1 Type */ type Sha1ObjectFormatImpl struct{} @@ -65,16 +75,9 @@ func (Sha1ObjectFormatImpl) MustID(b []byte) ObjectID { // ComputeHash compute the hash for a given ObjectType and content func (h Sha1ObjectFormatImpl) ComputeHash(t ObjectType, content []byte) ObjectID { - hasher := sha1.New() - _, _ = hasher.Write(t.Bytes()) - _, _ = hasher.Write([]byte(" ")) - _, _ = hasher.Write([]byte(strconv.FormatInt(int64(len(content)), 10))) - _, _ = hasher.Write([]byte{0}) - - // HashSum generates a SHA1 for the provided hash - var sha1 Sha1Hash - copy(sha1[:], hasher.Sum(nil)) - return &sha1 + var obj Sha1Hash + computeHash(obj[:0], sha1.New(), t, content) + return &obj } /* SHA256 Type */ @@ -111,16 +114,9 @@ func (Sha256ObjectFormatImpl) MustID(b []byte) ObjectID { // ComputeHash compute the hash for a given ObjectType and content func (h Sha256ObjectFormatImpl) ComputeHash(t ObjectType, content []byte) ObjectID { - hasher := sha256.New() - _, _ = hasher.Write(t.Bytes()) - _, _ = hasher.Write([]byte(" ")) - _, _ = hasher.Write([]byte(strconv.FormatInt(int64(len(content)), 10))) - _, _ = hasher.Write([]byte{0}) - - // HashSum generates a SHA256 for the provided hash - var sha256 Sha1Hash - copy(sha256[:], hasher.Sum(nil)) - return &sha256 + var obj Sha256Hash + computeHash(obj[:0], sha256.New(), t, content) + return &obj } var ( From 127eff49ee76aba5f78d1f356fb85d2d78825fb2 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 26 Apr 2024 08:26:33 +0000 Subject: [PATCH 042/401] docs(release-notes): split items in files to avoid conflicts (#3452) I thought there would be conflicts but that they would not be so difficult to manage. Worst idea I had this week. Change to @oliverpool idea instead. > Instead of documenting the release notes in the issue, why not in the codebase? > > For instance in [go](https://cs.opensource.google/go/go/+/master:doc/README.md) there is a `doc/next` folder where you add `.md` files which document each pr. > > Before the release, a script takes all those files to generate the changelog. > > Having them as a file tracked by git, makes them easy to review and to programmatically handle. Refs: https://codeberg.org/forgejo/discussions/issues/155#issuecomment-1787013 Co-authored-by: Shiny Nematoda Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3452 Reviewed-by: Gergely Nagy Co-authored-by: Earl Warren Co-committed-by: Earl Warren --- RELEASE-NOTES.md | 25 ++----------------------- release-notes/8.0.0/fix/3399.md | 1 + release-notes/8.0.0/fix/3430.md | 1 + release-notes/8.0.0/fix/3442.md | 1 + release-notes/8.0.0/fix/3444.md | 1 + release-notes/8.0.0/fix/3451.md | 1 + 6 files changed, 7 insertions(+), 23 deletions(-) create mode 100644 release-notes/8.0.0/fix/3399.md create mode 100644 release-notes/8.0.0/fix/3430.md create mode 100644 release-notes/8.0.0/fix/3442.md create mode 100644 release-notes/8.0.0/fix/3444.md create mode 100644 release-notes/8.0.0/fix/3451.md diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 10bad6e916..85c8f8bcc1 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -4,30 +4,9 @@ A minor or major Forgejo release is published every [three months](https://forge A [patch or minor release](https://semver.org/spec/v2.0.0.html) (e.g. upgrading from v7.0.0 to v7.0.1 or v7.1.0) does not require manual intervention. But [major releases](https://semver.org/spec/v2.0.0.html#spec-item-8) where the first version number changes (e.g. upgrading from v1.21 to v7.0) contain breaking changes and the release notes explain how to deal with them. -## 8.0.0 +## Upcoming releases (not available yet) -This is a major release. It contains breaking changes that may require manual intervention. See the documentation for more information on the [upgrade procedure](https://forgejo.org/docs/v7.0/admin/upgrade/). - -* **Breaking changes:** - -In addition to the following notable bug fixes, you can browse the [full list of commits](https://codeberg.org/forgejo/forgejo/compare/v8.0.0...v7.0.0) included in this release. - -If you have any feedback or suggestions for Forgejo do not hold back, it is also your project. -Open an issue in [the issue tracker](https://codeberg.org/forgejo/forgejo/issues) -for feature requests or bug reports, reach out [on the Fediverse](https://floss.social/@forgejo), -or drop into [the Matrix space](https://matrix.to/#/#forgejo:matrix.org) -([main chat room](https://matrix.to/#/#forgejo-chat:matrix.org)) and say hi! - -## 7.0.1 - -This is a bug fix release. See the documentation for more information on the [upgrade procedure](https://forgejo.org/docs/v7.0/admin/upgrade/). - -In addition to the following notable bug fixes, you can browse the [full list of commits](https://codeberg.org/forgejo/forgejo/compare/v7.0.0...v7.0.1) included in this release. - -* **Bug fixes:** - * The regression in the [`fogejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command [is fixed](https://codeberg.org/forgejo/forgejo/issues/3399) and it is backward compatible. - * Fixed a bug where the `/api/v1/repos/{owner}/{repo}/wiki` API endpoints were using a hardcoded "master" branch for the wiki, rather than the branch they really use. ([#3430](https://codeberg.org/forgejo/forgejo/pulls/3430)) - * Fixed an error 500 when visiting [the LFS settings]() at `/{owner}/{repo}/settings/lfs/find?oid=...`. +- [8.0.0](/release-notes/8.0.0/) ## 7.0.0 diff --git a/release-notes/8.0.0/fix/3399.md b/release-notes/8.0.0/fix/3399.md new file mode 100644 index 0000000000..d25d66d5f0 --- /dev/null +++ b/release-notes/8.0.0/fix/3399.md @@ -0,0 +1 @@ +The regression in the [`fogejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command [is fixed](https://codeberg.org/forgejo/forgejo/issues/3399) and it is backward compatible. diff --git a/release-notes/8.0.0/fix/3430.md b/release-notes/8.0.0/fix/3430.md new file mode 100644 index 0000000000..17d91653e9 --- /dev/null +++ b/release-notes/8.0.0/fix/3430.md @@ -0,0 +1 @@ +Fixed a bug where the `/api/v1/repos/{owner}/{repo}/wiki` API endpoints were using a hardcoded "master" branch for the wiki, rather than the branch they really use. diff --git a/release-notes/8.0.0/fix/3442.md b/release-notes/8.0.0/fix/3442.md new file mode 100644 index 0000000000..7c4feafb68 --- /dev/null +++ b/release-notes/8.0.0/fix/3442.md @@ -0,0 +1 @@ +Save updated empty comments instead of skipping the update silently, [which prevented the removal of attachments of such comments](https://codeberg.org/forgejo/forgejo/issues/3424). diff --git a/release-notes/8.0.0/fix/3444.md b/release-notes/8.0.0/fix/3444.md new file mode 100644 index 0000000000..4988fdad15 --- /dev/null +++ b/release-notes/8.0.0/fix/3444.md @@ -0,0 +1 @@ +Fixed bleve indexer failing when [fuzziness exceeds the maximum 2](https://codeberg.org/forgejo/forgejo/pulls/3444) diff --git a/release-notes/8.0.0/fix/3451.md b/release-notes/8.0.0/fix/3451.md new file mode 100644 index 0000000000..e0c307e896 --- /dev/null +++ b/release-notes/8.0.0/fix/3451.md @@ -0,0 +1 @@ +Fixed an error 500 when visiting [the LFS settings](https://codeberg.org/forgejo/forgejo/pulls/3451) at `/{owner}/{repo}/settings/lfs/find?oid=...`. From 2bc226eb5704dd2d7d2d5baf37e4910eadb951e5 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Fri, 26 Apr 2024 09:53:00 +0200 Subject: [PATCH 043/401] Drop Gitea-specific columns from two tables Gitea and Forgejo chose to implement wiki branch naming differently, but Forgejo picked the Gitea migration anyway, resulting in an unused column in the database, which wasn't part of the `Repository` struct either - something warned about during startup, too. Similarly, Forgejo chose not to implement User badges at all - but kept the existing code for it -, and the `badge` table ended up with an unused `slug` column due to a Gitea migration, and resulted in another warning at startup. To keep the database consistent with the code, and to get rid of these warnings, lets introduce a new migration, which simply drops these Gitea-specific columns from the database. Fixes #3463. Signed-off-by: Gergely Nagy --- models/forgejo_migrations/migrate.go | 2 ++ models/forgejo_migrations/v14.go | 43 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 models/forgejo_migrations/v14.go diff --git a/models/forgejo_migrations/migrate.go b/models/forgejo_migrations/migrate.go index b9e0e384cf..3b6da74149 100644 --- a/models/forgejo_migrations/migrate.go +++ b/models/forgejo_migrations/migrate.go @@ -64,6 +64,8 @@ var migrations = []*Migration{ NewMigration("Add repo_archive_download_count table", forgejo_v1_22.AddRepoArchiveDownloadCount), // v13 -> v14 NewMigration("Add `hide_archive_links` column to `release` table", AddHideArchiveLinksToRelease), + // v14 -> v15 + NewMigration("Remove Gitea-specific columns from the repository and badge tables", RemoveGiteaSpecificColumnsFromRepositoryAndBadge), } // GetCurrentDBVersion returns the current Forgejo database version. diff --git a/models/forgejo_migrations/v14.go b/models/forgejo_migrations/v14.go new file mode 100644 index 0000000000..f6dd35ecf0 --- /dev/null +++ b/models/forgejo_migrations/v14.go @@ -0,0 +1,43 @@ +// Copyright 2024 The Forgejo Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package forgejo_migrations //nolint:revive + +import ( + "code.gitea.io/gitea/models/migrations/base" + + "xorm.io/xorm" +) + +func RemoveGiteaSpecificColumnsFromRepositoryAndBadge(x *xorm.Engine) error { + // Make sure the columns exist before dropping them + type Repository struct { + ID int64 + DefaultWikiBranch string + } + if err := x.Sync(&Repository{}); err != nil { + return err + } + + type Badge struct { + ID int64 `xorm:"pk autoincr"` + Slug string + } + err := x.Sync(new(Badge)) + if err != nil { + return err + } + + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + if err := base.DropTableColumns(sess, "repository", "default_wiki_branch"); err != nil { + return err + } + if err := base.DropTableColumns(sess, "badge", "slug"); err != nil { + return err + } + return sess.Commit() +} From c31ae1a651d3be4da1f45ec2ccb6964aa6282268 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 26 Apr 2024 09:22:09 +0000 Subject: [PATCH 044/401] fix(lfs): gogit /settings/lfs/find 500 error (#3472) Refs: https://codeberg.org/forgejo/forgejo/pulls/3448 Refs: https://codeberg.org/forgejo/forgejo/issues/3438 Co-authored-by: wxiaoguang Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3472 Reviewed-by: oliverpool Co-authored-by: Earl Warren Co-committed-by: Earl Warren --- modules/git/pipeline/lfs_common.go | 32 ++++++++++++++++++ modules/git/pipeline/{lfs.go => lfs_gogit.go} | 25 ++------------ modules/git/pipeline/lfs_nogogit.go | 33 ++++--------------- templates/repo/settings/lfs_file_find.tmpl | 4 +-- 4 files changed, 44 insertions(+), 50 deletions(-) create mode 100644 modules/git/pipeline/lfs_common.go rename modules/git/pipeline/{lfs.go => lfs_gogit.go} (80%) diff --git a/modules/git/pipeline/lfs_common.go b/modules/git/pipeline/lfs_common.go new file mode 100644 index 0000000000..188e7d4d65 --- /dev/null +++ b/modules/git/pipeline/lfs_common.go @@ -0,0 +1,32 @@ +// Copyright 2024 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package pipeline + +import ( + "fmt" + "time" + + "code.gitea.io/gitea/modules/git" +) + +// LFSResult represents commits found using a provided pointer file hash +type LFSResult struct { + Name string + SHA string + Summary string + When time.Time + ParentHashes []git.ObjectID + BranchName string + FullCommitName string +} + +type lfsResultSlice []*LFSResult + +func (a lfsResultSlice) Len() int { return len(a) } +func (a lfsResultSlice) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a lfsResultSlice) Less(i, j int) bool { return a[j].When.After(a[i].When) } + +func lfsError(msg string, err error) error { + return fmt.Errorf("LFS error occurred, %s: err: %w", msg, err) +} diff --git a/modules/git/pipeline/lfs.go b/modules/git/pipeline/lfs_gogit.go similarity index 80% rename from modules/git/pipeline/lfs.go rename to modules/git/pipeline/lfs_gogit.go index 6dfca24f29..adcf8ed09c 100644 --- a/modules/git/pipeline/lfs.go +++ b/modules/git/pipeline/lfs_gogit.go @@ -7,12 +7,10 @@ package pipeline import ( "bufio" - "fmt" "io" "sort" "strings" "sync" - "time" "code.gitea.io/gitea/modules/git" @@ -21,23 +19,6 @@ import ( "github.com/go-git/go-git/v5/plumbing/object" ) -// LFSResult represents commits found using a provided pointer file hash -type LFSResult struct { - Name string - SHA string - Summary string - When time.Time - ParentHashes []git.ObjectID - BranchName string - FullCommitName string -} - -type lfsResultSlice []*LFSResult - -func (a lfsResultSlice) Len() int { return len(a) } -func (a lfsResultSlice) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a lfsResultSlice) Less(i, j int) bool { return a[j].When.After(a[i].When) } - // FindLFSFile finds commits that contain a provided pointer file hash func FindLFSFile(repo *git.Repository, objectID git.ObjectID) ([]*LFSResult, error) { resultsMap := map[string]*LFSResult{} @@ -51,7 +32,7 @@ func FindLFSFile(repo *git.Repository, objectID git.ObjectID) ([]*LFSResult, err All: true, }) if err != nil { - return nil, fmt.Errorf("Failed to get GoGit CommitsIter. Error: %w", err) + return nil, lfsError("failed to get GoGit CommitsIter", err) } err = commitsIter.ForEach(func(gitCommit *object.Commit) error { @@ -85,7 +66,7 @@ func FindLFSFile(repo *git.Repository, objectID git.ObjectID) ([]*LFSResult, err return nil }) if err != nil && err != io.EOF { - return nil, fmt.Errorf("Failure in CommitIter.ForEach: %w", err) + return nil, lfsError("failure in CommitIter.ForEach", err) } for _, result := range resultsMap { @@ -156,7 +137,7 @@ func FindLFSFile(repo *git.Repository, objectID git.ObjectID) ([]*LFSResult, err select { case err, has := <-errChan: if has { - return nil, fmt.Errorf("Unable to obtain name for LFS files. Error: %w", err) + return nil, lfsError("unable to obtain name for LFS files", err) } default: } diff --git a/modules/git/pipeline/lfs_nogogit.go b/modules/git/pipeline/lfs_nogogit.go index 4c65249089..a3ee883968 100644 --- a/modules/git/pipeline/lfs_nogogit.go +++ b/modules/git/pipeline/lfs_nogogit.go @@ -8,33 +8,14 @@ package pipeline import ( "bufio" "bytes" - "fmt" "io" "sort" "strings" "sync" - "time" "code.gitea.io/gitea/modules/git" ) -// LFSResult represents commits found using a provided pointer file hash -type LFSResult struct { - Name string - SHA string - Summary string - When time.Time - ParentIDs []git.ObjectID - BranchName string - FullCommitName string -} - -type lfsResultSlice []*LFSResult - -func (a lfsResultSlice) Len() int { return len(a) } -func (a lfsResultSlice) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a lfsResultSlice) Less(i, j int) bool { return a[j].When.After(a[i].When) } - // FindLFSFile finds commits that contain a provided pointer file hash func FindLFSFile(repo *git.Repository, objectID git.ObjectID) ([]*LFSResult, error) { resultsMap := map[string]*LFSResult{} @@ -137,11 +118,11 @@ func FindLFSFile(repo *git.Repository, objectID git.ObjectID) ([]*LFSResult, err n += int64(count) if bytes.Equal(binObjectID, objectID.RawValue()) { result := LFSResult{ - Name: curPath + string(fname), - SHA: curCommit.ID.String(), - Summary: strings.Split(strings.TrimSpace(curCommit.CommitMessage), "\n")[0], - When: curCommit.Author.When, - ParentIDs: curCommit.Parents, + Name: curPath + string(fname), + SHA: curCommit.ID.String(), + Summary: strings.Split(strings.TrimSpace(curCommit.CommitMessage), "\n")[0], + When: curCommit.Author.When, + ParentHashes: curCommit.Parents, } resultsMap[curCommit.ID.String()+":"+curPath+string(fname)] = &result } else if string(mode) == git.EntryModeTree.String() { @@ -183,7 +164,7 @@ func FindLFSFile(repo *git.Repository, objectID git.ObjectID) ([]*LFSResult, err for _, result := range resultsMap { hasParent := false - for _, parentID := range result.ParentIDs { + for _, parentID := range result.ParentHashes { if _, hasParent = resultsMap[parentID.String()+":"+result.Name]; hasParent { break } @@ -241,7 +222,7 @@ func FindLFSFile(repo *git.Repository, objectID git.ObjectID) ([]*LFSResult, err select { case err, has := <-errChan: if has { - return nil, fmt.Errorf("Unable to obtain name for LFS files. Error: %w", err) + return nil, lfsError("unable to obtain name for LFS files", err) } default: } diff --git a/templates/repo/settings/lfs_file_find.tmpl b/templates/repo/settings/lfs_file_find.tmpl index 54dbdb482b..809a028b2c 100644 --- a/templates/repo/settings/lfs_file_find.tmpl +++ b/templates/repo/settings/lfs_file_find.tmpl @@ -23,9 +23,9 @@ {{svg "octicon-git-branch"}}{{.BranchName}} - {{if .ParentIDs}} + {{if .ParentHashes}} {{ctx.Locale.Tr "repo.diff.parent"}} - {{range .ParentIDs}} + {{range .ParentHashes}} {{ShortSha .String}} {{end}} {{end}} From 9035b400a6b07b0206e3b90903236b6999a4bfae Mon Sep 17 00:00:00 2001 From: Beowulf Date: Thu, 25 Apr 2024 00:19:28 +0200 Subject: [PATCH 045/401] UI: use full screen height for displaying pdf files --- release-notes/8.0.0/feat/3434.md | 1 + web_src/css/repo.css | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 release-notes/8.0.0/feat/3434.md diff --git a/release-notes/8.0.0/feat/3434.md b/release-notes/8.0.0/feat/3434.md new file mode 100644 index 0000000000..a8b28eb1c3 --- /dev/null +++ b/release-notes/8.0.0/feat/3434.md @@ -0,0 +1 @@ +When PDFs are displayed in the repository, the [full height of the screen](https://codeberg.org/forgejo/forgejo/pulls/3434) is now used instead of a predefined fixed height diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 87dbeb5bba..d443ee0575 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -402,7 +402,7 @@ td .commit-summary { .pdf-content { width: 100%; - height: 600px; + height: 100vh; border: none !important; display: flex; align-items: center; From dad16cd5895a945c067ec6a2dacdac67afc8aa04 Mon Sep 17 00:00:00 2001 From: Gerard Salvatella Date: Mon, 22 Apr 2024 04:53:04 +0200 Subject: [PATCH 046/401] fix(Dockerfile.rootless): revert to default path for `app.ini` The current path of the `$GITEA_APP_INI` configuration file makes the forgejo application reset every time the container is restarted, unless a specific volume for this file is created. Consider the following: * This quirk is not documented * All configuration data resides in `/var/lib/gitea` * The custom configuration path defaults to `/var/lib/gitea/custom/conf` (see `forgejo -h`) * Containers mounting the volume `-v /foo/bar:/var/lib/gitea` already have this file available to modify. Another volume shouldn't be required * Containers using named volumes can use `docker cp` to modify the file inside the volume, if desired For these reasons, it makes more sense to use the default path for `$GITEA_APP_INI` rather than require users to create a dedicated volume for the file. Revert it back to its default while maintaining backwards compatibility (users can update by simply moving the file to the new path). --- Dockerfile.rootless | 7 +++++-- docker/rootless/usr/local/bin/docker-entrypoint.sh | 5 +++++ docker/rootless/usr/local/bin/docker-setup.sh | 12 ++++++++++++ release-notes/8.0.0/fix/3363.md | 6 ++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 release-notes/8.0.0/fix/3363.md diff --git a/Dockerfile.rootless b/Dockerfile.rootless index 3f4cba955a..6d1503f034 100644 --- a/Dockerfile.rootless +++ b/Dockerfile.rootless @@ -100,8 +100,11 @@ ENV GITEA_CUSTOM /var/lib/gitea/custom ENV GITEA_TEMP /tmp/gitea ENV TMPDIR /tmp/gitea -#TODO add to docs the ability to define the ini to load (useful to test and revert a config) -ENV GITEA_APP_INI /etc/gitea/app.ini +# Legacy config file for backwards compatibility +# TODO: remove on next major version release +ENV GITEA_APP_INI_LEGACY /etc/gitea/app.ini + +ENV GITEA_APP_INI ${GITEA_CUSTOM}/conf/app.ini ENV HOME "/var/lib/gitea/git" VOLUME ["/var/lib/gitea", "/etc/gitea"] WORKDIR /var/lib/gitea diff --git a/docker/rootless/usr/local/bin/docker-entrypoint.sh b/docker/rootless/usr/local/bin/docker-entrypoint.sh index ca509214bf..e5fa41cc78 100755 --- a/docker/rootless/usr/local/bin/docker-entrypoint.sh +++ b/docker/rootless/usr/local/bin/docker-entrypoint.sh @@ -13,5 +13,10 @@ fi if [ $# -gt 0 ]; then exec "$@" else + # TODO: remove on next major version release + # Honour legacy config file if existing + if [ -f ${GITEA_APP_INI_LEGACY} ]; then + GITEA_APP_INI=${GITEA_APP_INI_LEGACY} + fi exec /usr/local/bin/gitea -c ${GITEA_APP_INI} web fi diff --git a/docker/rootless/usr/local/bin/docker-setup.sh b/docker/rootless/usr/local/bin/docker-setup.sh index b480685863..09bbeabc63 100755 --- a/docker/rootless/usr/local/bin/docker-setup.sh +++ b/docker/rootless/usr/local/bin/docker-setup.sh @@ -11,6 +11,18 @@ mkdir -p ${GITEA_CUSTOM} && chmod 0700 ${GITEA_CUSTOM} mkdir -p ${GITEA_TEMP} && chmod 0700 ${GITEA_TEMP} if [ ! -w ${GITEA_TEMP} ]; then echo "${GITEA_TEMP} is not writable"; exit 1; fi +# TODO: remove on next major version release +# Honour legacy config file if existing, but inform the user +if [ -f ${GITEA_APP_INI_LEGACY} ] && [ ${GITEA_APP_INI} != ${GITEA_APP_INI_LEGACY} ]; then + GITEA_APP_INI_DEFAULT=/var/lib/gitea/custom/conf/app.ini + echo -e \ + "\033[33mWARNING\033[0m: detected configuration file in deprecated default path ${GITEA_APP_INI_LEGACY}." \ + "The new default is ${GITEA_APP_INI_DEFAULT}. To remove this warning, choose one of the options:\n" \ + "* Move ${GITEA_APP_INI_LEGACY} to ${GITEA_APP_INI_DEFAULT} (or to \$GITEA_APP_INI if you want to override this variable)\n" \ + "* Explicitly override GITEA_APP_INI=${GITEA_APP_INI_LEGACY} in the container environment" + GITEA_APP_INI=${GITEA_APP_INI_LEGACY} +fi + #Prepare config file if [ ! -f ${GITEA_APP_INI} ]; then diff --git a/release-notes/8.0.0/fix/3363.md b/release-notes/8.0.0/fix/3363.md new file mode 100644 index 0000000000..65b516cabc --- /dev/null +++ b/release-notes/8.0.0/fix/3363.md @@ -0,0 +1,6 @@ +Reverted the rootless container image path in `GITEA_APP_INI` from +`/etc/gitea/app.ini` to its default value of +`/var/lib/gitea/custom/conf/app.ini`. This allows container users to not have +to mount two separate volumes (one for the configuration data and one for the +configuration `.ini` file). A warning is issued for users with the legacy +configuration on how to update to the new path. From f9628f883df485af1c208345d55a956db741eb76 Mon Sep 17 00:00:00 2001 From: Beowulf Date: Thu, 25 Apr 2024 22:19:24 +0200 Subject: [PATCH 047/401] Move settings button back to the right in repo and org header This will move the settings button back to the right, like known from older versions. For this, the overflow-menu was changed when a setting button is available. If no settings button is available, the behavior will not change. Fixes #3301 --- templates/org/menu.tmpl | 2 +- templates/repo/header.tmpl | 6 +- tests/e2e/right-settings-button.test.e2e.js | 114 ++++++++++++++++++++ web_src/js/webcomponents/overflow-menu.js | 24 ++++- 4 files changed, 141 insertions(+), 5 deletions(-) create mode 100644 tests/e2e/right-settings-button.test.e2e.js diff --git a/templates/org/menu.tmpl b/templates/org/menu.tmpl index c519606d1f..1860a3765a 100644 --- a/templates/org/menu.tmpl +++ b/templates/org/menu.tmpl @@ -40,7 +40,7 @@ {{end}} {{if .IsOrganizationOwner}} - + {{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}} {{end}} diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index bbc3b9c008..95c2e059d5 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -177,18 +177,18 @@ {{$highlightSettings := true}} {{if and .SignedUser.EnableRepoUnitHints (not (.Repository.AllUnitsEnabled ctx))}} {{$highlightSettings = false}} - + {{svg "octicon-diff-added"}} {{ctx.Locale.Tr "repo.settings.units.add_more"}} {{end}} - + {{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}} {{end}}
{{else if .Permission.IsAdmin}} diff --git a/tests/e2e/right-settings-button.test.e2e.js b/tests/e2e/right-settings-button.test.e2e.js new file mode 100644 index 0000000000..7f457dec4a --- /dev/null +++ b/tests/e2e/right-settings-button.test.e2e.js @@ -0,0 +1,114 @@ +// @ts-check +import {test, expect} from '@playwright/test'; +import {login_user, load_logged_in_context} from './utils_e2e.js'; + +test.beforeAll(async ({browser}, workerInfo) => { + await login_user(browser, workerInfo, 'user2'); +}); + +test.describe('desktop viewport', () => { + test.use({viewport: {width: 1920, height: 300}}); + + test('Settings button on right of repo header', async ({browser}, workerInfo) => { + const context = await load_logged_in_context(browser, workerInfo, 'user2'); + const page = await context.newPage(); + + await page.goto('/user2/repo1'); + + const settingsBtn = page.locator('.overflow-menu-items>#settings-btn'); + await expect(settingsBtn).toBeVisible(); + await expect(settingsBtn).toHaveClass(/right/); + + await expect(page.locator('.overflow-menu-button')).toHaveCount(0); + }); + + test('Settings button on right of org header', async ({browser}, workerInfo) => { + const context = await load_logged_in_context(browser, workerInfo, 'user2'); + const page = await context.newPage(); + + await page.goto('/org3'); + + const settingsBtn = page.locator('.overflow-menu-items>#settings-btn'); + await expect(settingsBtn).toBeVisible(); + await expect(settingsBtn).toHaveClass(/right/); + + await expect(page.locator('.overflow-menu-button')).toHaveCount(0); + }); + + test('User overview overflow menu should not be influenced', async ({page}) => { + await page.goto('/user2'); + + await expect(page.locator('.overflow-menu-items>#settings-btn')).toHaveCount(0); + + await expect(page.locator('.overflow-menu-button')).toHaveCount(0); + }); +}); + +test.describe('small viewport', () => { + test.use({viewport: {width: 800, height: 300}}); + + test('Settings button in overflow menu of repo header', async ({browser}, workerInfo) => { + const context = await load_logged_in_context(browser, workerInfo, 'user2'); + const page = await context.newPage(); + + await page.goto('/user2/repo1'); + + await expect(page.locator('.overflow-menu-items>#settings-btn')).toHaveCount(0); + + await expect(page.locator('.overflow-menu-button')).toBeVisible(); + + await page.click('.overflow-menu-button'); + await expect(page.locator('.tippy-target>#settings-btn')).toBeVisible(); + + // Verify that we have no duplicated items + const shownItems = await page.locator('.overflow-menu-items>a').all(); + expect(shownItems).not.toHaveLength(0); + const overflowItems = await page.locator('.tippy-target>a').all(); + expect(overflowItems).not.toHaveLength(0); + + const items = shownItems.concat(overflowItems); + expect(Array.from(new Set(items))).toHaveLength(items.length); + }); + + test('Settings button in overflow menu of org header', async ({browser}, workerInfo) => { + const context = await load_logged_in_context(browser, workerInfo, 'user2'); + const page = await context.newPage(); + + await page.goto('/org3'); + + await expect(page.locator('.overflow-menu-items>#settings-btn')).toHaveCount(0); + + await expect(page.locator('.overflow-menu-button')).toBeVisible(); + + await page.click('.overflow-menu-button'); + await expect(page.locator('.tippy-target>#settings-btn')).toBeVisible(); + + // Verify that we have no duplicated items + const shownItems = await page.locator('.overflow-menu-items>a').all(); + expect(shownItems).not.toHaveLength(0); + const overflowItems = await page.locator('.tippy-target>a').all(); + expect(overflowItems).not.toHaveLength(0); + + const items = shownItems.concat(overflowItems); + expect(Array.from(new Set(items))).toHaveLength(items.length); + }); + + test('User overview overflow menu should not be influenced', async ({page}) => { + await page.goto('/user2'); + + await expect(page.locator('.overflow-menu-items>#settings-btn')).toHaveCount(0); + + await expect(page.locator('.overflow-menu-button')).toBeVisible(); + await page.click('.overflow-menu-button'); + await expect(page.locator('.tippy-target>#settings-btn')).toHaveCount(0); + + // Verify that we have no duplicated items + const shownItems = await page.locator('.overflow-menu-items>a').all(); + expect(shownItems).not.toHaveLength(0); + const overflowItems = await page.locator('.tippy-target>a').all(); + expect(overflowItems).not.toHaveLength(0); + + const items = shownItems.concat(overflowItems); + expect(Array.from(new Set(items))).toHaveLength(items.length); + }); +}); diff --git a/web_src/js/webcomponents/overflow-menu.js b/web_src/js/webcomponents/overflow-menu.js index 604fce7d4b..a69ce1681c 100644 --- a/web_src/js/webcomponents/overflow-menu.js +++ b/web_src/js/webcomponents/overflow-menu.js @@ -69,13 +69,35 @@ window.customElements.define('overflow-menu', class extends HTMLElement { this.tippyItems = []; const menuRight = this.offsetLeft + this.offsetWidth; const menuItems = this.menuItemsEl.querySelectorAll('.item'); + const settingItem = this.menuItemsEl.querySelector('#settings-btn'); for (const item of menuItems) { const itemRight = item.offsetLeft + item.offsetWidth; - if (menuRight - itemRight < 38) { // roughly the width of .overflow-menu-button + // Width of the settings button plus a small value to get the next item to the left if there is directly one + // If no setting button is in the menu the default threshold is 38 - roughly the width of .overflow-menu-button + const overflowBtnThreshold = 38; + const threshold = settingItem?.offsetWidth ?? overflowBtnThreshold; + // If we have a settings item on the right-hand side, we must also check if the first, + // possibly overflowing item would still fit on the left-hand side of the overflow menu + // If not, it must be added to the array (twice). The duplicate is removed with the shift. + if (settingItem && !this.tippyItems?.length && item !== settingItem && menuRight - itemRight < overflowBtnThreshold) { + this.tippyItems.push(settingItem); + } + if (menuRight - itemRight < threshold) { this.tippyItems.push(item); } } + // Special handling for settings button on right. Only done if a setting item is present + if (settingItem) { + // If less than 2 items overflow, remove all items (only settings "overflowed" - because it's on the right side) + if (this.tippyItems?.length < 2) { + this.tippyItems = []; + } else { + // Remove the first item of the list, because we have always one item more in the array due to the big threshold above + this.tippyItems.shift(); + } + } + // if there are no overflown items, remove any previously created button if (!this.tippyItems?.length) { const btn = this.querySelector('.overflow-menu-button'); From a5df62209924b9b1fe8dbd31c2455212c8fa2b50 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 26 Apr 2024 15:17:45 +0200 Subject: [PATCH 048/401] docs(release-notes): 7.0.1 --- RELEASE-NOTES.md | 15 ++++++++++++++- release-notes/8.0.0/fix/3399.md | 1 - release-notes/8.0.0/fix/3444.md | 1 - release-notes/8.0.0/fix/3451.md | 1 - 4 files changed, 14 insertions(+), 4 deletions(-) delete mode 100644 release-notes/8.0.0/fix/3399.md delete mode 100644 release-notes/8.0.0/fix/3444.md delete mode 100644 release-notes/8.0.0/fix/3451.md diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 85c8f8bcc1..9980338629 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -8,6 +8,19 @@ A [patch or minor release](https://semver.org/spec/v2.0.0.html) (e.g. upgrading - [8.0.0](/release-notes/8.0.0/) +## 7.0.1 + +This is a bug fix release. See the documentation for more information on the [upgrade procedure](https://forgejo.org/docs/v7.0/admin/upgrade/). + +In addition to the following notable bug fixes, you can browse the [full list of commits](https://codeberg.org/forgejo/forgejo/compare/v7.0.0...v7.0.1) included in this release. + +* **Bug fixes:** + * [PR](https://codeberg.org/forgejo/forgejo/pulls/3466): LFS data corruption when running the [`forgejo doctor check --fix`](https://forgejo.org/docs/v7.0/admin/command-line/#doctor-check) CLI command or setting [`[cron.gc_lfs].ENABLED=true`](https://forgejo.org/docs/v7.0/admin/config-cheat-sheet/#cron---garbage-collect-lfs-pointers-in-repositories-crongc_lfs) (the default is `false`). + * [PR](https://codeberg.org/forgejo/forgejo/pulls/3412): [non backward compatible change](https://codeberg.org/forgejo/forgejo/issues/3399) in the [`forgejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command. + * [PR](https://codeberg.org/forgejo/forgejo/pulls/3448): error 500 because of an incorrect evaluation of the template when visiting the LFS settings of a repository. + * [PR](https://codeberg.org/forgejo/forgejo/pulls/3464): `GET /repos/{owner}/{name}` API endpoint [always returns an empty string for the `object_format_name` field](https://codeberg.org/forgejo/forgejo/issues/3458). + * [PR](https://codeberg.org/forgejo/forgejo/pulls/3444): fuzzy search [may fail with bleve](https://codeberg.org/forgejo/forgejo/issues/3443). + ## 7.0.0 The [complete list of commits](https://codeberg.org/forgejo/forgejo/commits/branch/v7.0/forgejo) included in the `Forgejo v7.0.0` release can be reviewed from the command line with: @@ -19,7 +32,7 @@ $ git -C forgejo log --oneline --no-merges origin/v1.21/forgejo..origin/v7.0/for * **Regressions and workarounds:** * Running the [`forgejo doctor check --fix`](https://forgejo.org/docs/v7.0/admin/command-line/#doctor-check) CLI command or setting [`[cron.gc_lfs].ENABLED=true`](https://forgejo.org/docs/v7.0/admin/config-cheat-sheet/#cron---garbage-collect-lfs-pointers-in-repositories-crongc_lfs) (the default is `false`) will corrupt the LFS storage. The workaround is to not run the doctor CLI command and disable the `cron.gc_lfs`. This regression will be [fixed in 7.0.1](https://codeberg.org/forgejo/forgejo/issues/3438). - * The [`fogejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command [requires a password](https://codeberg.org/forgejo/forgejo/commit/b122c6ef8b9254120432aed373cbe075331132ac) change by default when creating the first user and the `--admin` flag is not specified. The `--must-change-password=false` argument must be given to not require a password change. This regression will be [fixed in 7.0.1](https://codeberg.org/forgejo/forgejo/issues/3399). + * The [`forgejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command [requires a password](https://codeberg.org/forgejo/forgejo/commit/b122c6ef8b9254120432aed373cbe075331132ac) change by default when creating the first user and the `--admin` flag is not specified. The `--must-change-password=false` argument must be given to not require a password change. This regression will be [fixed in 7.0.1](https://codeberg.org/forgejo/forgejo/issues/3399). * **Breaking changes requiring manual intervention:** * [MySQL 8.0 or PostgreSQL 12](https://codeberg.org/forgejo/forgejo/commit/e94f9fcafdcf284561e7fb33f60156a69c4ad6a5) are the minimum supported versions. The database must be migrated before upgrading. The requirements regarding SQLite did not change. * The `per_page` parameter is [no longer a synonym for `limit`](https://codeberg.org/forgejo/forgejo/commit/0aab2d38a7d91bc8caff332e452364468ce52d9a) in the [/repos/{owner}/{repo}/releases](https://code.forgejo.org/api/swagger/#/repository/repoListReleases) API endpoint. diff --git a/release-notes/8.0.0/fix/3399.md b/release-notes/8.0.0/fix/3399.md deleted file mode 100644 index d25d66d5f0..0000000000 --- a/release-notes/8.0.0/fix/3399.md +++ /dev/null @@ -1 +0,0 @@ -The regression in the [`fogejo admin user create`](https://forgejo.org/docs/v7.0/admin/command-line/#admin-user-create) CLI command [is fixed](https://codeberg.org/forgejo/forgejo/issues/3399) and it is backward compatible. diff --git a/release-notes/8.0.0/fix/3444.md b/release-notes/8.0.0/fix/3444.md deleted file mode 100644 index 4988fdad15..0000000000 --- a/release-notes/8.0.0/fix/3444.md +++ /dev/null @@ -1 +0,0 @@ -Fixed bleve indexer failing when [fuzziness exceeds the maximum 2](https://codeberg.org/forgejo/forgejo/pulls/3444) diff --git a/release-notes/8.0.0/fix/3451.md b/release-notes/8.0.0/fix/3451.md deleted file mode 100644 index e0c307e896..0000000000 --- a/release-notes/8.0.0/fix/3451.md +++ /dev/null @@ -1 +0,0 @@ -Fixed an error 500 when visiting [the LFS settings](https://codeberg.org/forgejo/forgejo/pulls/3451) at `/{owner}/{repo}/settings/lfs/find?oid=...`. From 08f5a25d3b8104c6e73b7af32e4c0d23813fb539 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Fri, 26 Apr 2024 22:38:58 +0000 Subject: [PATCH 049/401] ldap: default domain name (#3414) When the ldap synchronizer is look for an email address and fails at finding one, it falls back at creating one using "localhost.local" domain. This new field makes this domain name configurable. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3414 Reviewed-by: Earl Warren Co-authored-by: Baptiste Daroussin Co-committed-by: Baptiste Daroussin --- options/locale/locale_en-US.ini | 1 + release-notes/8.0.0/3414.md | 1 + routers/web/admin/auths.go | 1 + services/auth/source/ldap/source.go | 1 + services/auth/source/ldap/source_sync.go | 6 +- services/forms/auth_form.go | 1 + templates/admin/auth/edit.tmpl | 4 + templates/admin/auth/source/ldap.tmpl | 4 + tests/integration/auth_ldap_test.go | 102 +++++++++++++++++++---- 9 files changed, 105 insertions(+), 16 deletions(-) create mode 100644 release-notes/8.0.0/3414.md diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index d7680f3545..7125d97d9b 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3100,6 +3100,7 @@ auths.attribute_mail = Email attribute auths.attribute_ssh_public_key = Public SSH key attribute auths.attribute_avatar = Avatar attribute auths.attributes_in_bind = Fetch attributes in bind DN context +auths.default_domain_name = Default domain name used for the email address auths.allow_deactivate_all = Allow an empty search result to deactivate all users auths.use_paged_search = Use paged search auths.search_page_size = Page size diff --git a/release-notes/8.0.0/3414.md b/release-notes/8.0.0/3414.md new file mode 100644 index 0000000000..2e10483e23 --- /dev/null +++ b/release-notes/8.0.0/3414.md @@ -0,0 +1 @@ +Allow to customize the domain name used as a fallback when synchronizing sources from ldap [`ldap: default domain name`](https://codeberg.org/forgejo/forgejo/pulls/3414) diff --git a/routers/web/admin/auths.go b/routers/web/admin/auths.go index ba487d1045..799b7e8a84 100644 --- a/routers/web/admin/auths.go +++ b/routers/web/admin/auths.go @@ -129,6 +129,7 @@ func parseLDAPConfig(form forms.AuthenticationForm) *ldap.Source { UserDN: form.UserDN, BindPassword: form.BindPassword, UserBase: form.UserBase, + DefaultDomainName: form.DefaultDomainName, AttributeUsername: form.AttributeUsername, AttributeName: form.AttributeName, AttributeSurname: form.AttributeSurname, diff --git a/services/auth/source/ldap/source.go b/services/auth/source/ldap/source.go index dc4cb2c940..ba407b351a 100644 --- a/services/auth/source/ldap/source.go +++ b/services/auth/source/ldap/source.go @@ -34,6 +34,7 @@ type Source struct { BindPassword string // Bind DN password UserBase string // Base search path for users UserDN string // Template for the DN of the user for simple auth + DefaultDomainName string // DomainName used if none are in the field, default "localhost.local" AttributeUsername string // Username attribute AttributeName string // First name attribute AttributeSurname string // Surname attribute diff --git a/services/auth/source/ldap/source_sync.go b/services/auth/source/ldap/source_sync.go index 62f052d68c..7c5d3da595 100644 --- a/services/auth/source/ldap/source_sync.go +++ b/services/auth/source/ldap/source_sync.go @@ -105,7 +105,11 @@ func (source *Source) Sync(ctx context.Context, updateExisting bool) error { } if len(su.Mail) == 0 { - su.Mail = fmt.Sprintf("%s@localhost.local", su.Username) + domainName := source.DefaultDomainName + if len(domainName) == 0 { + domainName = "localhost.local" + } + su.Mail = fmt.Sprintf("%s@%s", su.Username, domainName) } fullName := composeFullName(su.Name, su.Surname, su.Username) diff --git a/services/forms/auth_form.go b/services/forms/auth_form.go index c9f3182b3a..a3eca9473b 100644 --- a/services/forms/auth_form.go +++ b/services/forms/auth_form.go @@ -26,6 +26,7 @@ type AuthenticationForm struct { AttributeUsername string AttributeName string AttributeSurname string + DefaultDomainName string AttributeMail string AttributeSSHPublicKey string AttributeAvatar string diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 687a277a84..8a8bd61148 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -97,6 +97,10 @@
+
+ + +
diff --git a/templates/admin/auth/source/ldap.tmpl b/templates/admin/auth/source/ldap.tmpl index 680849c8ea..6cb6643f26 100644 --- a/templates/admin/auth/source/ldap.tmpl +++ b/templates/admin/auth/source/ldap.tmpl @@ -71,6 +71,10 @@
+
+ + +
diff --git a/tests/integration/auth_ldap_test.go b/tests/integration/auth_ldap_test.go index 3a5fdb97a6..06677287c0 100644 --- a/tests/integration/auth_ldap_test.go +++ b/tests/integration/auth_ldap_test.go @@ -112,13 +112,17 @@ func getLDAPServerPort() string { return port } -func buildAuthSourceLDAPPayload(csrf, sshKeyAttribute, groupFilter, groupTeamMap, groupTeamMapRemoval string) map[string]string { +func buildAuthSourceLDAPPayload(csrf, sshKeyAttribute, mailKeyAttribute, defaultDomainName, groupFilter, groupTeamMap, groupTeamMapRemoval string) map[string]string { // Modify user filter to test group filter explicitly userFilter := "(&(objectClass=inetOrgPerson)(memberOf=cn=git,ou=people,dc=planetexpress,dc=com)(uid=%s))" if groupFilter != "" { userFilter = "(&(objectClass=inetOrgPerson)(uid=%s))" } + if len(mailKeyAttribute) == 0 { + mailKeyAttribute = "mail" + } + return map[string]string{ "_csrf": csrf, "type": "2", @@ -134,8 +138,9 @@ func buildAuthSourceLDAPPayload(csrf, sshKeyAttribute, groupFilter, groupTeamMap "attribute_username": "uid", "attribute_name": "givenName", "attribute_surname": "sn", - "attribute_mail": "mail", + "attribute_mail": mailKeyAttribute, "attribute_ssh_public_key": sshKeyAttribute, + "default_domain_name": defaultDomainName, "is_sync_enabled": "on", "is_active": "on", "groups_enabled": "on", @@ -148,7 +153,7 @@ func buildAuthSourceLDAPPayload(csrf, sshKeyAttribute, groupFilter, groupTeamMap } } -func addAuthSourceLDAP(t *testing.T, sshKeyAttribute, groupFilter string, groupMapParams ...string) { +func addAuthSourceLDAP(t *testing.T, sshKeyAttribute, mailKeyAttribute, defaultDomainName, groupFilter string, groupMapParams ...string) { groupTeamMapRemoval := "off" groupTeamMap := "" if len(groupMapParams) == 2 { @@ -157,7 +162,7 @@ func addAuthSourceLDAP(t *testing.T, sshKeyAttribute, groupFilter string, groupM } session := loginUser(t, "user1") csrf := GetCSRF(t, session, "/admin/auths/new") - req := NewRequestWithValues(t, "POST", "/admin/auths/new", buildAuthSourceLDAPPayload(csrf, sshKeyAttribute, groupFilter, groupTeamMap, groupTeamMapRemoval)) + req := NewRequestWithValues(t, "POST", "/admin/auths/new", buildAuthSourceLDAPPayload(csrf, sshKeyAttribute, mailKeyAttribute, defaultDomainName, groupFilter, groupTeamMap, groupTeamMapRemoval)) session.MakeRequest(t, req, http.StatusSeeOther) } @@ -167,7 +172,7 @@ func TestLDAPUserSignin(t *testing.T) { return } defer tests.PrepareTestEnv(t)() - addAuthSourceLDAP(t, "", "") + addAuthSourceLDAP(t, "", "", "", "") u := gitLDAPUsers[0] @@ -184,7 +189,7 @@ func TestLDAPUserSignin(t *testing.T) { func TestLDAPAuthChange(t *testing.T) { defer tests.PrepareTestEnv(t)() - addAuthSourceLDAP(t, "", "") + addAuthSourceLDAP(t, "", "", "", "") session := loginUser(t, "user1") req := NewRequest(t, "GET", "/admin/auths") @@ -205,7 +210,7 @@ func TestLDAPAuthChange(t *testing.T) { binddn, _ := doc.Find(`input[name="bind_dn"]`).Attr("value") assert.Equal(t, "uid=gitea,ou=service,dc=planetexpress,dc=com", binddn) - req = NewRequestWithValues(t, "POST", href, buildAuthSourceLDAPPayload(csrf, "", "", "", "off")) + req = NewRequestWithValues(t, "POST", href, buildAuthSourceLDAPPayload(csrf, "", "", "", "", "", "off")) session.MakeRequest(t, req, http.StatusSeeOther) req = NewRequest(t, "GET", href) @@ -215,6 +220,21 @@ func TestLDAPAuthChange(t *testing.T) { assert.Equal(t, host, getLDAPServerHost()) binddn, _ = doc.Find(`input[name="bind_dn"]`).Attr("value") assert.Equal(t, "uid=gitea,ou=service,dc=planetexpress,dc=com", binddn) + domainname, _ := doc.Find(`input[name="default_domain_name"]`).Attr("value") + assert.Equal(t, "", domainname) + + req = NewRequestWithValues(t, "POST", href, buildAuthSourceLDAPPayload(csrf, "", "", "test.org", "", "", "off")) + session.MakeRequest(t, req, http.StatusSeeOther) + + req = NewRequest(t, "GET", href) + resp = session.MakeRequest(t, req, http.StatusOK) + doc = NewHTMLParser(t, resp.Body) + host, _ = doc.Find(`input[name="host"]`).Attr("value") + assert.Equal(t, host, getLDAPServerHost()) + binddn, _ = doc.Find(`input[name="bind_dn"]`).Attr("value") + assert.Equal(t, "uid=gitea,ou=service,dc=planetexpress,dc=com", binddn) + domainname, _ = doc.Find(`input[name="default_domain_name"]`).Attr("value") + assert.Equal(t, "test.org", domainname) } func TestLDAPUserSync(t *testing.T) { @@ -223,7 +243,7 @@ func TestLDAPUserSync(t *testing.T) { return } defer tests.PrepareTestEnv(t)() - addAuthSourceLDAP(t, "", "") + addAuthSourceLDAP(t, "", "", "", "") auth.SyncExternalUsers(context.Background(), true) // Check if users exists @@ -252,7 +272,7 @@ func TestLDAPUserSyncWithEmptyUsernameAttribute(t *testing.T) { session := loginUser(t, "user1") csrf := GetCSRF(t, session, "/admin/auths/new") - payload := buildAuthSourceLDAPPayload(csrf, "", "", "", "") + payload := buildAuthSourceLDAPPayload(csrf, "", "", "", "", "", "") payload["attribute_username"] = "" req := NewRequestWithValues(t, "POST", "/admin/auths/new", payload) session.MakeRequest(t, req, http.StatusSeeOther) @@ -300,7 +320,7 @@ func TestLDAPUserSyncWithGroupFilter(t *testing.T) { return } defer tests.PrepareTestEnv(t)() - addAuthSourceLDAP(t, "", "(cn=git)") + addAuthSourceLDAP(t, "", "", "", "(cn=git)") // Assert a user not a member of the LDAP group "cn=git" cannot login // This test may look like TestLDAPUserSigninFailed but it is not. @@ -359,7 +379,7 @@ func TestLDAPUserSigninFailed(t *testing.T) { return } defer tests.PrepareTestEnv(t)() - addAuthSourceLDAP(t, "", "") + addAuthSourceLDAP(t, "", "", "", "") u := otherLDAPUsers[0] testLoginFailed(t, u.UserName, u.Password, translation.NewLocale("en-US").TrString("form.username_password_incorrect")) @@ -371,7 +391,7 @@ func TestLDAPUserSSHKeySync(t *testing.T) { return } defer tests.PrepareTestEnv(t)() - addAuthSourceLDAP(t, "sshPublicKey", "") + addAuthSourceLDAP(t, "sshPublicKey", "", "", "") auth.SyncExternalUsers(context.Background(), true) @@ -404,7 +424,7 @@ func TestLDAPGroupTeamSyncAddMember(t *testing.T) { return } defer tests.PrepareTestEnv(t)() - addAuthSourceLDAP(t, "", "", "on", `{"cn=ship_crew,ou=people,dc=planetexpress,dc=com":{"org26": ["team11"]},"cn=admin_staff,ou=people,dc=planetexpress,dc=com": {"non-existent": ["non-existent"]}}`) + addAuthSourceLDAP(t, "", "", "", "", "on", `{"cn=ship_crew,ou=people,dc=planetexpress,dc=com":{"org26": ["team11"]},"cn=admin_staff,ou=people,dc=planetexpress,dc=com": {"non-existent": ["non-existent"]}}`) org, err := organization.GetOrgByName(db.DefaultContext, "org26") assert.NoError(t, err) team, err := organization.GetTeam(db.DefaultContext, org.ID, "team11") @@ -449,7 +469,7 @@ func TestLDAPGroupTeamSyncRemoveMember(t *testing.T) { return } defer tests.PrepareTestEnv(t)() - addAuthSourceLDAP(t, "", "", "on", `{"cn=dispatch,ou=people,dc=planetexpress,dc=com": {"org26": ["team11"]}}`) + addAuthSourceLDAP(t, "", "", "", "", "on", `{"cn=dispatch,ou=people,dc=planetexpress,dc=com": {"org26": ["team11"]}}`) org, err := organization.GetOrgByName(db.DefaultContext, "org26") assert.NoError(t, err) team, err := organization.GetTeam(db.DefaultContext, org.ID, "team11") @@ -487,6 +507,58 @@ func TestLDAPPreventInvalidGroupTeamMap(t *testing.T) { session := loginUser(t, "user1") csrf := GetCSRF(t, session, "/admin/auths/new") - req := NewRequestWithValues(t, "POST", "/admin/auths/new", buildAuthSourceLDAPPayload(csrf, "", "", `{"NOT_A_VALID_JSON"["MISSING_DOUBLE_POINT"]}`, "off")) + req := NewRequestWithValues(t, "POST", "/admin/auths/new", buildAuthSourceLDAPPayload(csrf, "", "", "", "", `{"NOT_A_VALID_JSON"["MISSING_DOUBLE_POINT"]}`, "off")) session.MakeRequest(t, req, http.StatusOK) // StatusOK = failed, StatusSeeOther = ok } + +func TestLDAPUserSyncInvalidMail(t *testing.T) { + if skipLDAPTests() { + t.Skip() + return + } + defer tests.PrepareTestEnv(t)() + addAuthSourceLDAP(t, "", "nonexisting", "", "") + auth.SyncExternalUsers(context.Background(), true) + + // Check if users exists + for _, gitLDAPUser := range gitLDAPUsers { + dbUser, err := user_model.GetUserByName(db.DefaultContext, gitLDAPUser.UserName) + assert.NoError(t, err) + assert.Equal(t, gitLDAPUser.UserName, dbUser.Name) + assert.Equal(t, gitLDAPUser.UserName+"@localhost.local", dbUser.Email) + assert.Equal(t, gitLDAPUser.IsAdmin, dbUser.IsAdmin) + assert.Equal(t, gitLDAPUser.IsRestricted, dbUser.IsRestricted) + } + + // Check if no users exist + for _, otherLDAPUser := range otherLDAPUsers { + _, err := user_model.GetUserByName(db.DefaultContext, otherLDAPUser.UserName) + assert.True(t, user_model.IsErrUserNotExist(err)) + } +} + +func TestLDAPUserSyncInvalidMailDefaultDomain(t *testing.T) { + if skipLDAPTests() { + t.Skip() + return + } + defer tests.PrepareTestEnv(t)() + addAuthSourceLDAP(t, "", "nonexisting", "test.org", "") + auth.SyncExternalUsers(context.Background(), true) + + // Check if users exists + for _, gitLDAPUser := range gitLDAPUsers { + dbUser, err := user_model.GetUserByName(db.DefaultContext, gitLDAPUser.UserName) + assert.NoError(t, err) + assert.Equal(t, gitLDAPUser.UserName, dbUser.Name) + assert.Equal(t, gitLDAPUser.UserName+"@test.org", dbUser.Email) + assert.Equal(t, gitLDAPUser.IsAdmin, dbUser.IsAdmin) + assert.Equal(t, gitLDAPUser.IsRestricted, dbUser.IsRestricted) + } + + // Check if no users exist + for _, otherLDAPUser := range otherLDAPUsers { + _, err := user_model.GetUserByName(db.DefaultContext, otherLDAPUser.UserName) + assert.True(t, user_model.IsErrUserNotExist(err)) + } +} From 01d9faefa5cf76c8ddbab6156547d615d5c5b8b3 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 27 Apr 2024 00:07:16 +0000 Subject: [PATCH 050/401] Update module connectrpc.com/connect to v1.16.1 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2f4c64b2da..2492285502 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( code.gitea.io/gitea-vet v0.2.3 code.gitea.io/sdk/gitea v0.17.1 codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570 - connectrpc.com/connect v1.15.0 + connectrpc.com/connect v1.16.1 gitea.com/go-chi/binding v0.0.0-20230415142243-04b515c6d669 gitea.com/go-chi/cache v0.2.0 gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098 diff --git a/go.sum b/go.sum index ce55e89399..3ada0845c4 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ code.gitea.io/sdk/gitea v0.17.1 h1:3jCPOG2ojbl8AcfaUCRYLT5MUcBMFwS0OSK2mA5Zok8= code.gitea.io/sdk/gitea v0.17.1/go.mod h1:aCnBqhHpoEWA180gMbaCtdX9Pl6BWBAuuP2miadoTNM= codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570 h1:TXbikPqa7YRtfU9vS6QJBg77pUvbEb6StRdZO8t1bEY= codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570/go.mod h1:IIAjsijsd8q1isWX8MACefDEgTQslQ4stk2AeeTt3kM= -connectrpc.com/connect v1.15.0 h1:lFdeCbZrVVDydAqwr4xGV2y+ULn+0Z73s5JBj2LikWo= -connectrpc.com/connect v1.15.0/go.mod h1:bQmjpDY8xItMnttnurVgOkHUBMRT9cpsNi2O4AjKhmA= +connectrpc.com/connect v1.16.1 h1:rOdrK/RTI/7TVnn3JsVxt3n028MlTRwmK5Q4heSpjis= +connectrpc.com/connect v1.16.1/go.mod h1:XpZAduBQUySsb4/KO5JffORVkDI4B6/EYPi7N8xpNZw= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= From b406025aae8c050b029a9ad2497a75436feb57e4 Mon Sep 17 00:00:00 2001 From: Otto Richter Date: Wed, 24 Apr 2024 20:41:35 +0200 Subject: [PATCH 051/401] Move branch_selection to sidebar folder --- templates/repo/issue/new_form.tmpl | 2 +- templates/repo/issue/view_content/sidebar.tmpl | 2 +- .../issue/{ => view_content/sidebar}/branch_selector_field.tmpl | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename templates/repo/issue/{ => view_content/sidebar}/branch_selector_field.tmpl (100%) diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index 88a6c39e52..465cb44f6f 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -47,7 +47,7 @@
- {{template "repo/issue/branch_selector_field" .}} + {{template "repo/issue/view_content/sidebar/branch_selector_field" .}} {{template "repo/issue/labels/labels_selector_field" .}} diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index cbea32d303..e8b1b2258f 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -1,5 +1,5 @@
- {{template "repo/issue/branch_selector_field" .}} + {{template "repo/issue/view_content/sidebar/branch_selector_field" .}} {{if .Issue.IsPull}} diff --git a/templates/repo/issue/view_content/sidebar/pull_maintainer_edits.tmpl b/templates/repo/issue/view_content/sidebar/pull_maintainer_edits.tmpl index c6a87adde4..6ec5c05fd7 100644 --- a/templates/repo/issue/view_content/sidebar/pull_maintainer_edits.tmpl +++ b/templates/repo/issue/view_content/sidebar/pull_maintainer_edits.tmpl @@ -1,13 +1,10 @@ -{{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}} -
-
-
- - -
+
+
+ +
-{{end}} +
From 5bc72998e0d023cd30bd4474c5a0b37e78345868 Mon Sep 17 00:00:00 2001 From: Otto Richter Date: Thu, 25 Apr 2024 15:08:47 +0200 Subject: [PATCH 064/401] =?UTF-8?q?I=20feel=20responsible=20=E2=80=A6=20(C?= =?UTF-8?q?odeowners)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … for dealing with conflicts and future modification of this template --- CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 88c71ba17e..e30d2c42b4 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -16,6 +16,8 @@ web_src/.* @caesar @crystal @gusted # HTML templates used by the backend. templates/.* @caesar @crystal @gusted +## the issue sidebar was touched by fnetx +templates/repo/issue/view_content/sidebar.* @fnetx # Files related to Go development. From 004fe91d37ef019962df34dd3c9a678c5ad439bf Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 27 Apr 2024 02:04:59 +0000 Subject: [PATCH 065/401] Update module gitea.com/gitea/act to v0.261.1 --- go.mod | 12 ++++++------ go.sum | 23 ++++++++++++----------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index 2f4c64b2da..b403d57912 100644 --- a/go.mod +++ b/go.mod @@ -89,13 +89,13 @@ require ( github.com/sassoftware/go-rpmutils v0.2.1-0.20240124161140-277b154961dd github.com/sergi/go-diff v1.3.1 github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/syndtr/goleveldb v1.0.0 github.com/ulikunitz/xz v0.5.11 github.com/urfave/cli/v2 v2.27.1 github.com/xanzy/go-gitlab v0.96.0 github.com/yohcop/openid-go v1.0.1 - github.com/yuin/goldmark v1.6.0 + github.com/yuin/goldmark v1.7.0 github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc github.com/yuin/goldmark-meta v1.1.0 golang.org/x/crypto v0.21.0 @@ -243,8 +243,8 @@ require ( github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.46.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/rhysd/actionlint v1.6.26 // indirect - github.com/rivo/uniseg v0.4.4 // indirect + github.com/rhysd/actionlint v1.6.27 // indirect + github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/xid v1.5.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect @@ -272,7 +272,7 @@ require ( github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect github.com/zeebo/blake3 v0.2.3 // indirect - go.etcd.io/bbolt v1.3.8 // indirect + go.etcd.io/bbolt v1.3.9 // indirect go.mongodb.org/mongo-driver v1.13.1 // indirect go.opentelemetry.io/otel v1.22.0 // indirect go.opentelemetry.io/otel/trace v1.22.0 // indirect @@ -294,7 +294,7 @@ replace github.com/hashicorp/go-version => github.com/6543/go-version v1.3.1 replace github.com/shurcooL/vfsgen => github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0 -replace github.com/nektos/act => gitea.com/gitea/act v0.259.1 +replace github.com/nektos/act => gitea.com/gitea/act v0.261.1 replace github.com/gorilla/feeds => github.com/yardenshoham/feeds v0.0.0-20240110072658-f3d0c21c0bd5 diff --git a/go.sum b/go.sum index ce55e89399..6d69037b56 100644 --- a/go.sum +++ b/go.sum @@ -52,8 +52,8 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078 h1:cliQ4HHsCo6xi2oWZYKWW4bly/Ory9FuTpFPRxj/mAg= git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078/go.mod h1:g/V2Hjas6Z1UHUp4yIx6bATpNzJ7DYtD0FG3+xARWxs= -gitea.com/gitea/act v0.259.1 h1:8GG1o/xtUHl3qjn5f0h/2FXrT5ubBn05TJOM5ry+FBw= -gitea.com/gitea/act v0.259.1/go.mod h1:UxZWRYqQG2Yj4+4OqfGWW5a3HELwejyWFQyU7F1jUD8= +gitea.com/gitea/act v0.261.1 h1:iACWLc/k8wct9fCF2WdYKqn2Hxx6NjW9zbOP79HF4H4= +gitea.com/gitea/act v0.261.1/go.mod h1:Pg5C9kQY1CEA3QjthjhlrqOC/QOT5NyWNjOjRHw23Ok= gitea.com/go-chi/binding v0.0.0-20230415142243-04b515c6d669 h1:RUBX+MK/TsDxpHmymaOaydfigEbbzqUnG1OTZU/HAeo= gitea.com/go-chi/binding v0.0.0-20230415142243-04b515c6d669/go.mod h1:77TZu701zMXWJFvB8gvTbQ92zQ3DQq/H7l5wAEjQRKc= gitea.com/go-chi/cache v0.2.0 h1:E0npuTfDW6CT1yD8NMDVc1SK6IeRjfmRL2zlEsCEd7w= @@ -708,11 +708,11 @@ github.com/redis/go-redis/v9 v9.4.0 h1:Yzoz33UZw9I/mFhx4MNrB6Fk+XHO1VukNcCa1+lwy github.com/redis/go-redis/v9 v9.4.0/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rhysd/actionlint v1.6.26 h1:zi7jPZf3Ks14gCXYAAL47uBziyFlX7+Xwilqhexct9g= -github.com/rhysd/actionlint v1.6.26/go.mod h1:TIj1DlCgtYLOv5CH9wCK+WJTOr1qAdnFzkGi0IgSCO4= +github.com/rhysd/actionlint v1.6.27 h1:xxwe8YmveBcC8lydW6GoHMGmB6H/MTqUU60F2p10wjw= +github.com/rhysd/actionlint v1.6.27/go.mod h1:m2nFUjAnOrxCMXuOMz9evYBRCLUsMnKY2IJl/N5umbk= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -785,8 +785,9 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= @@ -837,8 +838,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.4.15/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.6.0 h1:boZcn2GTjpsynOsC0iJHnBWa4Bi0qzfJjthwauItG68= -github.com/yuin/goldmark v1.6.0/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.7.0 h1:EfOIvIMZIzHdB/R/zVrikYLPPwJlfMcNczJFMs1m6sA= +github.com/yuin/goldmark v1.7.0/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc h1:+IAOyRda+RLrxa1WC7umKOZRsGq4QrFFMYApOeHzQwQ= github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc/go.mod h1:ovIvrum6DQJA4QsJSovrkC4saKHQVs7TvcaeO8AIl5I= github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc= @@ -849,8 +850,8 @@ github.com/zeebo/blake3 v0.2.3 h1:TFoLXsjeXqRNFxSbk35Dk4YtszE/MQQGK10BH4ptoTg= github.com/zeebo/blake3 v0.2.3/go.mod h1:mjJjZpnsyIVtVgTOSpJ9vmRE4wgDeyt2HU3qXvvKCaQ= github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= go.mongodb.org/mongo-driver v1.13.1 h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk= go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo= From d90b1e2c005bc7fe1fc2bbdc931362505d9230e9 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 27 Apr 2024 10:31:13 +0200 Subject: [PATCH 066/401] fix(renovate): gitea.com/gitea/act requires dashboard approval --- renovate.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 74432c9dca..c395194167 100644 --- a/renovate.json +++ b/renovate.json @@ -37,7 +37,8 @@ "matchDepNames": [ "bitnami/minio", "github.com/go-ap/activitypub", - "github.com/nektos/act" + "github.com/nektos/act", + "gitea.com/gitea/act" ], "dependencyDashboardApproval": true }, From 3db929a2bee612afe94cc6556d67ff3f86fa6213 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 27 Apr 2024 10:43:27 +0200 Subject: [PATCH 067/401] chore(licenses): github.com/minio/sha256-simd is no longer in use --- assets/go-licenses.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/assets/go-licenses.json b/assets/go-licenses.json index 472fcb495b..62971df47f 100644 --- a/assets/go-licenses.json +++ b/assets/go-licenses.json @@ -749,11 +749,6 @@ "path": "github.com/minio/minio-go/v7/LICENSE", "licenseText": "\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright [yyyy] [name of copyright owner]\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n" }, - { - "name": "github.com/minio/sha256-simd", - "path": "github.com/minio/sha256-simd/LICENSE", - "licenseText": "\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright [yyyy] [name of copyright owner]\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n" - }, { "name": "github.com/mitchellh/mapstructure", "path": "github.com/mitchellh/mapstructure/LICENSE", From cb004e9d8bb2489d2f768bd04204b876abaef01a Mon Sep 17 00:00:00 2001 From: Codeberg Translate Date: Sat, 27 Apr 2024 16:37:31 +0000 Subject: [PATCH 068/401] [I18N] Translations update from Weblate (#3359) Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/). Current translation status: ![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg) Co-authored-by: earl-warren Co-authored-by: Fjuro Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org> Co-authored-by: Dirk Co-authored-by: Salif Mehmed Co-authored-by: Kita Ikuyo Co-authored-by: leana8959 Co-authored-by: yeziruo Co-authored-by: SteffoSpieler Co-authored-by: Mylloon Co-authored-by: lucasmz Co-authored-by: emansije Co-authored-by: FunctionalHacker Co-authored-by: owofied Co-authored-by: Xinayder Co-authored-by: kecrily Co-authored-by: ZilloweZ Co-authored-by: toasterbirb Co-authored-by: Pi-Cla Co-authored-by: sinsky Co-authored-by: kdh8219 Co-authored-by: 747 <747@users.noreply.translate.codeberg.org> Co-authored-by: Quitaxd Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3359 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: Codeberg Translate Co-committed-by: Codeberg Translate --- options/locale/locale_ar.ini | 1 + options/locale/locale_bg.ini | 6 +- options/locale/locale_cs-CZ.ini | 7 +- options/locale/locale_de-DE.ini | 11 +- options/locale/locale_fi-FI.ini | 26 ++ options/locale/locale_fil.ini | 40 ++- options/locale/locale_fr-FR.ini | 93 ++++--- options/locale/locale_ja-JP.ini | 134 +++++++++- options/locale/locale_ko-KR.ini | 3 + options/locale/locale_pl-PL.ini | 127 ++++++++-- options/locale/locale_pt-BR.ini | 140 +++++------ options/locale/locale_pt-PT.ini | 337 +++++++++++++++---------- options/locale/locale_ru-RU.ini | 62 ++--- options/locale/locale_tr-TR.ini | 15 ++ options/locale/locale_zh-CN.ini | 22 +- options/locale/locale_zh-HK.ini | 26 ++ options/locale/locale_zh-TW.ini | 426 +++++++++++++++++++++++--------- 17 files changed, 1064 insertions(+), 412 deletions(-) diff --git a/options/locale/locale_ar.ini b/options/locale/locale_ar.ini index e58f7dfdf7..bcd4b6af9f 100644 --- a/options/locale/locale_ar.ini +++ b/options/locale/locale_ar.ini @@ -127,6 +127,7 @@ remove_all = أزل الكل remove_label_str = أزل العنصر "%s" confirm_delete_artifact = هل أنت متأكد أنك تريد حذف العنصر '%s'؟ toggle_menu = تبديل القائمة +more_items = عناصر اضافية [install] db_name = اسم قاعدة البيانات diff --git a/options/locale/locale_bg.ini b/options/locale/locale_bg.ini index 3e47d9e628..d7093b85d5 100644 --- a/options/locale/locale_bg.ini +++ b/options/locale/locale_bg.ini @@ -983,7 +983,7 @@ activity.no_git_activity = Не е имало никаква дейност с pulls.merged_title_desc_few = сля %[1]d подавания от %[2]s в %[3]s %[4]s diff.stats_desc_file = %d промени: %d добавяния и %d изтривания issues.content_history.created = създадено -pulls.status_checks_success = Всички проверки бяха успешни +pulls.status_checks_success = Всички проверки са успешни activity.git_stats_pushed_n = са изтласкали pulls.select_commit_hold_shift_for_range = Изберете подаване. Задръжте shift + click, за да изберете обхвата activity.git_stats_addition_1 = %d добавяне @@ -1084,7 +1084,7 @@ issues.review.un_resolve_conversation = Нерешаване на обсъжда diff.comment.add_single_comment = Добавяне на единичен коментар diff.review.header = Изпращане на рецензия diff.comment.start_review = Започване на рецензия -diff.review = Рецензиране +diff.review = Завършване на рецензията diff.review.placeholder = Рецензионен коментар issues.num_participants_one = %d участващ diff.comment.reply = Отговаряне @@ -1128,6 +1128,8 @@ issues.draft_title = Чернова pulls.reopen_to_merge = Моля, отворете наново тази заявка за сливане, за да извършите сливане. pulls.cant_reopen_deleted_branch = Тази заявка за сливане не може да бъде отворена наново, защото клонът бе изтрит. pulls.status_checks_hide_all = Скриване на всички проверки +pulls.status_checks_failure = Някои проверки са неуспешни +issues.review.add_review_request = поиска рецензия от %s %s [modal] confirm = Потвърждаване diff --git a/options/locale/locale_cs-CZ.ini b/options/locale/locale_cs-CZ.ini index 2cdec52aef..49aabeaf05 100644 --- a/options/locale/locale_cs-CZ.ini +++ b/options/locale/locale_cs-CZ.ini @@ -159,6 +159,7 @@ filter.not_archived = Není archivováno filter.clear = Vymazat filtry more_items = Další položky invalid_data = Neplatná data: %v +copy_generic = Kopírovat do schránky [aria] navbar=Navigační lišta @@ -2517,7 +2518,7 @@ diff.comment.add_single_comment=Přidat jeden komentář diff.comment.add_review_comment=Přidat komentář diff.comment.start_review=Začít posuzování diff.comment.reply=Odpovědět -diff.review=Posouzení +diff.review=Dokončit posouzení diff.review.header=Odeslat posouzení diff.review.placeholder=Posoudit komentář diff.review.comment=Okomentovat @@ -2749,6 +2750,10 @@ settings.sourcehut_builds.secrets = Tajné klíče settings.sourcehut_builds.secrets_helper = Udělit práci přístup k tajným klíčům sestavení (vyžaduje oprávnění SECRETS:RO) settings.graphql_url = URL GraphQL settings.sourcehut_builds.access_token_helper = Přístupový token, který má oprávnění JOBS:RW. Vygenerujte token builds.sr.ht nebo token builds.sr.ht s přístupem k tajným klíčům na meta.sr.ht. +settings.matrix.room_id_helper = ID místnosti lze získat z webového klienta Element > Nastavení místnosti > Rozšířené > Interní ID místnosti. Příklad: %s. +settings.matrix.access_token_helper = Pro tuto akci je doporučeno vytvořit oddělený účet Matrix. Přístupový token lze získat z webového klienta Element (v soukromé/anonymní kartě) > Uživatelské menu (vlevo nahoře) > Všechna nastavení > O aplikaci a pomoc > Rozšířené > Přístupový token (přímo pod adresou domovského serveru). Soukromou/anonymní kartu zavřete (odhlášením token zneplatníte). +release.hide_archive_links = Skrýt automaticky generované archivy +release.hide_archive_links_helper = Pro toto vydání skrýt automaticky generované archivy zdrojového kódu. Užitečné například pokud nahráváte své vlastní. [graphs] component_loading_info = Tohle může chvíli trvat… diff --git a/options/locale/locale_de-DE.ini b/options/locale/locale_de-DE.ini index 7cc59a9d63..07ea493409 100644 --- a/options/locale/locale_de-DE.ini +++ b/options/locale/locale_de-DE.ini @@ -157,6 +157,7 @@ filter.public = Öffentlich filter.private = Privat more_items = Mehr Einträge invalid_data = Ungültige Daten: %v +copy_generic = In die Zwischenablage kopieren [aria] navbar=Navigationsleiste @@ -644,13 +645,13 @@ change_avatar=Profilbild ändern … joined_on=Beigetreten am %s repositories=Repositorys activity=Öffentliche Aktivität -followers_few=%d follower +followers_few=%d Follower starred=Favorisierte Repositorys watched=Beobachtete Repositorys code=Quelltext projects=Projekte overview=Übersicht -following_few=%d folge ich +following_few=%d Folge ich follow=Folgen unfollow=Nicht mehr folgen user_bio=Biografie @@ -672,7 +673,7 @@ follow_blocked_user = Du kannst diesen Benutzer nicht folgen, weil du ihn blocki block_user.detail_3 = Dieser Benutzer kann dich nicht als einen Mitarbeiter hinzufügen, und du kannst ihn nicht als Mitarbeiter hinzufügen. unblock = Nicht mehr blockieren followers_one = %d Follower -following_one = einem gefolgt +following_one = %d Folge ich [settings] profile=Profil @@ -2514,7 +2515,7 @@ diff.comment.add_single_comment=Einzelnen Kommentar hinzufügen diff.comment.add_review_comment=Kommentar hinzufügen diff.comment.start_review=Review starten diff.comment.reply=Antworten -diff.review=Reviewen +diff.review=Review abschließen diff.review.header=Review einreichen diff.review.placeholder=Kommentar zum Review diff.review.comment=Kommentieren @@ -2735,6 +2736,8 @@ settings.graphql_url = GraphQL-URL settings.matrix.room_id_helper = Die Raum-ID kann über den Element-Webclient ermittelt werden: Raumeinstellungen > Erweitert > Interne Raum-ID. Beispielsweise %s. settings.sourcehut_builds.access_token_helper = Zugangstoken der die JOBS:RW-Freigabe hat. Generiere auf meta.sr.ht einen builds.sr.ht-Token oder einen builds.sr.ht-Token mit Zugriff auf die Secrets. settings.matrix.access_token_helper = Es wird empfohlen, einen dedizierten Matrix-Account hierfür anzulegen. Der Zugangstoken kann in einem Incognito-Tab über den Element-Webclient geholt werden: Benutzermenü (oben links) > Alle Einstellungen > Hilfe & Über > Erweitert > Zugangstoken (direkt unter der Homeserver-URL). Schließe das Incognito-Tab dann (Abmelden würde den Token ungültig werden lassen). +release.hide_archive_links = Automatisch generierte Archive verstecken +release.hide_archive_links_helper = Verstecke automatisch generierte Quellcodearchive für diesen Release. Zum Beispiel, wenn du deine eigenen hochlädst. [graphs] diff --git a/options/locale/locale_fi-FI.ini b/options/locale/locale_fi-FI.ini index b56d9c8967..1560075d6b 100644 --- a/options/locale/locale_fi-FI.ini +++ b/options/locale/locale_fi-FI.ini @@ -114,14 +114,40 @@ concept_user_organization=Organisaatio name=Nimi +enable_javascript = Tämä sivu vaatii Javascriptin. +new_project_column = Uusi sarake +retry = Yritä uudelleen +copy_type_unsupported = Tätä tiedostotyyppiä ei voi kopioida +locked = Lukittu +filter = Suodatin +filter.is_archived = Arkistoitu +filter.not_archived = Ei arkistoitu +filter.public = Julkinen +filter.private = Yksityinen +copy_content = Kopioi sisältö +download_logs = Lataa lokit +show_full_screen = Näytä koko näytössä +unknown = Tuntematon +show_timestamps = Näytä aikaleimat +show_log_seconds = Näytä sekunnit +copy_generic = Kopioi leikepöydälle [aria] +footer.links = Linkit [heatmap] +less = Vähemmän +more = Enemmän [editor] +buttons.code.tooltip = Lisää koodia +buttons.link.tooltip = Lisää linkki +buttons.mention.tooltip = Mainitse käyttäjä tai tiimi +buttons.list.task.tooltip = Lisää tehtävälista [filter] +string.asc = A - Ö +string.desc = Ö - A [error] occurred=Virhe tapahtui diff --git a/options/locale/locale_fil.ini b/options/locale/locale_fil.ini index 68dbab40a4..45430fe366 100644 --- a/options/locale/locale_fil.ini +++ b/options/locale/locale_fil.ini @@ -140,6 +140,7 @@ home = Panimula dashboard = Dashboard more_items = Higit pang mga item invalid_data = Hindi wastong datos: %v +copy_generic = Kopyahin sa clipboard [home] search_repos = Maghanap ng Repository… @@ -592,6 +593,12 @@ admin_cannot_delete_self = Hindi mo maaring burahin ang sarili mo kapag isa kang required_prefix = Ang input ay dapat magsimula sa "%s" FullName = Buong pangalan Description = Paglalarawan +Pronouns = Mga panghalip +Website = Website +To = Pangalan ng branch +AccessToken = Token ng pag-access +Biography = Byograpya +Location = Lokasyon [user] joined_on = Sumali noong %s @@ -922,7 +929,7 @@ remove_account_link_success = Tinanggal na ang naka-link na account. visibility.limited_tooltip = Makikita lamang ng mga naka-authenticate na user webauthn_delete_key_desc = Kapag magtanggal ka ng security key hindi ka na makaka-sign in gamit niyan. Magpatuloy? manage_account_links_desc = Ang mga panlabas na account na ito ay naka-link sa iyong Forgejo account. -hooks.desc = Magdagdag mg mga webhook na mati-trigger para sa lahat ng mga repositoryo na minamay-ari mo. +hooks.desc = Magdagdag ng mga webhook na mati-trigger para sa lahat ng mga repositoryo na minamay-ari mo. orgs_none = Hindi ka isang miyembro ng anumang mga organisasyon. oauth2_application_create_description = Ang mga OAuth2 application ay pinapayagan ang mga third-party na aplikasyon na i-access ang mga user account sa instansya na ito. oauth2_application_locked = Ang Forgejo ay pini-pre register ang ibang mga OAuth2 application sa startup kapag naka-enable sa config. Para iwasan ang hindi inaasahang gawain, hindi ito maaring i-edit o tanggalin. Mangyaring sumangguni sa dokumentasyon ng OAuth2 para sa karagdagang impormasyon. @@ -1429,6 +1436,12 @@ milestones.title = Pamagat milestones.desc = paglalarawan pulls.blocked_by_user = Hindi ka makakagawa ng [pull request] sa [repository] na ito dahil hinarang ka ng may-ari ng [repository]. pulls.no_merge_access = Hindi ka pinapayagang isali ang [pull request] na ito. +editor.commit_directly_to_this_branch = Direktang mag-commit sa branch na %s. +editor.branch_already_exists = Umiiral na ang branch na "%s" sa repositoryo na ito. +editor.file_editing_no_longer_exists = Ang file na ine-edit, "%s", ay hindi na umiiral sa repositoryo na ito. +editor.filename_is_a_directory = Ang pangalan ng file "%s" ay ginagamit na bilang pangalan ng direktoryo sa repositoryo na ito. +editor.file_is_a_symlink = `Ang %s ay isang symbolink link. Hindi mae-edit ang mga symbolic link sa web editor` +editor.directory_is_a_file = Ang pangalan ng direktoryo "%s" ay ginagamit na bilang pangalan ng file sa repositoryo na ito. [search] commit_kind = Maghanap ng mga commit... @@ -1690,6 +1703,31 @@ repos.owner = May-ari repos.lfs_size = Laki ng LFS packages.package_manage_panel = Ipamahala ang mga package auths.attribute_mail = Attribute ng email +config.server_config = Configuration ng server +config.app_name = Pangalan ng instansya +config.lfs_root_path = Root path ng LFS +config.log_file_root_path = Path ng log +config.ssh_root_path = Root path +config.script_type = Uri ng script +config.reverse_auth_user = Authentication user ng reverse proxy +config.ssh_domain = Server domain ng SSH +config.custom_conf = File path ng configuration +config.app_url = Base URL +config.offline_mode = Lokal na mode +config.ssh_port = Port +config.custom_file_root_path = Pasadyang root path ng file +config.domain = Domain ng server +config.disable_router_log = I-disable ang router log +config.run_user = User na tatakbo bilang +config.run_mode = Mode ng pagtakbo +config.app_data_path = Path ng data ng app +config.repo_root_path = Root path ng repositoryo +config.ssh_config = Configuration ng SSH +config.ssh_enabled = Naka-enable +config.ssh_start_builtin_server = Gamitin ang built-in server +config.ssh_listen_port = Listen port +config.ssh_keygen_path = Path ng keygen ("ssh-keygen") +config.ssh_key_test_path = Path ng key test [org] repo_updated = Binago diff --git a/options/locale/locale_fr-FR.ini b/options/locale/locale_fr-FR.ini index 03100f722a..4ffccbca44 100644 --- a/options/locale/locale_fr-FR.ini +++ b/options/locale/locale_fr-FR.ini @@ -151,13 +151,14 @@ filter.not_fork = Non dupliqué filter.not_mirror = Non répliqué filter.is_template = Modèle filter.not_template = Pas un modèle -filter.public = Public +filter.public = Publique filter.private = Privé filter = Filtre filter.is_mirror = Répliqué toggle_menu = Menu va-et-vient more_items = Plus d'éléments invalid_data = Données invalides : %v +copy_generic = Copier dans le presse-papiers [aria] navbar=Barre de navigation @@ -633,6 +634,14 @@ admin_cannot_delete_self=Vous ne pouvez pas vous supprimer vous-même lorsque vo unsupported_login_type = Ce type de compte ne peut être supprimé. unset_password = L'utilisateur connecté n'a pas de mot de passe. required_prefix = Le texte entré doit commencer par "%s" +AccessToken = Jeton d'accès +FullName = Nom complet +Description = Description +Pronouns = Qualités +Biography = Biographie +Website = Site web +Location = Emplacement +To = Nom de la branche [user] change_avatar=Changer votre avatar… @@ -1255,7 +1264,7 @@ video_not_supported_in_browser=Votre navigateur ne supporte pas la balise « vi audio_not_supported_in_browser=Votre navigateur ne supporte pas la balise « audio » HTML5. stored_lfs=Stocké avec Git LFS symbolic_link=Lien symbolique -executable_file=Fichiers exécutables +executable_file=Fichier exécutable vendored=Externe generated=Générée commit_graph=Graphe des révisions @@ -1437,7 +1446,7 @@ issues.new.no_items=Pas d'élément issues.new.milestone=Jalon issues.new.no_milestone=Sans jalon issues.new.clear_milestone=Effacer le jalon -issues.new.open_milestone=Ouvrir un jalon +issues.new.open_milestone=Jalons ouverts issues.new.closed_milestone=Jalons fermés issues.new.assignees=Assignés issues.new.clear_assignees=Supprimer les affectations @@ -2311,9 +2320,9 @@ settings.authorization_header_desc=Si présent, sera ajouté aux requêtes comme settings.active=Actif settings.active_helper=Les informations sur les événements déclenchés seront envoyées à cette url de Webhook. settings.add_hook_success=Nouveau Webhook ajouté. -settings.update_webhook=Actualiser le déclencheur +settings.update_webhook=Actualiser le déclencheur « webhook » settings.update_hook_success=Déclencheur Web actualisé. -settings.delete_webhook=Retirer le webhook +settings.delete_webhook=Retirer le déclencheur settings.recent_deliveries=Livraisons récentes settings.hook_type=Type de déclencheur settings.slack_token=Jeton @@ -2361,13 +2370,13 @@ settings.protected_branch_can_push_no=Vous ne pouvez pas pousser settings.branch_protection=Paramètres de protection pour les branches du motif "%s" settings.protect_this_branch=Activer la protection de branche settings.protect_this_branch_desc=Empêche les suppressions et limite les poussées et fusions sur cette branche. -settings.protect_disable_push=Désactiver la soumission +settings.protect_disable_push=Désactiver la soumission (push) settings.protect_disable_push_desc=Aucune soumission ne sera possible sur cette branche. -settings.protect_enable_push=Activer la soumission +settings.protect_enable_push=Activer la soumission (push) settings.protect_enable_push_desc=Toute personne ayant un accès en écriture sera autorisée à soumettre sur cette branche (sans forcer). settings.protect_enable_merge=Activer la fusion settings.protect_enable_merge_desc=Toute personne ayant un accès en écriture sera autorisée à fusionner les demandes d'ajout dans cette branche. -settings.protect_whitelist_committers=Liste blanche des soumissions +settings.protect_whitelist_committers=Liste blanche des soumissions (push) settings.protect_whitelist_committers_desc=Seuls les utilisateurs ou les équipes autorisés pourront soumettre sur cette branche (sans forcer). settings.protect_whitelist_deploy_keys=Mettez les clés de déploiement sur liste blanche avec accès en écriture pour soumettre. settings.protect_whitelist_users=Utilisateurs sur liste blanche : @@ -2378,7 +2387,7 @@ settings.protect_merge_whitelist_committers=Activer la liste blanche pour la fus settings.protect_merge_whitelist_committers_desc=N'autoriser que les utilisateurs et les équipes en liste blanche d'appliquer les demandes de fusion sur cette branche. settings.protect_merge_whitelist_users=Utilisateurs en liste blanche de fusion : settings.protect_merge_whitelist_teams=Équipes en liste blanche de fusion : -settings.protect_check_status_contexts=Activer le contrôle qualité +settings.protect_check_status_contexts=Activer le contrôle de status settings.protect_status_check_patterns=Motifs de vérification des statuts : settings.protect_status_check_patterns_desc=Entrez des motifs pour spécifier quelles vérifications doivent réussir avant que des branches puissent être fusionnées. Un motif par ligne. Un motif ne peut être vide. settings.protect_check_status_contexts_desc=Exiger le status « succès » avant de fusionner. Quand activée, une branche protégée ne peux accepter que des soumissions ou des fusions ayant le status « succès ». Lorsqu'il n'y a pas de contexte, la dernière révision fait foi. @@ -2396,7 +2405,7 @@ settings.dismiss_stale_approvals=Révoquer automatiquement les approbations pér settings.dismiss_stale_approvals_desc=Lorsque des nouvelles révisions changent le contenu de la demande d’ajout, les approbations existantes sont révoquées. settings.ignore_stale_approvals=Ignorer les approbations obsolètes settings.ignore_stale_approvals_desc=Ignorer les approbations d’anciennes révisions (évaluations obsolètes) du décompte des approbations de la demande d’ajout. Non pertinent quand les évaluations obsolètes sont déjà révoquées. -settings.require_signed_commits=Exiger des révisions signées +settings.require_signed_commits=Exiger des révisions (commits) signées settings.require_signed_commits_desc=Rejeter les soumissions sur cette branche lorsqu'ils ne sont pas signés ou vérifiables. settings.protect_branch_name_pattern=Motif de nom de branche protégé settings.protect_branch_name_pattern_desc=Motifs de nom de branche protégé. Consultez la documentation pour la syntaxe du motif. Exemples : main, release/** @@ -2404,7 +2413,7 @@ settings.protect_patterns=Motifs settings.protect_protected_file_patterns=Liste des fichiers et motifs protégés (séparés par un point virgule ";") : settings.protect_protected_file_patterns_desc=Les fichiers protégés ne peuvent être modifiés, même si l'utilisateur a le droit d'ajouter, éditer ou supprimer des fichiers dans cette branche. Plusieurs motifs peuvent être séparés par un point-virgule (;). Voir la documentation de github.com/gobwas/glob pour la syntaxe des motifs. Exemples: .forgejo/workflows/test.yml, /docs/**/*.txt. ; », qui ne pourront pas être modifiés même si les utilisateurs disposent des droits sur la branche. Voir la syntaxe glob. Exemples : .drone.yml ; /docs/**/*.txt. settings.protect_unprotected_file_patterns=Liste des fichiers et motifs exclus (séparés par un point virgule ";") : -settings.protect_unprotected_file_patterns_desc=Les fichiers non-protégés qui peuvent être modifiés si l'utilisateur a le droit d'écriture, prenant le pas sur les restrictions de push. Plusieurs motifs peuvent être séparés par un point-virgule (;). Voir la documentation de github.com/gobwas/glob pour la syntaxe des motifs. Exemples: .forgejo/workflows/test.yml, /docs/**/*.txt. ; », qui pourront être modifiés malgré la protection de branche, par les utilisateurs autorisés. Voir la syntaxe Glob. Exemples : .drone.yml ; /docs/**/*.txt. +settings.protect_unprotected_file_patterns_desc=Les fichiers non-protégés qui peuvent être modifiés si l'utilisateur a le droit d'écriture, prenant le pas sur les restrictions de push. Plusieurs motifs peuvent être séparés par un point-virgule (;). Voir la documentation de github.com/gobwas/glob pour la syntaxe des motifs. Exemples: .forgejo/workflows/test.yml, /docs/**/*.txt. ; », qui pourront être modifiés malgré la protection de branche, par les utilisateurs autorisés. Voir la syntaxe Glob. Exemples : .drone.yml ; /docs/**/*.txt. settings.add_protected_branch=Activer la protection settings.delete_protected_branch=Désactiver la protection settings.update_protect_branch_success=La règle de protection de branche "%s" a été mise à jour. @@ -2437,7 +2446,7 @@ settings.tags.protection.allowed.noone=Personne settings.tags.protection.create=Ajouter une règle settings.tags.protection.none=Il n'y a pas d'étiquettes protégées. settings.tags.protection.pattern.description=Vous pouvez utiliser au choix un nom unique, un motif de glob ou une expression régulière qui correspondra à plusieurs étiquettes. Pour plus d’informations, consultez le guide sur les étiquettes protégées. -settings.bot_token=Jeton de bot +settings.bot_token=Jeton (token) de bot settings.chat_id=ID de conversation settings.thread_id=ID du fil settings.matrix.homeserver_url=URL du serveur d'accueil @@ -2725,19 +2734,23 @@ issues.num_participants_one = %d participant issues.archived_label_description = (Archivé) %s settings.add_webhook.invalid_path = L'emplacement ne peut pas contenir ni ".", ni "..", ni être vide, et ne peut pas commencer ou se terminer par un slash. settings.sourcehut_builds.secrets_helper = Permettre au job d'accéder aux secrets de build (nécessite la permission SECRETS:RO) -size_format = %[1]s : %[2]s ; %[3]s : %[4]s +size_format = %[1]s : %[2]s, %[3]s : %[4]s ; %[3]s : %[4]s settings.sourcehut_builds.visibility = Visibilité du job settings.sourcehut_builds.secrets = Secrets -settings.sourcehut_builds.manifest_path = Construire le chemin du manifeste +settings.sourcehut_builds.manifest_path = Chemin du manifest de build settings.sourcehut_builds.graphql_url = URL GraphQL (e.g. https://builds.sr.ht/query) release.download_count_one = %s téléchargement release.download_count_few = %s téléchargements release.system_generated = Cet attachement a été généré automatiquement. -settings.enforce_on_admins_desc = Les administrateurs du dépôt ne peuvent pas contourner cette règle. -settings.web_hook_name_sourcehut_builds = SourceHut Builds -settings.enforce_on_admins = Contraindre les administrateurs du dépôt par cette règle +settings.enforce_on_admins_desc = Les administrateurs du dépôt ne peuvent pas passer outre cette règle +settings.web_hook_name_sourcehut_builds = Builds SourceHut +settings.enforce_on_admins = Appliquer cette règles aux administrateurs du dépôt settings.rename_branch_failed_protected = Impossible de renommer la branche %s car il s'agit d'une branche protégée. settings.event_pull_request_enforcement = Amélioration +settings.graphql_url = URL GraphQL +settings.matrix.room_id_helper = L'identifiant du salon peut être obtenu dans le client web Element. Par exemple : %s. +settings.sourcehut_builds.access_token_helper = Un jeton d'accès ayant des permissions JOBS:RW. Génère un jeton builds.sr.ht ou un jeton builds.sr.ht token ayant accès aux secrets sur meta.sr.ht. +settings.matrix.access_token_helper = Il est recommandé de créer un compte Matrix dédié pour cela. Le jeton d'accès peut être obtenu depuis le client web Element (dans un onglet privé/incognito). Il faut ensuite fermer l'onglet privé/icognito (se déconnecter invaliderait le jeton). [graphs] component_loading=Chargement de %s… @@ -2951,7 +2964,7 @@ dashboard.heap_memory_released=Mémoire tas (Heap) libérée dashboard.heap_objects=Objets tas (Heap) dashboard.bootstrap_stack_usage=Utilisation pile bootstrap dashboard.stack_memory_obtained=Mémoire pile obtenue -dashboard.mspan_structures_usage=Utilisation des Structures MSpan +dashboard.mspan_structures_usage=Utilisation des structures MSpan dashboard.mspan_structures_obtained=Structures MSpan obtenues dashboard.mcache_structures_usage=Utilisation des structures MCache dashboard.mcache_structures_obtained=Structures MCache obtenues @@ -3026,9 +3039,9 @@ users.list_status_filter.reset=Réinitialiser users.list_status_filter.is_active=Actif users.list_status_filter.not_active=Inactif users.list_status_filter.is_admin=Administrateur -users.list_status_filter.not_admin=Non Administrateur +users.list_status_filter.not_admin=Non administrateur users.list_status_filter.is_restricted=Restreint -users.list_status_filter.not_restricted=Non restraint +users.list_status_filter.not_restricted=Non restreint users.list_status_filter.is_prohibit_login=Interdit de connexion users.list_status_filter.not_prohibit_login=Autorisé à se connecter users.list_status_filter.is_2fa_enabled=2FA Activé @@ -3112,7 +3125,7 @@ auths.attribute_username=Attribut nom d'utilisateur auths.attribute_username_placeholder=Laisser vide afin d'utiliser le nom d'utilisateur spécifié dans Forgejo. auths.attribute_name=Attribut prénom auths.attribute_surname=Attribut nom de famille -auths.attribute_mail=Attribut e-mail +auths.attribute_mail=Attribut courriel auths.attribute_ssh_public_key=Attribut clef SSH publique auths.attribute_avatar=Attribut de l'avatar auths.attributes_in_bind=Aller chercher les attributs dans le contexte de liaison DN @@ -3227,7 +3240,7 @@ config.repo_root_path=Emplacement des Dépôts config.lfs_root_path=Répertoire racine LFS config.log_file_root_path=Chemin des fichiers logs config.script_type=Type de script -config.reverse_auth_user=Annuler l'authentification de l'utilisateur +config.reverse_auth_user=Annuler l'authentification par proxy de l'utilisateur config.ssh_config=Configuration SSH config.ssh_enabled=Activé @@ -3297,10 +3310,10 @@ config.mailer_sendmail_args=Arguments supplémentaires pour Sendmail config.mailer_sendmail_timeout=Délai d’attente de Sendmail config.mailer_use_dummy=Factice config.test_email_placeholder=E-mail (ex: test@example.com) -config.send_test_mail=Envoyer un e-mail de test +config.send_test_mail=Envoyer un courriel de test config.send_test_mail_submit=Envoyer -config.test_mail_failed=Impossible d'envoyer un email de test à "%s" : %v -config.test_mail_sent=Un e-mail de test a été envoyé à "%s". +config.test_mail_failed=Impossible d'envoyer un courriel de test à "%s" : %v +config.test_mail_sent=Un courriel de test a été envoyé à "%s". config.oauth_config=Configuration OAuth config.oauth_enabled=Activé @@ -3308,7 +3321,7 @@ config.oauth_enabled=Activé config.cache_config=Configuration du cache config.cache_adapter=Adaptateur du cache config.cache_interval=Intervales du cache -config.cache_conn=Liaison du Cache +config.cache_conn=Connexion du cache config.cache_item_ttl=Durée de vie des éléments dans le cache config.session_config=Configuration de session @@ -3374,7 +3387,7 @@ monitor.queue.type=Type monitor.queue.exemplar=Type d'exemple monitor.queue.numberworkers=Nombre de processus monitor.queue.activeworkers=Processus actifs -monitor.queue.maxnumberworkers=Nombre maximale de processus +monitor.queue.maxnumberworkers=Nombre maximal de processus monitor.queue.numberinqueue=Position dans la queue monitor.queue.review_add=Examiner / ajouter des processus monitor.queue.settings.title=Paramètres du réservoir @@ -3390,7 +3403,7 @@ monitor.queue.settings.remove_all_items_done=Tous les éléments de la file d'at notices.system_notice_list=Notifications systèmes notices.view_detail_header=Voir les détails de la notification notices.operations=Opérations -notices.select_all=Tout Sélectionner +notices.select_all=Tout sélectionner notices.deselect_all=Tout désélectionner notices.inverse_selection=Inverser la sélection notices.delete_selected=Supprimer les éléments sélectionnés @@ -3412,11 +3425,13 @@ self_check.database_fix_mysql = Les utilisateurs de MySQL/MariaDB peuvent utilis self_check.no_problem_found=Aucun problème trouvé pour l’instant. self_check.database_collation_mismatch=Exige que la base de données utilise la collation %s. -self_check.database_collation_case_insensitive=La base de données utilise la collation %s, insensible à la casse. Bien que Gitea soit compatible, il peut y avoir quelques rares cas qui ne fonctionnent pas comme prévu. +self_check.database_collation_case_insensitive=La base de données utilise la collation %s, insensible à la casse. Bien que Forgejo soit compatible, il peut y avoir quelques rares cas qui ne fonctionnent pas comme prévu. self_check.database_inconsistent_collation_columns=La base de données utilise la collation %s, mais ces colonnes utilisent des collations différentes. Cela peut causer des problèmes imprévus. -self_check.database_fix_mysql=Pour les utilisateurs de MySQL ou MariaDB, vous pouvez utiliser la commande « gitea doctor convert » dans un terminal ou exécuter une requête du type « ALTER … COLLATE ... » pour résoudre les problèmes de collation. +self_check.database_fix_mysql=Pour les utilisateurs de MySQL ou MariaDB, vous pouvez utiliser la commande « forgejo doctor convert » dans un terminal ou exécuter une requête du type « ALTER … COLLATE ... » pour résoudre les problèmes de collation. config_settings = Paramètres config_summary = Résumé +auths.tips.gmail_settings = Paramètres Gmail : +auths.tip.gitlab_new = Enregistrer une nouvelle application sur https://gitlab.com/-/profile/applications [action] create_repo=a créé le dépôt %s @@ -3530,7 +3545,7 @@ details=Détails details.author=Auteur details.project_site=Site du projet details.repository_site=Site du dépôt -details.documentation_site=Site de documentation +details.documentation_site=Site de la documentation details.license=Licence assets=Ressources versions=Versions @@ -3661,6 +3676,7 @@ owner.settings.chef.keypair.description=Une paire de clés est nécessaire pour rpm.repository = Information sur le dépôt rpm.repository.architectures = Architectures rpm.repository.multiple_groups = Ce paquet est disponible dans plusieurs groupes. +owner.settings.cargo.rebuild.no_index = Incapable de reconstruire, index non initialisé. [secrets] secrets=Secrets @@ -3769,7 +3785,7 @@ variables.creation.success=La variable « %s » a été ajoutée. variables.update.failed=Impossible d’éditer la variable. variables.update.success=La variable a bien été modifiée. runs.no_workflows.quick_start = Vous ne savez pas comment commencer avec Forgejo Action ? Consultez le guide de démarrage rapide. -runs.no_workflows.documentation = Pour plus d’informations sur les Actions Forgejo, voir la documentation. +runs.no_workflows.documentation = Pour plus d’informations sur Forgejo Actions, voir la documentation. variables.id_not_exist = La variable numéro %d n’existe pas. runs.workflow = Workflow @@ -3804,14 +3820,14 @@ recent_commits.what = commits récents search = Rechercher... type_tooltip = Type de recherche fuzzy = Approximatif -code_search_by_git_grep = Les résultats de recherche dans le code sont fournis par "git grep". Les résultats pourraient être plus pertinents si l'administrateur du site active les indexeurs de dépôt. +code_search_by_git_grep = Les résultats de recherche dans le code sont fournis par "git grep". Les résultats pourraient être plus pertinents si l'administrateur du site active les indexeurs de code source. runner_kind = Chercher les runners... no_results = Aucun résultat n'a été trouvé. keyword_search_unavailable = La recherche par mot-clé n'est pas disponible actuellement. Veuillez contacter l'administrateur du site. fuzzy_tooltip = Inclure les résultats proches des termes recherchés match = Correspondance match_tooltip = Uniquement inclure les résultats correspondant exactement aux termes recherchés -repo_kind = Chercher dans le dépôt... +repo_kind = Chercher dans les dépôt... user_kind = Chercher les utilisateurs... org_kind = Chercher les organisations... team_kind = Chercher les équipes... @@ -3821,3 +3837,12 @@ package_kind = Chercher les paquets... project_kind = Chercher les projets... branch_kind = Chercher les branches... commit_kind = Chercher les commits... + + +[munits.data] +b = o + +[markup] +filepreview.line = Ligne %[1]d dans %[2]s +filepreview.lines = Lignes %[1]d jusqu'à %[2]d dans %[3]s +filepreview.truncated = L'aperçu a été tronqué \ No newline at end of file diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini index e2ac989ae0..d6137f39fe 100644 --- a/options/locale/locale_ja-JP.ini +++ b/options/locale/locale_ja-JP.ini @@ -143,13 +143,13 @@ confirm_delete_selected=選択したすべてのアイテムを削除してよ name=名称 value=値 filter.is_archived = アーカイブ -filter.not_archived = 非アーカイブ +filter.not_archived = アーカイブされていない filter.is_fork = フォーク filter.is_mirror = ミラー -filter.not_mirror = 非ミラー +filter.not_mirror = ミラーされていない filter.is_template = テンプレート filter = フィルター -filter.not_fork = 非フォーク +filter.not_fork = フォークされていない filter.clear = フィルタをクリアする filter.public = 公開 filter.private = 非公開 @@ -157,6 +157,7 @@ toggle_menu = トグルメニュー filter.not_template = テンプレートではない invalid_data = 無効なデータ: %v more_items = さらに表示 +copy_generic = クリップボード [aria] navbar=ナビゲーションバー @@ -169,6 +170,8 @@ number_of_contributions_in_the_last_12_months=過去 12 か月間で %s 件の contributions_zero=貢献なし less=少 more=多 +contributions_one = 貢献 +contributions_few = 貢献 [editor] buttons.heading.tooltip=見出し追加 @@ -240,7 +243,7 @@ err_admin_name_pattern_not_allowed=管理者のユーザー名が不正です。 err_admin_name_is_invalid=管理者のユーザー名が不正です general_title=基本設定 -app_name=インスタンスの名前 +app_name=インスタンス名 app_name_helper=企業名をここに入れることができます。 repo_path=リポジトリのルートパス repo_path_helper=リモートGitリポジトリはこのディレクトリに保存されます。 @@ -332,7 +335,7 @@ switch_dashboard_context=ダッシュボードのコンテキスト切替 my_repos=リポジトリ show_more_repos=リポジトリをさらに表示… collaborative_repos=共同リポジトリ -my_orgs=自分の組織 +my_orgs=組織 my_mirrors=自分のミラー view_home=%s を表示 search_repos=リポジトリを探す… @@ -373,6 +376,10 @@ code_search_results=`"%s" の検索結果` code_last_indexed_at=最終取得 %s relevant_repositories_tooltip=フォークリポジトリや、トピック、アイコン、説明のいずれも無いリポジトリは表示されません。 relevant_repositories=妥当と思われるリポジトリのみを表示しています。 フィルタリングしない結果を表示。 +stars_few = %d のスター +stars_one = %d のスター +forks_one = %d のフォーク +forks_few = %d のフォーク [auth] create_new_account=アカウントを登録 @@ -448,11 +455,13 @@ change_unconfirmed_email = 登録時に間違ったメール アドレスを入 change_unconfirmed_email_error = メール アドレスを変更できません: %v change_unconfirmed_email_summary = アクティベーションメールの送信先メールアドレスを変更します。 last_admin=最後の管理者は削除できません。少なくとも一人の管理者が必要です。 +tab_signin = サインイン +tab_signup = サインアップ [mail] view_it_on=%s で見る reply=またはこのメールに直接返信してください -link_not_working_do_paste=開かないですか? コピーしてブラウザーに貼り付けてみてください。 +link_not_working_do_paste=リンクが開きませんか? コピーしてブラウザーのURLバーに貼り付けてみてください。 hi_user_x=こんにちは、%s さん。 activate_account=あなたのアカウントをアクティベートしてください。 @@ -468,7 +477,7 @@ register_notify=Forgejoへようこそ register_notify.title=%[1]s さん、%[2]s にようこそ register_notify.text_1=これは %s への登録確認メールです! register_notify.text_2=あなたはユーザー名 %s でログインできるようになりました。 -register_notify.text_3=このアカウントがあなたに作成されたものであれば、最初にパスワードを設定してください。 +register_notify.text_3=他の人があなたのアカウントを作成した場合、最初にパスワードを設定してください。 reset_password=アカウントを回復 reset_password.title=%s さん、あなたのアカウントの復元がリクエストされました @@ -502,8 +511,8 @@ release.downloads=ダウンロード: release.download.zip=ソースコード (ZIP) release.download.targz=ソースコード (TAR.GZ) -repo.transfer.subject_to=%s が "%s" を %s に移転しようとしています -repo.transfer.subject_to_you=%s が "%s" をあなたに移転しようとしています +repo.transfer.subject_to=%s が "%s" を %s に移譲しようとしています +repo.transfer.subject_to_you=%s が "%s" をあなたに移譲しようとしています repo.transfer.to_you=あなた repo.transfer.body=承認または拒否するには %s を開きます。 もしくは単に無視してもかまいません。 @@ -621,6 +630,15 @@ username_error_no_dots = `英数字 (「0-9」、「a-z」、「A-Z」)、ダッ admin_cannot_delete_self=あなたが管理者である場合、自分自身を削除することはできません。最初に管理者権限を削除してください。 unset_password = ログインしたユーザーにパスワードが設定されていません。 unsupported_login_type = このログインタイプでは、アカウントの削除はサポートされていません。 +required_prefix = "%s"から始まる必要があります +AccessToken = アクセストークン +FullName = 氏名 +Description = 説明 +Pronouns = 代名詞 +Biography = 経歴 +Website = ウェブサイト +Location = 場所 +To = ブランチ名 [user] change_avatar=アバターを変更… @@ -628,8 +646,8 @@ joined_on=%sに登録 repositories=リポジトリ activity=公開アクティビティ followers_few=%d フォロワー -starred=スター付きリポジトリ -watched=ウォッチ中リポジトリ +starred=スターを付けたリポジトリ +watched=ウォッチ中のリポジトリ code=コード projects=プロジェクト overview=概要 @@ -654,6 +672,8 @@ block_user = ユーザーをブロック unblock = ブロックを解除 block = ブロック block_user.detail = このユーザーをブロックした場合、下記の事などが起こります。例えば: +followers_one = %d のフォロワー +following_one = %d のフォロワー [settings] profile=プロフィール @@ -682,7 +702,7 @@ password_username_disabled=非ローカルユーザーのユーザー名は変 full_name=フルネーム website=Webサイト location=場所 -update_theme=テーマを更新 +update_theme=テーマを変更 update_profile=プロフィール更新 update_language=言語を更新 update_language_not_found=言語 "%s" は利用できません。 @@ -972,6 +992,14 @@ user_unblock_success = このユーザーをアンブロックするのに成功 blocked_since = %s からブロック中 user_block_success = このユーザーをブロックするのに成功しました。 change_password = パスワードを変更 +pronouns = 代名詞 +pronouns_custom = カスタム +pronouns_unspecified = 未指定 +update_hints = アップデートのヒント +additional_repo_units_hint_description = 利用可能なすべての機能が有効になっていないリポジトリに対して、「機能を追加...」ボタンを表示します。 +update_hints_success = ヒントが更新されました。 +hints = ヒント +additional_repo_units_hint = リポジトリでより多くの機能を有効にすることを推奨する [repo] new_repo_helper=リポジトリには、プロジェクトのすべてのファイルとリビジョン履歴が入ります。 すでにほかの場所でホストしていますか? リポジトリを移行 もどうぞ。 @@ -2660,8 +2688,50 @@ settings.units.add_more = さらに... settings.wiki_globally_editable = 誰にでもWikiの編集を許す settings.confirmation_string = 確認 settings.wiki_rename_branch_main_notices_1 = この操作は 取り消しできません 。 +stars = スター +n_tag_few = %s のタグ +settings.graphql_url = GraphQL URL +n_branch_one = %s のブランチ +settings.units.units = リポジトリ機能 +settings.wiki_rename_branch_main_notices_2 = これにより、%s のリポジトリ wiki の内部ブランチの名前が永久に変更されます。既存のチェックアウトを更新する必要があります。 +settings.sourcehut_builds.access_token_helper = JOBS:RW 権限を持つアクセス トークン。meta.sr.ht で builds.sr.ht トークン または シークレット アクセスを持つ builds.sr.ht トークン を生成します。 +settings.enforce_on_admins = リポジトリ管理者にこのルールを適用する +activity.navbar.code_frequency = コードの更新頻度 +settings.wiki_branch_rename_failure = リポジトリ wiki のブランチ名を正規化できませんでした。 +settings.ignore_stale_approvals = 古い承認を無視する +open_with_editor = %s で開く +release.download_count_one = %s のダウンロード +release.download_count_few = %s のダウンロード +release.system_generated = この添付ファイルは自動的に生成されます。 +settings.archive.mirrors_unavailable = リポジトリがアーカイブされている場合、ミラーは利用できません。 +settings.rename_branch_failed_protected = 保護されたブランチのため、ブランチ %s の名前を変更できません。 +n_tag_one = %s のタグ +n_branch_few = %s のブランチ +n_commit_few = %s のコミット +settings.confirm_wiki_branch_rename = Wikiブランチの名前を変更する +settings.add_collaborator_blocked_our = リポジトリ所有者が共同作業者をブロックしているため、共同作業者を追加できません。 +settings.sourcehut_builds.visibility = ジョブの可視性 +settings.sourcehut_builds.secrets = シークレット +settings.ignore_stale_approvals_desc = 古いコミット (古いレビュー) に対して行われた承認を、PR の承認数にカウントしないでください。古いレビューがすでに却下されている場合は関係ありません。 +settings.enforce_on_admins_desc = リポジトリ管理者はこのルールを回避できません。 +release.hide_archive_links = 自動生成されたアーカイブを非表示にする +n_commit_one = %s のコミット +settings.wiki_branch_rename_success = リポジトリ wiki のブランチ名が正常に正規化されました。 +settings.add_collaborator_blocked_them = リポジトリ所有者がブロックされているため、共同作業者を追加できません。 +settings.add_webhook.invalid_path = パスには「.」や「..」や空の文字列を含めることはできません。また、スラッシュで開始または終了することはできません。 +settings.sourcehut_builds.manifest_path = Build manifestのパス +settings.sourcehut_builds.secrets_helper = ジョブにビルドシークレットへのアクセス権を付与します (SECRETS:RO 権限が必要です) +release.hide_archive_links_helper = このリリース用に自動的に生成されたソース コード アーカイブを非表示にします。たとえば、独自のソース コードをアップロードする場合などです。 +error.broken_git_hook = このリポジトリの Git フックが壊れているようです。ドキュメントに従って修正し、コミットをいくつかプッシュしてステータスを更新してください。 [graphs] +component_loading = %s の読み込み中... +component_loading_failed = %s を読み込めませんでした +component_loading_info = 少し時間がかかるかもしれません… +component_failed_to_load = 予期しないエラーが発生しました。 +code_frequency.what = コード頻度 +contributors.what = 貢献者 +recent_commits.what = 最近のコミット [org] org_name_holder=組織名 @@ -2786,6 +2856,7 @@ teams.all_repositories_admin_permission_desc=このチームはすべて teams.invite.title=あなたは組織 %[2]s 内のチーム %[1]s への参加に招待されました。 teams.invite.by=%s からの招待 teams.invite.description=下のボタンをクリックしてチームに参加してください。 +follow_blocked_user = この組織によってブロックされているため、この組織をフォローすることはできません。 [admin] dashboard=ダッシュボード @@ -3314,6 +3385,13 @@ notices.type_2=タスク notices.desc=説明 notices.op=操作 notices.delete_success=システム通知を削除しました。 +config.open_with_editor_app_help = クローン メニューの「~で開く」エディター。空のままにすると、デフォルトが使用されます。展開してデフォルトを表示します。 +dashboard.sync_repo_tags = Gitデータからデータベースにタグを同期する +dashboard.sync_tag.started = タグの同期が開始されました +self_check = セルフチェック +auths.tips.gmail_settings = Gmail設定: +self_check.no_problem_found = まだ問題は見つかりません。 +auths.tip.gitlab_new = https://gitlab.com/-/profile/applications で新しいアプリケーションを登録します [action] @@ -3555,6 +3633,8 @@ owner.settings.cleanuprules.success.delete=クリーンアップルールが削 owner.settings.chef.title=Chefレジストリ owner.settings.chef.keypair=キーペアを生成 owner.settings.chef.keypair.description=Chefレジストリの認証にはキーペアが必要です。 すでにキーペアを生成していた場合、新しいキーペアを生成すると古いキーペアは破棄されます。 +rpm.repository.multiple_groups = このパッケージは複数のグループで利用できます。 +owner.settings.cargo.rebuild.no_index = 再構築できません、インデックスが初期化されていません。 [secrets] secrets=シークレット @@ -3665,6 +3745,7 @@ runs.no_workflows.quick_start = Forgejo Action の始め方がわからない? runs.no_workflows.documentation = Forgejo Action の詳細については、ドキュメントを参照してください。 variables.id_not_exist = idが%dの変数は存在しません。 runs.workflow = ワークフロー +runs.no_job_without_needs = ワークフローには、依存関係のないジョブが少なくとも 1 つ含まれている必要があります。 [projects] type-1.display_name=個人プロジェクト @@ -3685,3 +3766,32 @@ submodule=サブモジュール [search] search = 検索... type_tooltip = 検索タイプ +org_kind = 組織の検索... +code_kind = コードの検索... +fuzzy = あいまい +repo_kind = リポジトリの検索... +code_search_unavailable = コード検索は現在利用できません。サイト管理者にお問い合わせください。 +branch_kind = ブランチの検索... +commit_kind = コミットの検索... +user_kind = ユーザーの検索... +team_kind = チームの検索... +code_search_by_git_grep = 現在のコード検索結果は「git grep」によって提供されます。サイト管理者がコード インデクサーを有効にすると、より良い結果が得られる可能性があります。 +package_kind = パッケージの検索... +project_kind = プロジェクトの検索... +keyword_search_unavailable = キーワードによる検索は現在ご利用いただけません。サイト管理者にお問い合わせください。 +runner_kind = ランナーの検索... +no_results = 一致する結果が見つかりませんでした。 + + +[munits.data] +pib = PiB +tib = TiB +eib = EiB +kib = KiB +mib = MiB +gib = GiB +b = B + +[markup] +filepreview.lines = %[3]s の %[1]d 行目から %[2]d 行目 +filepreview.line = %[2]s の %[1]d 行目 \ No newline at end of file diff --git a/options/locale/locale_ko-KR.ini b/options/locale/locale_ko-KR.ini index cd31df2dcb..4d0218bd24 100644 --- a/options/locale/locale_ko-KR.ini +++ b/options/locale/locale_ko-KR.ini @@ -84,6 +84,9 @@ concept_user_organization=조직 name=이름 +active_stopwatch = 진행중인 타임 트래커 +sign_in_with_provider = %으로 로그인 +logo = 로고 [aria] diff --git a/options/locale/locale_pl-PL.ini b/options/locale/locale_pl-PL.ini index ba9f6765a8..38109eb2c3 100644 --- a/options/locale/locale_pl-PL.ini +++ b/options/locale/locale_pl-PL.ini @@ -117,10 +117,56 @@ logo = Logo sign_in_with_provider = Zaloguj się za pomocą %s enable_javascript = Ta strona wymaga JavaScript. value = Wartość +remove_label_str = Usuń element "%s" +locked = Zablokowany +copy_type_unsupported = Ten plik nie może być skopiowany +pin = Przypnij +new_project_column = Nowa kolumna +rerun = Uruchom ponownie +rerun_all = Uruchom ponownie wszystkie zadania +retry = Ponów +view = Widok +go_back = Wróć +filter = Filtr +confirm_delete_artifact = Jesteś penwy że chcesz usunąć artefakt "%s"? +concept_system_global = Globalne +concept_user_individual = Indywidualny +filter.clear = Wyczyść filtry +copy_hash = Skopiuj hash +copy_content = Skopiuj zawartość +invalid_data = Nieprawidłowe dane: %v +unknown = Nieznane +rss_feed = Kanał RSS +unpin = Odepnij +artifacts = Artefakty +show_log_seconds = Pokaż sekundy +show_full_screen = Pokaż pełny ekran +download_logs = Pobierz logi +confirm_delete_selected = Potwierdzić usunięcie wszystkich wybranych elementów? +filter.is_template = Szablon +filter.public = Publiczne +filter.private = Prywatne +copy_generic = Skopiuj do schowka +toggle_menu = Przełącz menu +tracked_time_summary = Podsumowanie śledzonego czasu na podstawie filtrów listy problemów +show_timestamps = Pokaż znaczniki czasu +filter.not_archived = Nie zarchiwizowane +filter.not_mirror = Nie lustrzane odbicie +filter.not_template = Nie szablon +filter.is_archived = Zarchiwizowane +filter.is_mirror = Lustrzane odbicie +more_items = Więcej elementów [aria] +navbar = Pasek nawigacji +footer = Stopka +footer.software = O Oprogramoiwaniu +footer.links = Linki [heatmap] +contributions_format = {contributions} w dniu {month} {day}, {year} +less = Mniej +more = Więcej [editor] buttons.heading.tooltip = Dodaj nagłówek @@ -135,8 +181,12 @@ buttons.list.task.tooltip = Dodaj listę zadań buttons.ref.tooltip = Dodaj odniesienie do zgłoszenia lub pull requestu buttons.mention.tooltip = Dodaj wzmiankę o użytkowniku lub zespole buttons.switch_to_legacy.tooltip = Zamiast tego użyj starego edytora +buttons.disable_monospace_font = Wyłącz czcionkę monospace +buttons.enable_monospace_font = Włącz czcionkę monospace [filter] +string.asc = A - Z +string.desc = Z - A [error] occurred=Wystąpił błąd @@ -145,16 +195,18 @@ invalid_csrf=Błędne żądanie: nieprawidłowy token CSRF not_found=Nie można odnaleźć celu. network_error=Błąd sieci report_message = Jeśli podejrzewasz że jest to bug w Forgejo, przeszukaj zgłoszenia na Codeberg lub otwórz nowe zgłoszenie w razie potrzeby. +server_internal = Wewnętrzny błąd serwera [startpage] app_desc=Bezbolesna usługa Git na własnym serwerze install=Łatwa instalacja platform=Wieloplatformowość -platform_desc=Forgejo ruszy gdziekolwiek Go jest możliwe do skompilowania: Windows, macOS, Linux, ARM, itd. Wybierz swój ulubiony system! +platform_desc=Forgejo ruszy gdziekolwiek Go jest możliwe do skompilowania: Windows, macOS, Linux, ARM, itd. Wybierz swój ulubiony system! lightweight=Niskie wymagania lightweight_desc=Forgejo ma niskie minimalne wymagania i może działać na niedrogim Raspberry Pi. Oszczędzaj energię swojego komputera! license=Otwarte źródło license_desc=Pobierz na Forgejo! Dołącz do nas dzięki swojemu wkładowi, aby uczynić ten projekt jeszcze lepszym. Nie wstydź się zostać współtwórcą! +install_desc = Po prostu uruchom plik binarny dla swojej platformy, dostarcz ją za pomocą Dockera, lub weż wersjęzapakowaną. [install] install=Instalacja @@ -192,14 +244,14 @@ repo_path=Katalog repozytoriów repo_path_helper=Zdalne repozytoria Git zostaną zapisane w tym katalogu. lfs_path=Ścieżka główna Git LFS lfs_path_helper=W tym katalogu będą przechowywane pliki śledzone za pomocą Git LFS. Pozostaw puste, aby wyłączyć LFS. -run_user=Uruchom jako nazwa użytkownika +run_user=Uruchom jako użytkownik domain=Domena serwera domain_helper=Adres domeny lub hosta serwera. ssh_port=Port serwera SSH -ssh_port_helper=Numer portu, na którym nasłuchuje Twój serwer SSH. Pozostaw puste, aby wyłączyć. -http_port=Port nasłuchiwania HTTP Forgejo -http_port_helper=Numer portu nasłuchiwania serwera Forgejo. -app_url=Podstawowy adres URL Forgejo +ssh_port_helper=Numer portu, który zostanie użyty dla serwera SSH. Pozostaw puste, aby wyłączyć. +http_port=Port nasłuchiwania HTTP +http_port_helper=Numer portu, który będzie używany przez serwer internetowy Forgejo. +app_url=Podstawowy adres URL app_url_helper=Podstawowy adres dla klonowania adresów URL HTTP(S) oraz powiadomień e-mail. log_root_path=Ścieżka dla logów log_root_path_helper=Pliki logów będą zapisywane w tym katalogu. @@ -212,7 +264,7 @@ smtp_from=Wyślij e-mail jako smtp_from_helper=Adres e-mail, z którego Forgejo będzie korzystać. Wpisz prosty adres e-mail, lub użyj formatu "Nazwa" . mailer_user=Nazwa użytkownika SMTP mailer_password=Hasło SMTP -register_confirm=Wymagają potwierdzenia e-mail przy rejestracji +register_confirm=Wymagaj potwierdzenia e-mail przy rejestracji mail_notify=Włącz powiadomienia e-mail server_service_title=Ustawienia serwera i innych usług offline_mode=Włącz tryb lokalny @@ -221,16 +273,16 @@ disable_gravatar=Wyłącz Gravatar disable_gravatar_popup=Wyłącz Gravatar i inne usługi zewnętrzne awatarów. Zostanie zastosowany domyślny awatar, chyba że użytkownik prześle swój własny. federated_avatar_lookup=Włącz zewnętrzne awatary federated_avatar_lookup_popup=Enable federated avatars lookup to use federated open source service based on libravatar. -disable_registration=Wyłącz rejestrację dwuskładnikową +disable_registration=Wyłącz samodzielną rejestrację disable_registration_popup=Wyłącz samodzielną rejestrację użytkowników. Tylko administratorzy będą w stanie tworzyć nowe konta. allow_only_external_registration_popup=Włącz rejestrację wyłącznie za pomocą zewnętrznych usług -openid_signin=Włącz logowanie za pomocą OpenID +openid_signin=Włącz logowanie za pomocą OpenID openid_signin_popup=Włącz logowanie użytkowników za pomocą OpenID. -openid_signup=Włącz samodzielną rejestrację za pomocą OpenID +openid_signup=Włącz samodzielną rejestrację za pomocą OpenID openid_signup_popup=Włącz samodzielną rejestrację opartą o OpenID. enable_captcha=Włącz CAPTCHA przy rejestracji enable_captcha_popup=Wymagaj walidacji CAPTCHA przy samodzielnej rejestracji użytkownika. -require_sign_in_view=Wymagaj zalogowania w celu przeglądania stron +require_sign_in_view=Wymagaj zalogowania się, aby wyświetlić zawartość instancji admin_setting_desc=Tworzenie konta administratora jest opcjonalne. Pierwszy zarejestrowany użytkownik automatycznie zostanie administratorem. admin_title=Ustawienia konta administratora admin_name=Nazwa użytkownika administratora @@ -238,7 +290,7 @@ admin_password=Hasło confirm_password=Potwierdź hasło admin_email=Adres e-mail install_btn_confirm=Zainstaluj Forgejo -test_git_failed=Nie udało się przetestować polecenia „git”: %v +test_git_failed=Nie udało się przetestować polecenia "git": %v sqlite3_not_available=Twoje wydanie Forgejo nie obsługuje SQLite3. Pobierz oficjalne wydanie z %s (NIE wersję "gobuild"). invalid_db_setting=Nieprawidłowe ustawienia bazy danych: %v invalid_repo_path=Ścieżka repozytorium nie jest poprawna: %v @@ -258,15 +310,27 @@ default_enable_timetracking_popup=Domyślnie włącz śledzenie czasu dla nowych no_reply_address=Ukryta domena e-mail no_reply_address_helper=Nazwa domeny dla użytkowników z ukrytym adresem e-mail. Przykładowo, użytkownik "jan" będzie zalogowany na Git'cie jako "jan@noreply.example.org", jeśli domena ukrytego adresu e-mail jest ustawiona na "noreply.example.org". password_algorithm=Algorytm hashowania haseł +invalid_db_table = Tabela bazy danych "%s" jest nieprawidłowa: %v +allow_dots_in_usernames = Zezwolenie użytkownikom na używanie kropek w nazwach użytkowników. Nie ma to wpływu na istniejące konta. +invalid_password_algorithm = Nieprawidłowy algorytm hashowania haseł +smtp_from_invalid = Adres "Wyślij e-mail jako" jest nieprawidłowy +env_config_keys_prompt = Następujące zmienne środowiskowe zostaną również zastosowane do pliku konfiguracyjnego: +enable_update_checker_helper_forgejo = Będzie on okresowo sprawdzał dostępność nowych wersji Forgejo poprzez sprawdzanie rekordu TXT DNS pod adresem release.forgejo.org. +config_location_hint = Te opcje konfiguracji zostaną zapisane w: +password_algorithm_helper = Ustaw algorytm haszowania haseł. Algorytmy mają różne wymagania i siłę. Algorytm argon2 jest dość bezpieczny, ale zużywa dużo pamięci i może być nieodpowiedni dla małych systemów. +enable_update_checker = Włącz sprawdzanie aktualizacji +env_config_keys = Konfiguracja środowiska +run_user_helper = Nazwa użytkownika systemu operacyjnego, pod którą działa Forgejo. Należy pamiętać, że ten użytkownik musi mieć dostęp do ścieżki głównej repozytorium. +require_sign_in_view_popup = Ogranicz dostęp do strony jedynie do zalogowanych użytkowników. Odwiedzający zobaczą tylko strony logowania i rejestracji. [home] -uname_holder=Nazwa użytkownika lub adres email +uname_holder=Nazwa użytkownika lub adres e-mail password_holder=Hasło switch_dashboard_context=Przełącz kontekst pulpitu my_repos=Repozytoria show_more_repos=Pokaż więcej repozytoriów… collaborative_repos=Wspólne repozytoria -my_orgs=Moje organizacje +my_orgs=Organizacje my_mirrors=Moje kopie lustrzane view_home=Zobacz %s search_repos=Znajdź repozytorium… @@ -299,6 +363,10 @@ user_no_results=Nie znaleziono pasującego użytkowników. org_no_results=Nie znaleziono pasujących organizacji. code_no_results=Nie znaleziono kodu źródłowego odpowiadającego Twojej frazie wyszukiwania. code_last_indexed_at=Ostatnio indeksowane %s +go_to = Przejdź do +relevant_repositories = Wyświetlane są tylko istotne repozytoria, pokaż niefiltrowane wyniki. +stars_one = %d gwiazdka +stars_few = %d gwiazdek [auth] create_new_account=Zarejestruj konto @@ -316,7 +384,7 @@ allow_password_change=Użytkownik musi zmienić hasło (zalecane) reset_password_mail_sent_prompt=E-mail potwierdzający został wysłany na adres %s. Sprawdź swoją skrzynkę odbiorczą w przeciągu %s, aby ukończyć proces odzyskiwania konta. active_your_account=Aktywuj swoje konto account_activated=Konto zostało aktywowane -prohibit_login=Logowanie zabronione +prohibit_login=Logowanie jest zabronione resent_limit_prompt=Zażądano już wiadomości aktywacyjnej. Zaczekaj 3 minuty i spróbuj ponownie. has_unconfirmed_mail=Witaj, %s, masz niepotwierdzony adres e-mail (%s). Jeśli nie otrzymałeś wiadomości e-mail z potwierdzeniem lub potrzebujesz wysłać nową, kliknij na poniższy przycisk. resend_mail=Kliknij tutaj, aby wysłać e-mail aktywacyjny @@ -357,6 +425,12 @@ authorize_title=Zezwolić "%s" na dostęp do Twojego konta? authorization_failed=Autoryzacja nie powiodła się sspi_auth_failed=Uwierzytelnianie SSPI nie powiodło się password_pwned_err=Nie udało się ukończyć żądania do HaveIBeenPwned +remember_me.compromised = Token logowania nie jest już ważny, co może wskazywać na naruszenie bezpieczeństwa konta. Sprawdź swoje konto pod kątem podejrzanych działań. +sign_up_successful = Konto zostało pomyślnie utworzone. Witamy! +prohibit_login_desc = Twoje konto jest zablokowane, skontaktuj się z administratorem witryny. +change_unconfirmed_email_summary = Zmień adres e-mail, na który zostanie wysłana wiadomość aktywacyjna. +manual_activation_only = Skontaktuj się z administratorem witryny, aby dokończyć aktywację. +change_unconfirmed_email = Jeśli podczas rejestracji podałeś nieprawidłowy adres e-mail, możesz go zmienić poniżej, a potwierdzenie zostanie wysłane na nowy adres. [mail] view_it_on=Zobacz na %s @@ -2546,3 +2620,26 @@ runs.commit=Commit symbolic_link=Dowiązanie symboliczne executable_file = Plik wykonywalny + + +[search] +search = Wyszukaj... +type_tooltip = Typ wyszukiwania +fuzzy = Fuzzy +package_kind = Wyszukaj paczki... +fuzzy_tooltip = Uwzględnij wyniki, które również pasują do wyszukiwanego hasła +match = Dopasuj +match_tooltip = Uwzględniaj tylko wyniki pasujące do wyszukiwanego hasła +repo_kind = Wyszukaj repozytoria... +user_kind = Wyszukaj użytkownilków... +code_search_unavailable = Wyszukiwanie kodu jest obecnie niedostępne. Skontakuj sie z administratorem strony. +no_results = Nie znaleziono pasujących wyników. +org_kind = Wyszukaj organizacje... +team_kind = Wyszukaj zespoły... +code_kind = Wyszukaj kod... +code_search_by_git_grep = Obecne wyniki wyszukiwania kodu są dostarczane przez "git grep". Wyniki mogą być lepsze, jeśli administrator witryny włączy indeksator kodu. +project_kind = Wyszukaj projekty... +branch_kind = Wyszukaj gałęzie... +commit_kind = Wyszukaj commity... +runner_kind = Wyszukaj runnery... +keyword_search_unavailable = Wyszukiwanie według słów kluczowych jest obecnie niedostępne. Skontaktuj się z administratorem strony. \ No newline at end of file diff --git a/options/locale/locale_pt-BR.ini b/options/locale/locale_pt-BR.ini index 5e8af1d750..ce752bbddc 100644 --- a/options/locale/locale_pt-BR.ini +++ b/options/locale/locale_pt-BR.ini @@ -56,10 +56,10 @@ mirror=Espelhamento new_repo=Novo repositório new_migrate=Nova migração new_mirror=Novo espelhamento -new_fork=Novo Fork de Repositório +new_fork=Novo fork do repositório new_org=Nova organização -new_project=Novo Projeto -new_project_column=Nova Coluna +new_project=Novo projeto +new_project_column=Nova coluna manage_org=Gerenciar organizações admin_panel=Administração geral account_settings=Configurações da conta @@ -143,7 +143,7 @@ copy_hash = Copiar hash tracked_time_summary = Resumo do tempo de rastreamento baseado em filtros da lista de issues confirm_delete_artifact = Tem certeza de que deseja excluir o artefato "%s"? filter = Filtro -filter.clear = Limpar filtro +filter.clear = Limpar filtros filter.is_archived = Arquivado filter.public = Público filter.is_template = Modelo @@ -236,13 +236,13 @@ err_admin_name_pattern_not_allowed=Nome de usuário administrador é inválido, err_admin_name_is_invalid=Nome de usuário do administrador inválido general_title=Configurações gerais -app_name=Nome do servidor +app_name=Título do servidor app_name_helper=Você pode inserir o nome da empresa aqui. -repo_path=Caminho raíz do repositório +repo_path=Caminho raiz do repositório repo_path_helper=Todos os repositórios remotos do Git serão salvos neste diretório. lfs_path=Caminho raiz do Git LFS lfs_path_helper=Os arquivos armazenados com o Git LFS serão armazenados neste diretório. Deixe em branco para desabilitar. -run_user=Executar como nome de usuário +run_user=Executar como usuário run_user_helper=O nome de usuário do sistema operacional com o qual o Forgejo é executado. Observe que este usuário deve ter acesso ao caminho da raiz do repositório. domain=Domínio do servidor domain_helper=Domínio ou endereço de host para o servidor. @@ -250,48 +250,48 @@ ssh_port=Porta do servidor SSH ssh_port_helper=Número da porta que seu servidor SSH está usando. Deixe em branco para desabilitar. http_port=Porta HTTP de uso do Forgejo http_port_helper=Número da porta que o servidor web do Forgejo irá usar. -app_url=URL base do Forgejo +app_url=URL base app_url_helper=Endereço base para URLs clone HTTP(S) e notificações por e-mail. -log_root_path=Caminho do log +log_root_path=Caminho dos arquivos de registro log_root_path_helper=Arquivos de log serão gravados neste diretório. optional_title=Configurações opcionais email_title=Configurações de e-mail -smtp_addr=Host SMTP -smtp_port=Porta SMTP +smtp_addr=Endereço do servidor SMTP +smtp_port=Porta do servidor SMTP smtp_from=Enviar e-mail como smtp_from_helper=Endereço de e-mail que o Forgejo irá usar. Digite um endereço de e-mail simples ou use o formato "Nome" . -mailer_user=Nome de usuário do SMTP +mailer_user=Usuário do SMTP mailer_password=Senha do SMTP -register_confirm=Exigir confirmação de e-mail para se cadastrar -mail_notify=Habilitar notificações de e-mail -server_service_title=Configurações de servidor e serviços de terceiros -offline_mode=Habilitar autenticação local +register_confirm=Exigir confirmação de e-mail para cadastros +mail_notify=Habilitar notificações por e-mail +server_service_title=Configurações do servidor e serviços de terceiros +offline_mode=Habilitar modo local offline_mode_popup=Desabilitar redes de entrega de conteúdo de terceiros e entregar todos os recursos localmente. disable_gravatar=Desabilitar o gravatar disable_gravatar_popup=Desabilitar o gravatar e avatar de fontes de terceiros. Um avatar padrão será usado a menos que um usuário localmente carrega um avatar. -federated_avatar_lookup=Habilitar avatares federativos +federated_avatar_lookup=Habilitar avatares federados federated_avatar_lookup_popup=Habilitar a busca federativa de avatares a usar o serviço federativo de código aberto baseado no libravatar. -disable_registration=Desabilitar auto-cadastro +disable_registration=Somente administradores podem criar novas contas disable_registration_popup=Desabilitar auto-cadastro de usuário. Somente os administradores serão capazes de criar novas contas de usuário. allow_only_external_registration_popup=Permitir cadastro somente por meio de serviços externos openid_signin=Habilitar acesso via OpenID openid_signin_popup=Habilitar o acesso de usuários via OpenID. -openid_signup=Habilitar o auto-cadastro via OpenID +openid_signup=Habilitar cadastros via OpenID openid_signup_popup=Habilitar o auto-cadastro com base no OpenID. enable_captcha=Habilitar CAPTCHA ao registrar enable_captcha_popup=Obrigar validação por CAPTCHA para auto-cadastro de usuários. -require_sign_in_view=Exigir acesso do usuário para a visualização de páginas +require_sign_in_view=Apenas usuários logados podem visualizar páginas require_sign_in_view_popup=Limitar o acesso de página aos usuários autenticados. Os visitantes só verão as páginas de autenticação e cadastro. admin_setting_desc=Criar uma conta de administrador é opcional. O primeiro usuário cadastrado automaticamente se tornará um administrador. admin_title=Configurações da conta de administrador -admin_name=Nome do usuário administrador +admin_name=Usuário admin_password=Senha confirm_password=Confirmar senha admin_email=Endereço de e-mail install_btn_confirm=Instalar Forgejo -test_git_failed=Falha ao testar o comando 'git': %v -sqlite3_not_available=Esta versão do Forgejo não suporta SQLite3. Por favor faça o download da versão binária oficial em %s (não utilize a versão 'gobuild'). +test_git_failed=Falha ao testar o comando "git": %v +sqlite3_not_available=Esta versão do Forgejo não possui suporte ao SQLite3. Baixe a versão oficial em %s (e não a versão "gobuild"). invalid_db_setting=Configuração de banco de dados está inválida: %v invalid_db_table=A tabela "%s" do banco de dados é inválida: %v invalid_repo_path=A raiz do repositório está inválida: %v @@ -1529,25 +1529,25 @@ issues.ref_reopened_from=`reabriu esta issue %[4]s Acesse para participar desta conversação. +issues.sign_in_require_desc=Inicie a sessão para participar desta conversa. issues.edit=Editar issues.cancel=Cancelar issues.save=Salvar -issues.label_title=Nome da etiqueta -issues.label_description=Descrição da etiqueta -issues.label_color=Cor da etiqueta -issues.label_exclusive=Exclusivo -issues.label_archive=Arquivar etiqueta -issues.label_exclusive_desc=Nomeie o rótulo escopo/item para torná-lo mutuamente exclusivo com outros rótulos do escopo/. +issues.label_title=Nome +issues.label_description=Descrição +issues.label_color=Cor +issues.label_exclusive=Exclusiva +issues.label_archive=Arquivar +issues.label_exclusive_desc=Nomeie a etiqueta escopo/item para torná-la mutuamente exclusiva em relação a outras etiquetas do escopo/. issues.label_exclusive_warning=Quaisquer rótulos com escopo conflitantes serão removidos ao editar os rótulos de uma issue ou pull request. issues.label_count=%d etiquetas issues.label_open_issues=%d issues abertas @@ -1557,29 +1557,29 @@ issues.label_modify=Editar etiqueta issues.label_deletion=Excluir etiqueta issues.label_deletion_desc=A exclusão desta etiqueta irá removê-la de todas as issues. Tem certeza que deseja continuar? issues.label_deletion_success=A etiqueta foi excluída. -issues.label.filter_sort.alphabetically=Alfabeticamente -issues.label.filter_sort.reverse_alphabetically=Alfabeticamente inverso -issues.label.filter_sort.by_size=Menor tamanho -issues.label.filter_sort.reverse_by_size=Maior tamanho -issues.num_participants_few=%d participante(s) -issues.attachment.open_tab=`Clique para ver "%s" em uma nova aba` +issues.label.filter_sort.alphabetically=por ordem alfabética +issues.label.filter_sort.reverse_alphabetically=por ordem alfabética inversa +issues.label.filter_sort.by_size=por menor tamanho +issues.label.filter_sort.reverse_by_size=por maior tamanho +issues.num_participants_few=%d participantes +issues.attachment.open_tab=`Clique abrir "%s" em uma nova aba` issues.attachment.download=`Clique para baixar "%s"` issues.subscribe=Inscrever-se issues.unsubscribe=Desinscrever -issues.unpin_issue=Desfixar issue +issues.unpin_issue=Desafixar issue issues.max_pinned=Você não pode fixar mais issues issues.pin_comment=afixou este %s issues.unpin_comment=desafixou este %s -issues.lock=Bloquear conversação -issues.unlock=Desbloquear conversação -issues.lock.unknown_reason=Não pode-se bloquear uma issue com um motivo desconhecido. +issues.lock=Trancar conversa +issues.unlock=Destrancar conversa +issues.lock.unknown_reason=Não é possível trancar uma issue com um motivo desconhecido. issues.lock_duplicate=Uma issue não pode ser bloqueada duas vezes. issues.unlock_error=Não pode-se desbloquear uma issue que não esteja bloqueada. -issues.lock_with_reason=bloqueada como %s e conversação limitada para colaboradores %s -issues.lock_no_reason=bloqueada e conversação limitada para colaboradores %s -issues.unlock_comment=desbloqueada esta conversação %s -issues.lock_confirm=Bloquear -issues.unlock_confirm=Desbloquear +issues.lock_with_reason=trancou a conversa como sendo %s e restringiu-a aos colaboradores %s +issues.lock_no_reason=trancou a conversa e restringiu-a aos colaboradores %s +issues.unlock_comment=destrancou esta conversa %s +issues.lock_confirm=Trancar +issues.unlock_confirm=Destrancar issues.lock.notice_1=- Outros usuários não poderão adicionar novos comentários nesta issue. issues.lock.notice_2=- Você e outros colaboradores com acesso a este repositório ainda podem deixar comentários que outros podem ver. issues.lock.notice_3=- Você pode sempre desbloquear esta issue novamente no futuro. @@ -1589,30 +1589,30 @@ issues.lock.reason=Motivo do bloqueio issues.lock.title=Conversação bloqueada para esta issue. issues.unlock.title=Conversação desbloqueada para esta issue. issues.comment_on_locked=Você não pode comentar em uma issue bloqueada. -issues.delete=Apagar +issues.delete=Excluir issues.delete.title=Apagar esta issue? issues.delete.text=Você realmente deseja excluir esta issue? (Isto irá remover permanentemente todo o conteúdo. Considere fechá-la em vez disso, se você pretende mantê-la arquivado) issues.tracker=Contador de tempo -issues.start_tracking_short=Iniciar Cronômetro -issues.start_tracking=Iniciar Cronômetro +issues.start_tracking_short=Iniciar cronômetro +issues.start_tracking=Iniciar contagem de tempo issues.start_tracking_history=`começou a trabalhar %s` issues.tracker_auto_close=Contador de tempo será parado automaticamente quando esta issue for fechada issues.tracking_already_started=`Você já iniciou o cronômetro em outra issue!` -issues.stop_tracking=Parar Cronômetro +issues.stop_tracking=Parar cronômetro issues.stop_tracking_history=`parou de trabalhar %s` issues.cancel_tracking=Descartar -issues.cancel_tracking_history=`cronômetro cancelado %s` +issues.cancel_tracking_history=`cancelou a contagem de tempo %s` issues.add_time=Adicionar tempo manualmente -issues.del_time=Apagar este registro de tempo +issues.del_time=Excluir este registro de tempo issues.add_time_short=Adicionar tempo issues.add_time_cancel=Cancelar issues.add_time_history=`adicionou tempo gasto %s` issues.del_time_history=`removeu tempo gasto %s` issues.add_time_hours=Horas issues.add_time_minutes=Minutos -issues.add_time_sum_to_small=Nenhum tempo foi inserido. -issues.time_spent_total=Tempo total gasto -issues.time_spent_from_all_authors=`Tempo total gasto: %s` +issues.add_time_sum_to_small=Nenhum tempo inserido. +issues.time_spent_total=Total de tempo gasto +issues.time_spent_from_all_authors=`Total de tempo gasto: %s` issues.due_date=Data limite issues.invalid_due_date_format=Formato da data limite inválido, deve ser 'dd/mm/aaaa'. issues.error_modifying_due_date=Falha ao modificar a data limite. @@ -1625,19 +1625,19 @@ issues.due_date_form=dd/mm/aaaa issues.due_date_form_add=Adicionar data limite issues.due_date_form_edit=Editar issues.due_date_form_remove=Remover -issues.due_date_not_set=Data limite não informada. +issues.due_date_not_set=Não há data limite definida. issues.due_date_added=adicionou a data limite %s %s issues.due_date_modified=modificou a data limite de %[2]s para %[1]s %[3]s issues.due_date_remove=removeu a data limite %s %s issues.due_date_overdue=Em atraso issues.due_date_invalid=A data limite é inválida ou está fora do intervalo. Por favor, use o formato 'dd/mm/aaaa'. issues.dependency.title=Dependências -issues.dependency.issue_no_dependencies=Nenhuma dependência definida. -issues.dependency.pr_no_dependencies=Nenhuma dependência definida. +issues.dependency.issue_no_dependencies=Não há dependências definidas. +issues.dependency.pr_no_dependencies=Não há dependências definidas. issues.dependency.no_permission_1=Você não tem permissão para ler %d dependência issues.dependency.no_permission_n=Você não tem permissão para ler %d dependências issues.dependency.no_permission.can_remove=Você não tem permissão para ler esta dependência, mas pode remover esta dependência -issues.dependency.add=Adicione… +issues.dependency.add=Adicionar dependência… issues.dependency.cancel=Cancelar issues.dependency.remove=Remover issues.dependency.remove_info=Remover esta dependência @@ -1671,7 +1671,7 @@ issues.review.dismissed_label=Rejeitada issues.review.left_comment=deixou um comentário issues.review.content.empty=Você precisa deixar um comentário indicando as alterações solicitadas. issues.review.reject=solicitou alterações %s -issues.review.wait=foi solicitada para revisão %s +issues.review.wait=foi solicitado(a) para revisar %s issues.review.add_review_request=solicitou uma revisão de %s %s issues.review.remove_review_request=removeu a solicitação de revisão para %s %s issues.review.remove_review_request_self=recusou-se a revisar %s @@ -1681,9 +1681,9 @@ issues.review.review=Revisão issues.review.reviewers=Revisores issues.review.outdated=Desatualizado issues.review.outdated_description=O conteúdo foi alterado desde que este comentário foi feito -issues.review.option.show_outdated_comments=Mostrar comentários desatualizados -issues.review.option.hide_outdated_comments=Ocultar comentários desatualizados -issues.review.show_outdated=Mostrar desatualizado +issues.review.option.show_outdated_comments=Mostrar comentários obsoletos +issues.review.option.hide_outdated_comments=Ocultar comentários obsoletos +issues.review.show_outdated=Mostrar comentários obsoletos issues.review.hide_outdated=Ocultar desatualizado issues.review.show_resolved=Mostrar resolvidas issues.review.hide_resolved=Ocultar resolvidas @@ -2543,7 +2543,7 @@ generated = Gerado clone_in_vscodium = Clonar com VSCodium mirror_sync = sincronizado desc.sha256 = SHA256 -issues.role.collaborator = Colaborador +issues.role.collaborator = Colaborador(a) issues.label_archived_filter = Mostrar etiquetas arquivadas pulls.status_checks_hide_all = Esconder todas as verificações pulls.status_checks_show_all = Mostrar todas as verificações @@ -2559,8 +2559,8 @@ migrate.forgejo.description = Migrar dados do codeberg.org ou outras instâncias commits.browse_further = Ver mais issues.role.first_time_contributor = Primeira vez contribuindo issues.role.first_time_contributor_helper = Esta é a primeira contribuição deste usuário para o repositório. -issues.role.contributor = Contribuidor -issues.role.member_helper = Este usuário é um membro da organização dona deste repositório. +issues.role.contributor = Contribuidor(a) +issues.role.member_helper = Este usuário é membro da organização proprietária deste repositório. issues.role.collaborator_helper = Este usuário foi convidado para colaborar neste repositório. pulls.cmd_instruction_checkout_title = Checkout settings.wiki_globally_editable = Permitir que qualquer pessoa possa editar a wiki @@ -2592,7 +2592,7 @@ contributors.contribution_type.filter_label = Tipo de contribuição: contributors.contribution_type.commits = Commits settings.webhook.test_delivery_desc_disabled = Ative este webhook para testá-lo com um evento simulado. activity.navbar.contributors = Contribuidores -issues.label_archive_tooltip = Rótulos arquivados não serão exibidos nas sugestões de pesquisa de rótulos por padrão. +issues.label_archive_tooltip = Etiquetas arquivadas não serão exibidas nas sugestões de pesquisa de etiquetas. activity.navbar.pulse = Recente settings.units.overview = Geral settings.units.add_more = Adicionar mais... @@ -2600,6 +2600,8 @@ pulls.commit_ref_at = `referenciou este pedido de mesclagem no commit o ficheiro binário executável para a sua plataforma, despache-o com o Docker, ou obtenha-o sob a forma de pacote. platform=Multiplataforma -platform_desc=Forgejo corre em qualquer plataforma onde possa compilar em linguagem Go: Windows, macOS, Linux, ARM, etc. Escolha a sua preferida! +platform_desc=Forgejo corre em qualquer plataforma onde possa compilar em linguagem Go: Windows, macOS, Linux, ARM, etc. Escolha a sua preferida! lightweight=Leve lightweight_desc=Forgejo requer poucos recursos e pode correr num simples Raspberry Pi. Economize a energia da sua máquina! license=Código aberto @@ -252,10 +255,10 @@ run_user_helper=O nome de utilizador do sistema operativo que vai executar o For domain=Domínio do servidor domain_helper=Domínio ou endereço do servidor. ssh_port=Porto do servidor SSH -ssh_port_helper=O número do porto que o seu servidor SSH usa. Deixe em branco para desabilitar. +ssh_port_helper=O número do porto que o seu servidor SSH usa. Deixe em branco para desabilitar o servidor SSH. http_port=Porto de escuta HTTP do Forgejo -http_port_helper=O número do porto onde o servidor web do Forgejo estará à escuta. -app_url=URL base do Forgejo +http_port_helper=O número do porto que será usado pelo servidor web do Forgejo. +app_url=URL base app_url_helper=Endereço base para os URLs e notificações por email das clonagens por HTTP(S). log_root_path=Localização dos registos log_root_path_helper=Os ficheiros de registo serão escritos nesta pasta. @@ -286,7 +289,7 @@ openid_signup=Habilitar a auto-inscrição com OpenID openid_signup_popup=Habilitar a utilização do OpenID para fazer auto-inscrições. enable_captcha=Habilitar CAPTCHA na inscrição enable_captcha_popup=Exigir CAPTCHA na auto-inscrição de utilizadores. -require_sign_in_view=Exigir sessão iniciada para visualizar páginas +require_sign_in_view=Exigir sessão iniciada para visualizar conteúdo da instância require_sign_in_view_popup=Limitar o acesso às páginas aos utilizadores com sessão iniciada. Os visitantes só poderão visualizar as páginas de início de sessão e de inscrição. admin_setting_desc=A criação de uma conta de administração é opcional. O primeiro utilizador inscrito tornar-se-á automaticamente num administrador. admin_title=Configurações da conta de administração @@ -295,13 +298,13 @@ admin_password=Senha confirm_password=Confirme a senha admin_email=Endereço de email install_btn_confirm=Instalar Forgejo -test_git_failed=Não foi possível testar o comando 'git': %v -sqlite3_not_available=Esta versão do Forgejo não suporta o SQLite3. Descarregue a versão binária oficial em %s (não utilize a versão 'gobuild'). +test_git_failed=Não foi possível testar o comando "git": %v +sqlite3_not_available=Esta versão do Forgejo não suporta o SQLite3. Descarregue a versão binária oficial em %s (não utilize a versão "gobuild"). invalid_db_setting=As configurações da base de dados são inválidas: %v invalid_db_table=A tabela "%s" da base de dados é inválida: %v invalid_repo_path=A localização base dos repositórios é inválida: %v invalid_app_data_path=A localização dos dados da aplicação é inválido: %v -run_user_not_match=O nome de utilizador para 'executar como' não é o nome de utilizador corrente: %s → %s +run_user_not_match=O nome de utilizador para "executar como utilizador" não é o nome de utilizador corrente: %s → %s internal_token_failed=Falha ao gerar o código interno: %v secret_key_failed=Falha ao gerar a chave secreta: %v save_config_failed=Falhou ao guardar a configuração: %v @@ -314,7 +317,7 @@ default_allow_create_organization_popup=Permitir, por norma, que os novos utiliz default_enable_timetracking=Habilitar, por norma, a contagem do tempo default_enable_timetracking_popup=Habilitar, por norma, a contagem do tempo nos novos repositórios. no_reply_address=Domínio dos emails ocultos -no_reply_address_helper=Nome de domínio para utilizadores com um endereço de email oculto. Por exemplo, o nome de utilizador 'silva' será registado no Git como 'silva@semresposta.exemplo.org' se o domínio de email oculto estiver definido como 'semresposta.exemplo.org'. +no_reply_address_helper=Nome de domínio para utilizadores com um endereço de email oculto. Por exemplo, o nome de utilizador "silva" será registado no Git como "silva@semresposta.exemplo.org" se o domínio de email oculto estiver definido como "semresposta.exemplo.org". password_algorithm=Algoritmo de Hash da Senha invalid_password_algorithm=Algoritmo de hash da senha inválido password_algorithm_helper=Definir o algoritmo de hash da senha. Os algoritmos têm requisitos e resistência distintos. `argon2` é bastante seguro, mas usa muita memória e pode ser inapropriado para sistemas pequenos. @@ -333,7 +336,7 @@ switch_dashboard_context=Trocar contexto do painel my_repos=Repositórios show_more_repos=Mostrar mais repositórios… collaborative_repos=Repositórios colaborativos -my_orgs=As minhas organizações +my_orgs=Organizações my_mirrors=As minhas réplicas view_home=Ver %s search_repos=Procurar um repositório… @@ -398,7 +401,7 @@ allow_password_change=Exigir que o utilizador mude a senha (recomendado) reset_password_mail_sent_prompt=Foi enviado um email de confirmação para %s. Verifique a sua caixa de entrada dentro de %s para completar o processo de recuperação. active_your_account=Ponha a sua conta em funcionamento account_activated=A conta foi posta em funcionamento -prohibit_login=Início de sessão proibido +prohibit_login=É proibido iniciar sessão prohibit_login_desc=A sua conta está proibida de iniciar sessão. Contacte o administrador. resent_limit_prompt=Já fez um pedido recentemente para enviar um email para pôr a conta em funcionamento. Espere 3 minutos e tente novamente. has_unconfirmed_mail=Olá %s, tem um endereço de email não confirmado (%s). Se não recebeu um email de confirmação ou precisa de o voltar a enviar, clique no botão abaixo. @@ -459,7 +462,7 @@ change_unconfirmed_email_error = Não foi possível mudar o endereço de email: [mail] view_it_on=Ver em %s reply=ou responda a este email imediatamente -link_not_working_do_paste=Não está a funcionar? Tente copiar e colar no seu navegador. +link_not_working_do_paste=A ligação não funciona? Tente copiar e colar na barra de URL do seu navegador. hi_user_x=Olá %s, activate_account=Por favor, ponha a sua conta em funcionamento @@ -474,12 +477,12 @@ activate_email.text=Por favor clique na seguinte ligação para validar o seu en register_notify=Bem-vindo(a) ao Forgejo register_notify.title=%[1]s, bem-vindo(a) a %[2]s register_notify.text_1=este é o seu email de confirmação de registo para %s! -register_notify.text_2=Agora pode iniciar a sessão com o nome de utilizador: %s. -register_notify.text_3=Se esta conta foi criada para si, defina a sua senha primeiro. +register_notify.text_2=Pode iniciar a sessão usando o seu nome de utilizador: %s +register_notify.text_3=Se outra pessoa criou esta conta para si, terá de definir a sua senha primeiro. reset_password=Recupere a sua conta -reset_password.title=%s, você pediu para recuperar a sua conta -reset_password.text=Por favor clique na seguinte ligação para recuperar a sua conta em %s: +reset_password.title=%s, recebemos um pedido para recuperar a sua conta +reset_password.text=Se foi você, clique na ligação seguinte para recuperar a sua conta dentro de %s: register_success=Inscrição bem sucedida @@ -509,13 +512,13 @@ release.downloads=Descargas: release.download.zip=Código fonte (ZIP) release.download.targz=Código fonte (TAR.GZ) -repo.transfer.subject_to=%s gostaria de transferir "%s" para %s -repo.transfer.subject_to_you=%s gostaria de transferir "%s" para si +repo.transfer.subject_to=%s quer transferir o repositório "%s" para %s +repo.transfer.subject_to_you=%s quer transferir o repositório "%s" para si repo.transfer.to_you=você repo.transfer.body=Para o aceitar ou rejeitar visite %s, ou ignore-o, simplesmente. -repo.collaborator.added.subject=%s adicionou você a %s -repo.collaborator.added.text=Foi adicionado(a) como colaborador(a) do repositório: +repo.collaborator.added.subject=%s adicionou-o/a a %s como colaborador/a +repo.collaborator.added.text=Foi adicionado/a como colaborador/a do repositório: team_invite.subject=%[1]s fez-lhe um convite para se juntar à organização %[2]s team_invite.text_1=%[1]s fez-lhe um convite para se juntar à equipa %[2]s na organização %[3]s. @@ -556,8 +559,8 @@ SSPISeparatorReplacement=Separador SSPIDefaultLanguage=Idioma predefinido require_error=` não pode estar em branco.` -alpha_dash_error=` deve conter apenas caracteres alfanuméricos, hífen ('-') e sublinhado ('_').` -alpha_dash_dot_error=` deve conter apenas caracteres alfanuméricos, hífen ('-'), sublinhado ('_') e ponto ('.').` +alpha_dash_error=` deve conter apenas caracteres alfanuméricos, hífen ("-") e sublinhado ("_").` +alpha_dash_dot_error=` deve conter apenas caracteres alfanuméricos, hífen ("-"), sublinhado ("_") e ponto (".").` git_ref_name_error=` tem que ser um nome de referência Git bem formado.` size_error=` tem que ser do tamanho %s.` min_size_error=` tem que conter pelo menos %s caracteres.` @@ -567,7 +570,7 @@ url_error=`"%s" não é um URL válido.` include_error=` tem que conter o texto "%s".` glob_pattern_error=` o padrão glob é inválido: %s.` regex_pattern_error=` o padrão regex é inválido: %s.` -username_error=` só pode conter caracteres alfanuméricos ('0-9','a-z','A-Z'), hífen ('-'), sublinhado ('_') e ponto ('.') Não pode começar nem terminar com caracteres não alfanuméricos, e caracteres não alfanuméricos consecutivos também são proibidos.` +username_error=` só pode conter caracteres alfanuméricos ("0-9","a-z","A-Z"), hífen ("-"), sublinhado ("_") e ponto (".") Não pode começar nem terminar com caracteres não alfanuméricos, e caracteres não alfanuméricos consecutivos também são proibidos.` invalid_group_team_map_error=` o mapeamento é inválido: %s` unknown_error=Erro desconhecido: captcha_incorrect=O código CAPTCHA está errado. @@ -603,7 +606,7 @@ enterred_invalid_owner_name=O novo nome de proprietário não é válido. enterred_invalid_password=A senha que inseriu está errada. user_not_exist=O utilizador não existe. team_not_exist=A equipa não existe. -last_org_owner=Não pode remover o último utilizador da equipa 'proprietários'. Tem que haver pelo menos um proprietário numa organização. +last_org_owner=Não pode remover o último utilizador da equipa "proprietários". Tem que haver pelo menos um proprietário numa organização. cannot_add_org_to_team=Uma organização não pode ser adicionada como membro de uma equipa. duplicate_invite_to_team=O(A) utilizador(a) já tinha sido convidado(a) para ser membro da equipa. organization_leave_success=Você deixou a organização %s com sucesso. @@ -633,6 +636,9 @@ Location = Localização To = Nome do ramo required_prefix = A entrada tem de começar com "%s" AccessToken = Código de acesso +FullName = Nome completo +Description = Descrição +Pronouns = Pronomes [user] change_avatar=Mude o seu avatar… @@ -663,7 +669,7 @@ unblock = Desbloquear followers_one = %d seguidor following_one = %d seguindo block_user.detail = Note que se bloquear este utilizador, serão executadas outras operações, tais como: -block_user.detail_1 = Está a deixar de ser seguido por este utilizador. +block_user.detail_1 = Está a deixar de ser seguido/a por este utilizador. block_user.detail_2 = Este utilizador não pode interagir com os seus repositórios, questões criadas e comentários. block_user.detail_3 = Este/a utilizador/a não o/a pode adicionar como colaborador/a nem você pode o/a adicionar como colaborador/a. follow_blocked_user = Não pode seguir este/a utilizador/a porque você o/a bloqueou ou este/a utilizador/a bloqueou-o/a a si. @@ -682,11 +688,11 @@ applications=Aplicações orgs=Gerir organizações repos=Repositórios delete=Eliminar a conta -twofa=Autenticação em dois passos +twofa=Autenticação em dois passos (TOTP) account_link=Contas vinculadas organization=Organizações uid=UID -webauthn=Chaves de segurança +webauthn=Autenticação em dois passos (chaves de segurança) public_profile=Perfil público biography_placeholder=Conte-nos um pouco sobre si! (Pode usar Markdown) @@ -696,9 +702,9 @@ password_username_disabled=Utilizadores não-locais não podem mudar os seus nom full_name=Nome completo website=Sítio web location=Localização -update_theme=Substituir tema +update_theme=Mudar tema update_profile=Modificar perfil -update_language=Modificar idioma +update_language=Mudar idioma update_language_not_found=O idioma "%s" não está disponível. update_language_success=O idioma foi modificado. update_profile_success=O seu perfil foi modificado. @@ -729,8 +735,8 @@ comment_type_group_project=Planeamento comment_type_group_issue_ref=Referência da questão saved_successfully=As suas configurações foram guardadas com sucesso. privacy=Privacidade -keep_activity_private=Esconder Trabalho da página do perfil -keep_activity_private_popup=Torna o trabalho visível apenas para si e para os administradores +keep_activity_private=Esconder trabalho da página do perfil +keep_activity_private_popup=O seu trabalho será visível apenas para si e para os administradores da instância lookup_avatar_by_mail=Procurar avatar com base no endereço de email federated_avatar_lookup=Pesquisa de avatar federada @@ -773,7 +779,7 @@ theme_update_error=O tema escolhido não existe. openid_deletion=Remover endereço OpenID openid_deletion_desc=Remover este endereço OpenID da sua conta impedirá que inicie a sessão com ele. Quer continuar? openid_deletion_success=O endereço OpenID foi removido. -add_new_email=Adicionar novo endereço de email +add_new_email=Adicionar endereço de email add_new_openid=Adicionar novo URI OpenID add_email=Adicionar endereço de email add_openid=Adicionar URI OpenID @@ -789,15 +795,15 @@ manage_ssh_keys=Gerir chaves SSH manage_ssh_principals=Gerir Protagonistas de Certificados SSH manage_gpg_keys=Gerir chaves GPG add_key=Adicionar chave -ssh_desc=Essas chaves públicas SSH estão associadas à sua conta. As chaves privadas correspondentes permitem acesso total aos seus repositórios. +ssh_desc=Essas chaves públicas SSH estão associadas à sua conta. As chaves privadas correspondentes permitem acesso total aos seus repositórios. As chaves SSH que tenham sido validadas podem ser usadas para validar cometimentos Git assinados com SSH. principal_desc=Estes protagonistas de certificados SSH estão associados à sua conta e permitem acesso total aos seus repositórios. -gpg_desc=Essas chaves GPG públicas estão associadas à sua conta. Mantenha as suas chaves privadas seguras, uma vez que elas permitem a validação dos cometimentos. +gpg_desc=Essas chaves GPG públicas estão associadas à sua conta e usadas para verificar os seus cometimentos. Mantenha as suas chaves privadas seguras, uma vez que elas permitem assinar os cometimentos com a sua identidade. ssh_helper=Precisa de ajuda? Dê uma vista de olhos no guia do GitHub para criar as suas próprias chaves SSH ou para resolver problemas comuns que pode encontrar ao usar o SSH. gpg_helper=Precisa de ajuda? Dê uma vista de olhos no guia do GitHub sobre GPG. -add_new_key=Adicionar Chave SSH +add_new_key=Adicionar chave SSH add_new_gpg_key=Adicionar chave GPG -key_content_ssh_placeholder=Começa com 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', ou 'sk-ssh-ed25519@openssh.com' -key_content_gpg_placeholder=Começa com '-----BEGIN PGP PUBLIC KEY BLOCK-----' +key_content_ssh_placeholder=Começa com "ssh-ed25519", "ssh-rsa", "ecdsa-sha2-nistp256", "ecdsa-sha2-nistp384", "ecdsa-sha2-nistp521", "sk-ecdsa-sha2-nistp256@openssh.com", ou "sk-ssh-ed25519@openssh.com" +key_content_gpg_placeholder=Começa com "-----BEGIN PGP PUBLIC KEY BLOCK-----" add_new_principal=Adicional Protagonista ssh_key_been_used=Esta chave SSH já tinha sido adicionada ao servidor. ssh_key_name_used=Já existe uma chave SSH com o mesmo nome na sua conta. @@ -815,7 +821,7 @@ gpg_token=Código gpg_token_help=Pode gerar uma assinatura usando o seguinte comando: gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig gpg_token_signature=Assinatura GPG blindada (com armadura ASCII) -key_signature_gpg_placeholder=Começa com '-----BEGIN PGP SIGNATURE-----' +key_signature_gpg_placeholder=Começa com "-----BEGIN PGP SIGNATURE-----" verify_gpg_key_success=A chave GPG "%s" foi validada. ssh_key_verified=Chave validada ssh_key_verified_long=A chave foi validada com um código e pode ser usada para validar cometimentos que correspondam a qualquer dos endereços de email em uso por parte deste utilizador. @@ -825,7 +831,7 @@ ssh_token_required=Tem que fornecer uma assinatura para o código abaixo ssh_token=Código ssh_token_help=Pode gerar uma assinatura usando o seguinte comando: ssh_token_signature=Assinatura SSH blindada (com armadura ASCII) -key_signature_ssh_placeholder=Começa com '-----BEGIN SSH SIGNATURE-----' +key_signature_ssh_placeholder=Começa com "-----BEGIN SSH SIGNATURE-----" verify_ssh_key_success=A chave SSH "%s" foi validada. subkeys=Subchaves key_id=ID da chave @@ -914,7 +920,7 @@ oauth2_application_remove_description=A remoção de uma aplicação OAuth2 impe oauth2_application_locked=O Forgejo pré-regista algumas aplicações OAuth2 no arranque, se for habilitado na configuração. Para evitar comportamentos inesperados, estas não podem ser editadas nem removidas. Consulte a documentação sobre o OAuth2, para obter mais informações. authorized_oauth2_applications=Aplicações OAuth2 autorizadas -authorized_oauth2_applications_description=Concedeu acesso à sua conta pessoal do Forgejo a estas aplicações de terceiros. Por favor, revogue o acesso às aplicações que já não precisa. +authorized_oauth2_applications_description=Concedeu acesso à sua conta pessoal do Forgejo a estas aplicações de terceiros. Por favor, revogue o acesso às aplicações que já não estão em uso. revoke_key=Revogar revoke_oauth2_grant=Revogar acesso revoke_oauth2_grant_description=Revogar o acesso desta aplicação de terceiros impedi-la-á de aceder aos seus dados. Tem a certeza? @@ -925,7 +931,7 @@ twofa_recovery_tip=Se perder o seu dispositivo, poderá usar uma chave de recupe twofa_is_enrolled=A autenticação em dois passos está neste momento habilitada na sua conta. twofa_not_enrolled=A autenticação em dois passos não está neste momento habilitada na sua conta. twofa_disable=Desabilitar autenticação em dois passos -twofa_scratch_token_regenerate=Voltar a gerar o código de recuperação +twofa_scratch_token_regenerate=Voltar a gerar a chave de recuperação de utilização única twofa_scratch_token_regenerated=O seu código de recuperação agora é %s. Guarde-o num lugar seguro, não será mostrado novamente. twofa_enroll=Habilitar autenticação em dois passos twofa_disable_note=Pode desabilitar a autenticação em dois passos, se for necessário. @@ -968,7 +974,7 @@ delete_account_title=Eliminar conta de utilizador delete_account_desc=Tem a certeza que quer eliminar permanentemente esta conta de utilizador? email_notifications.enable=Habilitar notificações por email -email_notifications.onmention=Enviar email somente quando mencionado(a) +email_notifications.onmention=Enviar email somente quando for mencionado/a email_notifications.disable=Desabilitar notificações por email email_notifications.submit=Definir preferência do email email_notifications.andyourown=e as suas próprias notificações @@ -1010,7 +1016,7 @@ visibility=Visibilidade visibility_description=Somente o proprietário ou os membros da organização, se tiverem direitos, poderão vê-lo. visibility_helper=Tornar o repositório privado visibility_helper_forced=O administrador obriga a que os repositórios novos sejam privados. -visibility_fork_helper=(alterar este parâmetro irá alterar também todas as derivações) +visibility_fork_helper=(alterar este parâmetro irá alterar a visibilidade de todas as derivações) clone_helper=Precisa de ajuda para clonar? Visite a Ajuda. fork_repo=Derivar repositório fork_from=Derivar de @@ -1054,7 +1060,7 @@ default_branch_label=predefinido default_branch_helper=O ramo principal é o ramo base para pedidos de integração e cometimentos. mirror_prune=Podar mirror_prune_desc=Remover referências obsoletas de seguimento remoto -mirror_interval=Intervalo entre sincronizações (as unidades de tempo válidas são 'h', 'm' e 's'). O valor zero desabilita a sincronização periódica. (Intervalo mínimo: %s) +mirror_interval=Intervalo entre sincronizações (as unidades de tempo válidas são "h", "m" e "s"). O valor zero desabilita a sincronização periódica. (Intervalo mínimo: %s) mirror_interval_invalid=O intervalo entre sincronizações não é válido. mirror_sync=sincronizado mirror_sync_on_commit=Sincronizar quando forem enviados cometimentos @@ -1078,7 +1084,7 @@ reactions_more=e mais %d unit_disabled=O administrador desabilitou esta secção do repositório. language_other=Outros adopt_search=Insira o nome de utilizador para procurar repositórios adoptados... (deixe em branco para encontrar todos) -adopt_preexisting_label=Adoptar ficheiros +adopt_preexisting_label=Usar ficheiros adopt_preexisting=Adoptar ficheiros pré-existentes adopt_preexisting_content=Criar repositório a partir de %s adopt_preexisting_success=Ficheiros adoptados e repositório criado a partir de %s @@ -1112,7 +1118,7 @@ desc.sha256=SHA256 template.items=Itens do modelo template.git_content=Conteúdo Git (ramo principal) template.git_hooks=Automatismos do Git -template.git_hooks_tooltip=Neste momento não pode modificar ou remover Automatismos do Git depois de adicionados. Escolha esta opção somente se confiar no repositório modelo. +template.git_hooks_tooltip=Neste momento não pode modificar ou remover automatismos do Git depois de adicionados. Escolha esta opção somente se confiar no repositório modelo. template.webhooks=Automatismos web template.topics=Tópicos template.avatar=Avatar @@ -2021,7 +2027,7 @@ activity.title.unresolved_conv_n=%d diálogos não concluídos activity.unresolved_conv_desc=Estas questões e estes pedidos de integração, que foram modificados recentemente, ainda não foram concluídos. activity.unresolved_conv_label=Em aberto activity.title.releases_1=%d lançamento -activity.title.releases_n=%d Lançamentos +activity.title.releases_n=%d lançamentos activity.title.releases_published_by=%s publicado por %s activity.published_release_label=Publicado activity.no_git_activity=Não houve quaisquer cometimentos feitos durante este período. @@ -2102,10 +2108,10 @@ settings.sync_mirror=Sincronizar agora settings.pull_mirror_sync_in_progress=Puxando modificações a partir do repositório remoto %s, neste momento. settings.push_mirror_sync_in_progress=Enviando modificações para o repositório remoto %s, neste momento. settings.site=Sítio web -settings.update_settings=Modificar configurações +settings.update_settings=Guardar configurações settings.update_mirror_settings=Modificar configurações da réplica settings.branches.switch_default_branch=Trocar o ramo principal -settings.branches.update_default_branch=Definir o ramo principal +settings.branches.update_default_branch=Modificar o ramo principal settings.branches.add_new_rule=Adicionar nova regra settings.advanced_settings=Configurações avançadas settings.wiki_desc=Habilitar wiki do repositório @@ -2143,8 +2149,8 @@ settings.projects_desc=Habilitar planeamentos no repositório settings.actions_desc=Habilitar operações no repositório (Forgejo Actions) settings.admin_settings=Configurações do administrador settings.admin_enable_health_check=Habilitar verificações de integridade (git fsck) no repositório -settings.admin_code_indexer=Indexador de código -settings.admin_stats_indexer=Indexador de estatísticas de código +settings.admin_code_indexer=Indexador de código-fonte +settings.admin_stats_indexer=Indexador de estatísticas de código-fonte settings.admin_indexer_commit_sha=Último SHA indexado settings.admin_indexer_unindexed=Não indexado settings.reindex_button=Adicionar à fila de reindexação @@ -2243,7 +2249,7 @@ settings.webhook.body=Corpo settings.webhook.replay.description=Voltar a executar este automatismo web. settings.webhook.replay.description_disabled=Para reexecutar este automatismo web, habilite-o. settings.webhook.delivery.success=Foi adicionado um evento à fila de entrega. Pode demorar alguns segundos a aparecer no histórico de entregas. -settings.githooks_desc=Os Automatismos do Git são executados pelo próprio Git. Pode editar os ficheiros de automatismo abaixo para configurar operações personalizadas. +settings.githooks_desc=Os automatismos do Git são executados pelo próprio Git. Pode editar os ficheiros de automatismo abaixo para configurar operações personalizadas. settings.githook_edit_desc=Se o automatismo estiver desligado, será apresentado um conteúdo de teste. Deixar o conteúdo em branco irá desabilitar este automatismo. settings.githook_name=Nome do automatismo settings.githook_content=Conteúdo do automatismo @@ -2311,7 +2317,7 @@ settings.event_package=Pacote settings.event_package_desc=Pacote criado ou eliminado num repositório. settings.branch_filter=Filtro de ramos settings.branch_filter_desc=Lista dos ramos a serem considerados nos eventos de envio e de criação e eliminação de ramos, especificada como um padrão glob. Se estiver em branco ou for *, serão reportados eventos para todos os ramos. Veja a documentação github.com/gobwas/glob para ver os detalhes da sintaxe. Exemplos: trunk, {trunk,release*}. -settings.authorization_header=Cabeçalho de Autorização +settings.authorization_header=Cabeçalho de autorização settings.authorization_header_desc=Será incluído como cabeçalho de autorização para pedidos, quando estiver presente. Exemplos: %s. settings.active=Em funcionamento settings.active_helper=Será enviada informação sobre os eventos despoletadores para o URL deste automatismo web. @@ -2363,7 +2369,7 @@ settings.protected_branch.delete_rule=Eliminar regra settings.protected_branch_can_push=Permitir envios? settings.protected_branch_can_push_yes=Pode enviar settings.protected_branch_can_push_no=Não pode enviar -settings.branch_protection=Salvaguarda do ramo '%s' +settings.branch_protection=Regras de salvaguarda do ramo '%s' settings.protect_this_branch=Habilitar salvaguarda do ramo settings.protect_this_branch_desc=Impede a eliminação e restringe envios e integrações do Git no ramo. settings.protect_disable_push=Desabilitar envios @@ -2406,10 +2412,10 @@ settings.require_signed_commits_desc=Rejeitar envios para este ramo que não est settings.protect_branch_name_pattern=Padrão do nome do ramo protegido settings.protect_branch_name_pattern_desc=Padrões de nomes de ramos protegidos. Consulte a documentação para ver a sintaxe dos padrões. Exemplos: main, release/** settings.protect_patterns=Padrões -settings.protect_protected_file_patterns=Padrões de ficheiros protegidos (separados com ponto e vírgula ';'): -settings.protect_protected_file_patterns_desc=Ficheiros protegidos não podem ser modificados imediatamente, mesmo que o utilizador tenha direitos para adicionar, editar ou eliminar ficheiros neste ramo. Múltiplos padrões podem ser separados com ponto e vírgula (';'). Veja a documentação em github.com/gobwas/glob para ver a sintaxe. Exemplos: .drone.yml, /docs/**/*.txt. -settings.protect_unprotected_file_patterns=Padrões de ficheiros desprotegidos (separados com ponto e vírgula ';'): -settings.protect_unprotected_file_patterns_desc=Ficheiros desprotegidos que podem ser modificados imediatamente se o utilizador tiver direitos de escrita, contornando a restrição no envio. Múltiplos padrões podem ser separados com ponto e vírgula (';'). Veja a documentação em github.com/gobwas/glob para ver a sintaxe. Exemplos: .drone.yml, /docs/**/*.txt. +settings.protect_protected_file_patterns=Padrões de ficheiros protegidos (separados com ponto e vírgula ";"): +settings.protect_protected_file_patterns_desc=Ficheiros protegidos não podem ser modificados imediatamente, mesmo que o utilizador tenha direitos para adicionar, editar ou eliminar ficheiros neste ramo. Múltiplos padrões podem ser separados com ponto e vírgula (";"). Veja a documentação em github.com/gobwas/glob para ver a sintaxe. Exemplos: .drone.yml, /docs/**/*.txt. +settings.protect_unprotected_file_patterns=Padrões de ficheiros desprotegidos (separados com ponto e vírgula ";"): +settings.protect_unprotected_file_patterns_desc=Ficheiros desprotegidos que podem ser modificados imediatamente se o utilizador tiver direitos de escrita, contornando a restrição no envio. Padrões múltiplos podem ser separados com ponto e vírgula (";"). Veja a documentação em github.com/gobwas/glob para ver a sintaxe. Exemplos: .drone.yml, /docs/**/*.txt. settings.add_protected_branch=Habilitar salvaguarda settings.delete_protected_branch=Desabilitar salvaguarda settings.update_protect_branch_success=A salvaguarda do ramo "%s" foi modificada. @@ -2425,12 +2431,12 @@ settings.block_outdated_branch=Bloquear integração se o pedido de integração settings.block_outdated_branch_desc=A integração não será possível quando o ramo de topo estiver abaixo do ramo base. settings.default_branch_desc=Escolha um ramo do repositório como sendo o predefinido para pedidos de integração e cometimentos: settings.merge_style_desc=Estilos de integração -settings.default_merge_style_desc=Tipo de integração predefinido para pedidos de integração: +settings.default_merge_style_desc=Tipo de integração predefinido settings.choose_branch=Escolha um ramo… settings.no_protected_branch=Não existem ramos protegidos. settings.edit_protected_branch=Editar settings.protected_branch_required_rule_name=Nome de regra obrigatório -settings.protected_branch_duplicate_rule_name=Nome de regra duplicado +settings.protected_branch_duplicate_rule_name=Já existe uma regra para este conjunto de ramos settings.protected_branch_required_approvals_min=O número mínimo exigido de aprovações não pode ser negativo. settings.tags=Etiquetas settings.tags.protection=Proteger etiquetas @@ -2439,7 +2445,7 @@ settings.tags.protection.allowed=Com permissão settings.tags.protection.allowed.users=Utilizadores com permissão settings.tags.protection.allowed.teams=Equipas com permissão settings.tags.protection.allowed.noone=Ninguém -settings.tags.protection.create=Proteger etiqueta +settings.tags.protection.create=Adicionar regra settings.tags.protection.none=Não há etiquetas protegidas. settings.tags.protection.pattern.description=Pode usar um só nome ou um padrão glob ou uma expressão regular para corresponder a várias etiquetas. Para mais informações leia o guia das etiquetas protegidas. settings.bot_token=Código do bot @@ -2470,7 +2476,7 @@ settings.lfs_findcommits=Procurar cometimentos settings.lfs_lfs_file_no_commits=Não foram encontrados quaisquer cometimentos para este ficheiro LFS settings.lfs_noattribute=Esta localização não tem o atributo bloqueável no ramo principal settings.lfs_delete=Eliminar ficheiro LFS com o OID %s -settings.lfs_delete_warning=Eliminar um ficheiro LFS pode causar erros do tipo 'elemento não existe' no checkout. Tem a certeza? +settings.lfs_delete_warning=Eliminar um ficheiro LFS pode causar erros do tipo "elemento não existe" no checkout. Tem a certeza? settings.lfs_findpointerfiles=Procurar ficheiros apontadores settings.lfs_locks=Bloqueios settings.lfs_invalid_locking_path=Localização inválida: %s @@ -2535,7 +2541,7 @@ diff.comment.add_single_comment=Adicionar um único comentário diff.comment.add_review_comment=Adicionar comentário diff.comment.start_review=Iniciar revisão diff.comment.reply=Responder -diff.review=Revisão +diff.review=Terminar revisão diff.review.header=Submeter revisão diff.review.placeholder=Comentário da revisão diff.review.comment=Comentar @@ -2603,7 +2609,7 @@ release.tags_for=Etiquetas para %s branch.name=Nome do ramo branch.already_exists=Já existe um ramo com o nome "%s". branch.delete_head=Eliminar -branch.delete=`Eliminar o ramo "%s"` +branch.delete=Eliminar o ramo "%s" branch.delete_html=Eliminar ramo branch.delete_desc=Eliminar um ramo é algo permanente. Embora o ramo eliminado possa continuar a existir por um breve período de tempo antes de ser realmente removido, a operação NÃO PODERÁ ser desfeita na maioria dos casos. Quer continuar? branch.deletion_success=O ramo "%s" foi eliminado. @@ -2620,9 +2626,9 @@ branch.restore_success=O ramo "%s" foi restaurado. branch.restore_failed=Falhou a restauração do ramo "%s". branch.protected_deletion_failed=O ramo "%s" está protegido, não pode ser eliminado. branch.default_deletion_failed=O ramo "%s" é o ramo principal, não pode ser eliminado. -branch.restore=`Restaurar o ramo "%s"` -branch.download=`Descarregar o ramo "%s"` -branch.rename=`Renomear ramo "%s"` +branch.restore=Restaurar o ramo "%s" +branch.download=Descarregar o ramo "%s" +branch.rename=Renomear o ramo "%s" branch.search=Pesquisar ramo branch.included_desc=Este ramo faz parte do ramo principal branch.included=Incluído @@ -2646,7 +2652,7 @@ tag.create_success=A etiqueta "%s" foi criada. topic.manage_topics=Gerir tópicos topic.done=Concluído topic.count_prompt=Não pode escolher mais do que 25 tópicos -topic.format_prompt=Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') ou pontos ('.') e podem ter até 35 caracteres. As letras têm que ser minúsculas. +topic.format_prompt=Os tópicos devem começar com uma letra ou um número, podem incluir traços ("-") ou pontos (".") e podem ter até 35 caracteres. As letras têm que ser minúsculas. find_file.go_to_file=Ir para o ficheiro find_file.no_matching=Não foi encontrado qualquer ficheiro correspondente @@ -2664,7 +2670,7 @@ admin.update_flags = Modificar marcadores admin.flags_replaced = Os marcadores do repositório foram substituídos commits.browse_further = Explorar mais um pouco commits.renamed_from = Renomeado de %s -size_format = %[1]s: %[2]s, %[3]s: %[4]s +size_format = %[1]s: %[2]s; %[3]s: %[4]s issues.archived_label_description = (arquivado) %s admin.failed_to_replace_flags = Falhou a reposição dos marcadores do repositório open_with_editor = Abrir com %s @@ -2680,6 +2686,55 @@ migrate.forgejo.description = Migrar dados de codeberg.org ou de outras instânc n_commit_one = %s cometimento editor.commit_id_not_matching = O ID de cometimento não corresponde ao que estava a editar. Cometa para um ramo novo e depois integre. commits.search_branch = Este ramo +pulls.title_desc_one = quer integrar %[1]d cometimento do ramo %[2]s no ramo %[3]s +pulls.reopen_failed.base_branch = O pedido de integração não pode ser reaberto porque o ramo base já não existe. +activity.navbar.code_frequency = Frequência de programação +settings.units.add_more = Adicionar mais... +settings.wiki_rename_branch_main_desc = Renomear o ramo usado internamente pelo Wiki para "%s". Esta operação é permanente e não poderá ser revertida. +settings.add_collaborator_blocked_our = Não foi possível adicionar o/a colaborador/a porque o/a proprietário/a do repositório bloqueou-os. +settings.add_webhook.invalid_path = A localização não pode conter "." ou ".." ou ficar em branco. Não pode começar ou terminar com uma barra. +settings.graphql_url = URL do GraphQL +pulls.commit_ref_at = `referiu este pedido de integração a partir de um cometimento %[2]s` +settings.confirm_wiki_branch_rename = Renomear o ramo do wiki +settings.wiki_branch_rename_success = O nome do ramo do wiki do repositório foi normalizado com sucesso. +settings.wiki_branch_rename_failure = Falhou a normalização do nome do ramo do wiki do repositório. +settings.add_collaborator_blocked_them = Não foi possível adicionar o colaborador porque bloquearam o/a proprietário/a do repositório. +pulls.made_using_agit =AGit +settings.confirmation_string = Texto de confirmação +settings.event_pull_request_enforcement = Execução +pulls.blocked_by_user = Não pode criar um pedido de integração neste repositório porque foi bloqueado/a pelo/a proprietário/a do repositório. +pulls.reopen_failed.head_branch = O pedido de integração não pode ser reaberto porque o ramo de topo já não existe. +wiki.cancel = Cancelar +settings.wiki_rename_branch_main = Normalizar o nome do ramo do Wiki +settings.enforce_on_admins = Impor esta regra nos administradores de repositórios +settings.enforce_on_admins_desc = Os administradores de repositórios não podem contornar esta regra. +release.download_count_one = %s descarga +release.download_count_few = %s descargas +release.system_generated = Este anexo é gerado automaticamente. +pulls.ready_for_review = Pronto/a para rever? +settings.units.units = Unidades do repositório +error.broken_git_hook = Os automatismos git deste repositório parecem estar danificados. Consulte a documentação sobre como os consertar e depois envie alguns cometimentos para refrescar o estado. +settings.rename_branch_failed_protected = Não é possível renomear o ramo %s porque é um ramo protegido. +settings.units.overview = Visão geral +activity.navbar.recent_commits = Cometimentos recentes +settings.wiki_globally_editable = Permitir que qualquer pessoa edite o wiki +settings.wiki_rename_branch_main_notices_1 = Esta operação NÃO pode ser revertida. +settings.wiki_rename_branch_main_notices_2 = Isto irá renomear permanentemente o ramo interno do wiki do repositório %s. Os checkouts existentes terão de ser refrescados. +settings.sourcehut_builds.manifest_path = Localização do manifesto da construção +settings.sourcehut_builds.visibility = Visibilidade do trabalho +settings.sourcehut_builds.secrets = Segredos +settings.matrix.room_id_helper = O ID da Sala pode ser obtido no cliente web Element > Configurações da sala > Avançado > ID interno da sala. Exemplo: %s. +settings.web_hook_name_sourcehut_builds = Construções do SourceHut +settings.enter_repo_name = Insira o nome do/a proprietário/a e do repositório tal como é apresentado: +issues.comment.blocked_by_user = Não pode criar um comentário nesta questão porque foi bloqueado/a pelo/a proprietário/a ou pelo remetente da questão. +pulls.merged_title_desc_one = integrou %[1]d cometimento do ramo %[2]s no ramo %[3]s %[4]s +pulls.agit_explanation = Criado usando a sequência de trabalho AGit. AGit deixa os contribuidores proporem alterações usando "git push" sem criar uma derivação ou um ramo novo. +settings.new_owner_blocked_doer = O/A novo/a proprietário/a bloqueou-o/a. +settings.matrix.access_token_helper = É recomendado criar uma conta Matrix só para isto. O código de acesso pode ser obtido a partir do cliente web Element (num separador privado/incógnito) > Menu de utilizador (canto superior esquerdo) > Todas as configurações > Ajuda e sobre > Avançado > Código de acesso (logo abaixo do URL do servidor caseiro). Feche o separador privado/incógnito (terminar a sessão iria invalidar o código). +settings.sourcehut_builds.secrets_helper = Dar, ao trabalho, acesso aos segredos da construção (requer a permissão SECRETS:RO) +settings.sourcehut_builds.access_token_helper = Código de acesso que tem a permissão JOBS:RW. Gera um código builds.sr.ht ou um código builds.sr.ht com acesso aos segredos em meta.sr.ht. +release.hide_archive_links = Esconder arquivos gerados automaticamente +release.hide_archive_links_helper = Esconder arquivos de código-fonte gerados automaticamente para este lançamento. Por exemplo, se estiver a carregar o seu próprio. [graphs] component_loading=A carregar %s... @@ -2687,6 +2742,8 @@ component_loading_failed=Não foi possível carregar %s component_loading_info=Isto pode demorar um pouco… component_failed_to_load=Ocorreu um erro inesperado. contributors.what=contribuições +code_frequency.what = frequência de programação +recent_commits.what = cometimentos recentes [org] org_name_holder=Nome da organização @@ -2727,7 +2784,7 @@ settings.visibility=Visibilidade settings.visibility.public=Público settings.visibility.limited=Limitada (visível apenas para utilizadores autenticados) settings.visibility.limited_shortname=Limitada -settings.visibility.private=Privada (visível apenas para os membros da organização) +settings.visibility.private=Privada (visível apenas para membros da organização) settings.visibility.private_shortname=Privado settings.update_settings=Modificar configurações @@ -2811,6 +2868,7 @@ teams.all_repositories_admin_permission_desc=Esta equipa atribui o acesso de %s na organização%s. teams.invite.by=Convidado(a) por %s teams.invite.description=Clique no botão abaixo para se juntar à equipa. +follow_blocked_user = Não pode seguir esta organização porque esta organização bloqueou-o/a. [admin] dashboard=Painel de controlo @@ -2818,7 +2876,7 @@ self_check=Auto-verificação identity_access=Identidade e acesso users=Contas de utilizador organizations=Organizações -assets=Recursos de código +assets=Recursos do código-fonte repositories=Repositórios hooks=Automatismos web integrations=Integrações @@ -2859,8 +2917,8 @@ dashboard.delete_repo_archives.started=Foi iniciada a tarefa de eliminação de dashboard.delete_missing_repos=Eliminar todos os repositórios que não tenham os seus ficheiros Git dashboard.delete_missing_repos.started=Foi iniciada a tarefa de eliminação de todos os repositórios que não têm ficheiros git. dashboard.delete_generated_repository_avatars=Eliminar avatares gerados do repositório -dashboard.sync_repo_branches=Sincronizar ramos perdidos de dados do git para bases de dados -dashboard.sync_repo_tags=Sincronizar etiquetas dos dados do git para a base de dados +dashboard.sync_repo_branches=Sincronizar ramos perdidos de dados do Git para a base de dados +dashboard.sync_repo_tags=Sincronizar etiquetas dos dados do Git para a base de dados dashboard.update_mirrors=Sincronizar réplicas dashboard.repo_health_check=Verificar a saúde de todos os repositórios dashboard.check_repo_stats=Verificar as estatísticas de todos os repositórios @@ -2868,9 +2926,9 @@ dashboard.archive_cleanup=Eliminar arquivos de repositórios antigos dashboard.deleted_branches_cleanup=Limpar ramos eliminados dashboard.update_migration_poster_id=Sincronizar os IDs do remetente da migração dashboard.git_gc_repos=Fazer a recolha do lixo em todos os repositórios -dashboard.resync_all_sshkeys=Sincronizar o ficheiro '.ssh/authorized_keys' com as chaves SSH do Forgejo. -dashboard.resync_all_sshprincipals=Modificar o ficheiro '.ssh/authorized_principals' com os protagonistas SSH do Forgejo. -dashboard.resync_all_hooks=Voltar a sincronizar automatismos de pré-acolhimento, modificação e pós-acolhimento de todos os repositórios. +dashboard.resync_all_sshkeys=Sincronizar o ficheiro ".ssh/authorized_keys" com as chaves SSH do Forgejo. +dashboard.resync_all_sshprincipals=Modificar o ficheiro ".ssh/authorized_principals" com os protagonistas SSH do Forgejo. +dashboard.resync_all_hooks=Voltar a sincronizar automatismos de pré-acolhimento, modificação e pós-acolhimento de todos os repositórios dashboard.reinit_missing_repos=Reinicializar todos os repositórios Git em falta para os quais existam registos dashboard.sync_external_users=Sincronizar dados externos do utilizador dashboard.cleanup_hook_task_table=Limpar tabela hook_task @@ -2897,14 +2955,14 @@ dashboard.mspan_structures_obtained=Estruturas MSpan obtidas dashboard.mcache_structures_usage=Uso das estruturas MCache dashboard.mcache_structures_obtained=Estruturas MCache obtidas dashboard.profiling_bucket_hash_table_obtained=Perfil obtido da tabela de hash do balde -dashboard.gc_metadata_obtained=Metadados da recolha de lixo obtidos +dashboard.gc_metadata_obtained=Metadados obtidos da recolha de lixo dashboard.other_system_allocation_obtained=Outras alocações de sistema obtidas dashboard.next_gc_recycle=Próxima reciclagem da recolha de lixo dashboard.last_gc_time=Tempo decorrido desde a última recolha de lixo dashboard.total_gc_time=Pausa total da recolha de lixo dashboard.total_gc_pause=Pausa total da recolha de lixo dashboard.last_gc_pause=Última pausa da recolha de lixo -dashboard.gc_times=Tempos da recolha de lixo +dashboard.gc_times=N.º de recolhas de lixo dashboard.delete_old_actions=Eliminar todas as operações antigas da base de dados dashboard.delete_old_actions.started=Foi iniciado o processo de eliminação de todas as operações antigas da base de dados. dashboard.update_checker=Verificador de novas versões @@ -2918,7 +2976,7 @@ dashboard.sync_branch.started=Sincronização de ramos iniciada dashboard.sync_tag.started=Sincronização de etiquetas iniciada dashboard.rebuild_issue_indexer=Reconstruir indexador de questões -users.user_manage_panel=Gestão das contas de utilizadores +users.user_manage_panel=Gerir contas de utilizador users.new_account=Criar conta de utilizador users.name=Nome de utilizador users.full_name=Nome completo @@ -2946,10 +3004,10 @@ users.max_repo_creation=Número máximo de repositórios users.max_repo_creation_desc=(insira -1 para usar o limite predefinido a nível global) users.is_activated=A conta de utilizador está em funcionamento users.prohibit_login=Desabilitar início de sessão -users.is_admin=É administrador(a) -users.is_restricted=É restrito +users.is_admin=É administrador/a +users.is_restricted=A conta é restrita users.allow_git_hook=Pode criar automatismos do Git -users.allow_git_hook_tooltip=Os Automatismos do Git são executados em nome do utilizador do sistema operativo que corre o Forgejo e têm o mesmo nível de acesso ao servidor. Por causa disso, utilizadores com este privilégio especial de Automatismo do Git podem aceder e modificar todos os repositórios do Forgejo, assim como a base de dados usada pelo Forgejo. Consequentemente, também podem ganhar privilégios de administrador do Forgejo. +users.allow_git_hook_tooltip=Os automatismos do Git são executados em nome do utilizador do sistema operativo que corre o Forgejo e têm o mesmo nível de acesso ao servidor. Por causa disso, utilizadores com este privilégio especial de automatismo do Git podem aceder e modificar todos os repositórios do Forgejo, assim como a base de dados usada pelo Forgejo. Consequentemente, também podem ganhar privilégios de administrador do Forgejo. users.allow_import_local=Pode importar repositórios locais users.allow_create_organization=Pode criar organizações users.update_profile=Modificar conta do utilizador @@ -2958,7 +3016,7 @@ users.cannot_delete_self=Não se pode eliminar a si próprio users.still_own_repo=Este utilizador ainda possui um ou mais repositórios. Elimine ou transfira esses repositórios primeiro. users.still_has_org=Este utilizador é membro de uma organização. Remova, primeiro, o utilizador de todas as organizações. users.purge=Eliminar utilizador -users.purge_help=Eliminar o utilizador à força, juntamente com todos os seus repositórios, organizações e pacotes. Também serão eliminados todos os seus comentários. +users.purge_help=Eliminar o utilizador à força, juntamente com todos os seus repositórios, organizações e pacotes. Também serão eliminados todos os comentários e questões criados por este utilizador. users.still_own_packages=Este utilizador ainda possui um ou mais pacotes, elimine esses pacotes primeiro. users.deletion_success=A conta de utilizador foi eliminada. users.reset_2fa=Reinicializar a autenticação em dois passos @@ -2969,14 +3027,14 @@ users.list_status_filter.not_active=Desligado users.list_status_filter.is_admin=Administrador users.list_status_filter.not_admin=Não Administrador users.list_status_filter.is_restricted=Restrito -users.list_status_filter.not_restricted=Não restrito +users.list_status_filter.not_restricted=Não restrito/a users.list_status_filter.is_prohibit_login=Proibir início de sessão users.list_status_filter.not_prohibit_login=Permitir início de sessão users.list_status_filter.is_2fa_enabled=Autenticação em dois passos habilitada users.list_status_filter.not_2fa_enabled=Autenticação em dois passos desabilitada users.details=Detalhes do utilizador -emails.email_manage_panel=Gestão de endereços de email do utilizador +emails.email_manage_panel=Gerir endereços de email do utilizador emails.primary=Principal emails.activated=Em uso emails.filter_sort.email=Email @@ -2989,13 +3047,13 @@ emails.duplicate_active=Este endereço de email já está a ser usado por outro emails.change_email_header=Modificar propriedades do email emails.change_email_text=Tem a certeza que quer modificar este endereço de email? -orgs.org_manage_panel=Gestão das organizações +orgs.org_manage_panel=Gerir organizações orgs.name=Nome orgs.teams=Equipas orgs.members=Membros orgs.new_orga=Nova organização -repos.repo_manage_panel=Gestão dos repositórios +repos.repo_manage_panel=Gerir repositórios repos.unadopted=Repositórios não adoptados repos.unadopted.no_more=Não foram encontrados mais repositórios não adoptados repos.owner=Proprietário(a) @@ -3008,7 +3066,7 @@ repos.issues=Questões repos.size=Tamanho repos.lfs_size=Tamanho do LFS -packages.package_manage_panel=Gestão de pacotes +packages.package_manage_panel=Gerir pacotes packages.total_size=Tamanho total: %s packages.unreferenced_size=Tamanho não referenciado: %s packages.cleanup=Limpar dados expirados @@ -3032,7 +3090,7 @@ systemhooks.desc=Os automatismos web fazem pedidos HTTP POST automaticamente a u systemhooks.add_webhook=Adicionar automatismo web do sistema systemhooks.update_webhook=Modificar automatismo web do sistema -auths.auth_manage_panel=Gestão das fontes de autenticação +auths.auth_manage_panel=Gerir fontes de autenticação auths.new=Adicionar fonte de autenticação auths.name=Nome auths.type=Tipo @@ -3052,18 +3110,18 @@ auths.user_dn=DN do utilizador auths.attribute_username=Atributo do nome de utilizador auths.attribute_username_placeholder=Deixe em branco para usar o nome de utilizador inserido no Forgejo. auths.attribute_name=Atributo do Primeiro Nome -auths.attribute_surname=Atributo do Sobrenome +auths.attribute_surname=Atributo do sobrenome auths.attribute_mail=Atributo do email auths.attribute_ssh_public_key=Atributo da chave pública SSH auths.attribute_avatar=Atributo do avatar -auths.attributes_in_bind=Buscar os atributos no contexto de Bind DN +auths.attributes_in_bind=Buscar atributos no contexto do Bind DN auths.allow_deactivate_all=Permitir que um resultado de pesquisa vazio desabilite todos os utilizadores auths.use_paged_search=Usar pesquisa paginada auths.search_page_size=Tamanho da página auths.filter=Filtro de utilizador auths.admin_filter=Filtro de administrador auths.restricted_filter=Filtro restrito -auths.restricted_filter_helper=Deixe em branco para não definir quaisquer utilizadores como restritos. Use um asterisco ('*') para definir todos os utilizadores que não correspondam ao filtro de administrador como restritos. +auths.restricted_filter_helper=Deixe em branco para não definir quaisquer utilizadores como restritos. Use um asterisco ("*") para definir todos os utilizadores que não correspondam ao filtro de administrador como restritos. auths.verify_group_membership=Verificar associação ao grupo no LDAP (deixe o filtro vazio para ignorar) auths.group_search_base=Base DN para a pesquisa de grupos auths.group_attribute_list_users=Atributo de grupo que contém a lista de utilizadores @@ -3076,7 +3134,7 @@ auths.smtp_auth=Tipo de autenticação SMTP auths.smtphost=Servidor SMTP auths.smtpport=Porto do SMTP auths.allowed_domains=Domínios permitidos -auths.allowed_domains_helper=Deixe em branco para permitir todos os domínios. Separe múltiplos domínios com uma vírgula (','). +auths.allowed_domains_helper=Deixe em branco para permitir todos os domínios. Separe múltiplos domínios com uma vírgula (","). auths.skip_tls_verify=Ignorar validação TLS auths.force_smtps=Forçar SMTPS auths.force_smtps_helper=SMTPS é usado sempre no porto 465. Defina um valor para forçar o SMTPS a usar outros portos (caso contrário será usado STARTTLS noutros portos, se for suportado pelo servidor). @@ -3099,13 +3157,13 @@ auths.skip_local_two_fa=Ignorar a autenticação em dois passos local auths.skip_local_two_fa_helper=Deixar esta opção desligada faz com que os utilizadores locais que tenham a autenticação em dois passos habilitada sejam obrigados a passar por ela para iniciar a sessão auths.oauth2_tenant=Locatário auths.oauth2_scopes=Âmbitos adicionais -auths.oauth2_required_claim_name=Nome de Reivindicação obrigatório +auths.oauth2_required_claim_name=Nome de reivindicação obrigatório auths.oauth2_required_claim_name_helper=Defina este nome para restringir o início de sessão desta fonte a utilizadores que tenham uma reivindicação com este nome -auths.oauth2_required_claim_value=Valor de Reivindicação obrigatório +auths.oauth2_required_claim_value=Valor de reivindicação obrigatório auths.oauth2_required_claim_value_helper=Defina este valor para restringir o início de sessão desta fonte a utilizadores que tenham uma reivindicação com este nome e este valor auths.oauth2_group_claim_name=Reivindicar nome que fornece nomes de grupo para esta fonte. (Opcional) -auths.oauth2_admin_group=Valor da Reivindicação de Grupo para utilizadores administradores. (Opcional - exige a reivindicação de nome acima) -auths.oauth2_restricted_group=Valor da Reivindicação de Grupo para utilizadores restritos. (Opcional - exige a reivindicação de nome acima) +auths.oauth2_admin_group=Valor da reivindicação de grupo para utilizadores administradores (opcional — exige a reivindicação de nome acima). +auths.oauth2_restricted_group=Valor da reivindicação de grupo para utilizadores restritos (opcional — exige a reivindicação de nome acima). auths.oauth2_map_group_to_team=Mapear grupos reclamados em equipas da organização (opcional — requer nome de reclamação acima). auths.oauth2_map_group_to_team_removal=Remover utilizadores das equipas sincronizadas se esses utilizadores não pertencerem ao grupo correspondente. auths.enable_auto_register=Habilitar o registo automático @@ -3123,7 +3181,7 @@ auths.tips=Dicas auths.tips.oauth2.general=Autenticação OAuth2 auths.tips.oauth2.general.tip=Ao registar uma nova autenticação OAuth2, o URL da ligação de retorno ou do reencaminhamento deve ser: auths.tip.oauth2_provider=Fornecedor OAuth2 -auths.tip.bitbucket=Registe um novo consumidor de OAuth em https://bitbucket.org/account/user//oauth-consumers/new e adicione a permissão 'Account' - 'Read' +auths.tip.bitbucket=Registe um novo consumidor de OAuth em https://bitbucket.org/account/user//oauth-consumers/new e adicione a permissão "Account" - "Read" auths.tip.nextcloud=`Registe um novo consumidor OAuth na sua instância usando o seguinte menu "Configurações → Segurança → Cliente OAuth 2.0"` auths.tip.dropbox=Crie uma nova aplicação em https://www.dropbox.com/developers/apps auths.tip.facebook=`Registe uma nova aplicação em https://developers.facebook.com/apps e adicione o produto "Facebook Login"` @@ -3152,14 +3210,14 @@ auths.unable_to_initialize_openid=Não é possível inicializar o Fornecedor de auths.invalid_openIdConnectAutoDiscoveryURL=URL de descoberta automática inválido (tem que ser um URL válido começando com http:// ou https://) config.server_config=Configuração do servidor -config.app_name=Título do sítio +config.app_name=Título da instância config.app_ver=Versão do Forgejo -config.app_url=URL base do Forgejo +config.app_url=URL base config.custom_conf=Localização do ficheiro de configuração config.custom_file_root_path=Localização dos ficheiros personalizados config.domain=Domínio do servidor config.offline_mode=Modo local -config.disable_router_log=Desabilitar registos do encaminhador +config.disable_router_log=Desabilitar registos do encaminhador (router) config.run_user=Executa com este nome de utilizador config.run_mode=Modo de execução config.git_version=Versão do Git @@ -3168,7 +3226,7 @@ config.repo_root_path=Localização dos repositórios config.lfs_root_path=Localização dos LFS config.log_file_root_path=Localização dos registos config.script_type=Tipo de script -config.reverse_auth_user=Utilizador de autenticação reversa +config.reverse_auth_user=Utilizador de autenticação do reverse proxy config.ssh_config=Configuração SSH config.ssh_enabled=Habilitado @@ -3178,7 +3236,7 @@ config.ssh_port=Porto config.ssh_listen_port=Porto de escuta config.ssh_root_path=Localização base config.ssh_key_test_path=Localização do teste das chaves -config.ssh_keygen_path=Localização do gerador de chaves ('ssh-keygen') +config.ssh_keygen_path=Localização do gerador de chaves ("ssh-keygen") config.ssh_minimum_key_size_check=Verificação de tamanho mínimo da chave config.ssh_minimum_key_sizes=Tamanhos mínimos da chave @@ -3204,11 +3262,11 @@ config.allow_only_external_registration=Permitir a inscrição somente por meio config.enable_openid_signup=Habilitar a auto-inscrição com OpenID config.enable_openid_signin=Habilitar início de sessão com OpenID config.show_registration_button=Mostrar botão de registo -config.require_sign_in_view=Exigir sessão iniciada para visualizar páginas +config.require_sign_in_view=Exigir sessão iniciada para visualizar o conteúdo config.mail_notify=Habilitar notificações por email config.enable_captcha=Habilitar o CAPTCHA -config.active_code_lives=Duração do código que está em uso -config.reset_password_code_lives=Prazo do código de recuperação da conta +config.active_code_lives=Prazo do código de habilitação +config.reset_password_code_lives=Prazo do código de recuperação config.default_keep_email_private=Esconder, por norma, os endereços de email config.default_allow_create_organization=Permitir, por norma, a criação de organizações config.enable_timetracking=Habilitar a contagem de tempo @@ -3219,7 +3277,7 @@ config.default_visibility_organization=Visibilidade predefinida para as novas or config.default_enable_dependencies=Habilitar, por norma, dependências nas questões config.webhook_config=Configuração do automatismo web -config.queue_length=Tamanho da fila +config.queue_length=Comprimento da fila config.deliver_timeout=Prazo da entrega config.skip_tls_verify=Ignorar validação TLS @@ -3228,7 +3286,7 @@ config.mailer_enabled=Habilitado config.mailer_enable_helo=Habilitar HELO config.mailer_name=Nome config.mailer_protocol=Protocolo -config.mailer_smtp_addr=Endereço SMTP +config.mailer_smtp_addr=Anfitrião SMTP config.mailer_smtp_port=Porto do SMTP config.mailer_user=Utilizador config.mailer_use_sendmail=Usar o sendmail @@ -3251,11 +3309,11 @@ config.cache_interval=Intervalo de cache config.cache_conn=Conexão de cache config.cache_item_ttl=TTL do item de cache -config.session_config=Configuração de sessão +config.session_config=Configuração da sessão config.session_provider=Fornecedor da sessão config.provider_config=Configuração do fornecedor config.cookie_name=Nome do cookie -config.gc_interval_time=Intervalo da recolha do lixo +config.gc_interval_time=Intervalo de tempo entre recolhas do lixo config.session_life_time=Tempo de vida da sessão config.https_only=Apenas HTTPS config.cookie_life_time=Tempo de vida do cookie @@ -3265,14 +3323,14 @@ config.picture_service=Serviço de imagem config.disable_gravatar=Desabilitar o Gravatar config.enable_federated_avatar=Habilitar avatares federados -config.git_config=Configuração Git +config.git_config=Configuração do Git config.git_disable_diff_highlight=Desabilitar o realce de sintaxe no diff -config.git_max_diff_lines=Número máximo de linhas diff (por ficheiro) -config.git_max_diff_line_characters=Número máximos de caracteres diff (por linha) +config.git_max_diff_lines=Número máximo de linhas diff por ficheiro +config.git_max_diff_line_characters=Número máximos de caracteres diff por linha config.git_max_diff_files=Número máximo de ficheiros diff a serem apresentados config.git_gc_args=Argumentos da recolha de lixo config.git_migrate_timeout=Prazo da migração -config.git_mirror_timeout=Prazo para sincronização da réplica +config.git_mirror_timeout=Prazo para a sincronização da réplica config.git_clone_timeout=Prazo da operação de clonagem config.git_pull_timeout=Prazo da operação de puxar config.git_gc_timeout=Prazo da operação de recolha de lixo @@ -3316,7 +3374,7 @@ monitor.queue.numberworkers=N.º de trabalhadores monitor.queue.activeworkers=Trabalhadores operantes monitor.queue.maxnumberworkers=N.º máximo de trabalhadores monitor.queue.numberinqueue=N.º na fila -monitor.queue.review_add=Rever / Adicionar trabalhadores +monitor.queue.review_add=Rever / adicionar trabalhadores monitor.queue.settings.title=Configurações do agregado monitor.queue.settings.desc=Agregados crescem dinamicamente em resposta aos bloqueios da sua fila de trabalhadores. monitor.queue.settings.maxnumberworkers=N.º máximo de trabalhadores @@ -3328,7 +3386,7 @@ monitor.queue.settings.remove_all_items=Remover tudo monitor.queue.settings.remove_all_items_done=Todos os itens da fila foram removidos. notices.system_notice_list=Notificações do sistema -notices.view_detail_header=Ver os detalhes da notificação +notices.view_detail_header=Detalhes da notificação notices.operations=Operações notices.select_all=Marcar todas notices.deselect_all=Desmarcar todas @@ -3347,6 +3405,12 @@ self_check.database_collation_mismatch=Supor que a base de dados usa a colação self_check.database_collation_case_insensitive=A base de dados está a usar a colação %s, que é insensível à diferença entre maiúsculas e minúsculas. Embora o Gitea possa trabalhar com ela, pode haver alguns casos raros que não funcionem como esperado. self_check.database_inconsistent_collation_columns=A base de dados está a usar a colação %s, mas estas colunas estão a usar colações diferentes. Isso poderá causar alguns problemas inesperados. self_check.database_fix_mysql=Para utilizadores do MySQL/MariaDB, pode usar o comando "gitea doctor convert" para resolver os problemas de colação. Também pode resolver o problema com comandos SQL "ALTER ... COLLATE ..." aplicados manualmente. +config_summary = Resumo +auths.tips.gmail_settings = Configurações do Gmail: +config_settings = Configurações +auths.tip.gitlab_new = Registe uma nova aplicação em https://gitlab.com/-/profile/applications +config.open_with_editor_app_help = Os editores da opção "Abrir com" do menu da clonagem. Se for deixado em branco, será usado o valor predefinido. Expanda para ver o que está predefinido. +config.allow_dots_in_usernames = Permitir que os utilizadores usem pontos no seu nome de utilizador. Não altera as contas existentes. [action] create_repo=criou o repositório %s @@ -3458,9 +3522,9 @@ dependencies=Dependências keywords=Palavras-chave details=Detalhes details.author=Autor(a) -details.project_site=Página web do projecto -details.repository_site=Página web do repositório -details.documentation_site=Página web da documentação +details.project_site=Sítio web do projecto +details.repository_site=Sítio web do repositório +details.documentation_site=Sítio web da documentação details.license=Licença assets=Recursos versions=Versões @@ -3568,7 +3632,7 @@ owner.settings.cargo.rebuild.success=O índice do Cargo foi reconstruído com su owner.settings.cleanuprules.title=Gerir regras de limpeza owner.settings.cleanuprules.add=Adicionar regra de limpeza owner.settings.cleanuprules.edit=Editar regra de limpeza -owner.settings.cleanuprules.none=Nenhuma regra de limpeza disponível. Por favor, consulte a documentação. +owner.settings.cleanuprules.none=Ainda não há quaisquer regras de limpeza. owner.settings.cleanuprules.preview=Previsão da regra de limpeza owner.settings.cleanuprules.preview.overview=%d pacotes estão agendados para serem removidos. owner.settings.cleanuprules.preview.none=A regra de limpeza não corresponde a nenhum pacote. @@ -3588,6 +3652,7 @@ owner.settings.cleanuprules.success.delete=A regra de limpeza foi eliminada. owner.settings.chef.title=Registo do Chef owner.settings.chef.keypair=Gerar par de chaves owner.settings.chef.keypair.description=É necessário um par de chaves para autenticar no registro Chef. Se você gerou um par de chaves antes, gerar um novo par de chaves irá descartar o par de chaves antigo. +owner.settings.cargo.rebuild.no_index = Não foi possível reconstruir, não há um índice inicializado. [secrets] secrets=Segredos @@ -3602,7 +3667,7 @@ deletion=Remover segredo deletion.description=Remover um segredo é permanente e não pode ser revertido. Continuar? deletion.success=O segredo foi removido. deletion.failed=Falhou ao remover o segredo. -management=Gestão de segredos +management=Gerir segredos [actions] actions=Operações @@ -3619,7 +3684,7 @@ status.skipped=Ignorado status.blocked=Bloqueado runners=Executores -runners.runner_manage_panel=Gestão de executores +runners.runner_manage_panel=Gerir executores runners.new=Criar um novo executor runners.new_notice=Como iniciar um executor runners.status=Estado @@ -3671,15 +3736,15 @@ runs.no_runs=A sequência de trabalho ainda não foi executada. runs.empty_commit_message=(mensagem de cometimento vazia) workflow.disable=Desabilitar sequência de trabalho -workflow.disable_success=A sequência de trabalho '%s' foi desabilitada com sucesso. +workflow.disable_success=A sequência de trabalho "%s" foi desabilitada com sucesso. workflow.enable=Habilitar sequência de trabalho -workflow.enable_success=A sequência de trabalho '%s' foi habilitada com sucesso. +workflow.enable_success=A sequência de trabalho "%s" foi habilitada com sucesso. workflow.disabled=A sequência de trabalho está desabilitada. need_approval_desc=É necessária aprovação para executar sequências de trabalho para a derivação do pedido de integração. variables=Variáveis -variables.management=Gestão de variáveis +variables.management=Gerir variáveis variables.creation=Adicionar variável variables.none=Ainda não há variáveis. variables.deletion=Remover variável @@ -3695,6 +3760,8 @@ variables.update.failed=Falha ao editar a variável. variables.update.success=A variável foi editada. runs.no_workflows.documentation = Para mais informação sobre o Forgejo Action, veja a documentação. runs.no_workflows.quick_start = Não sabe como começar com o Forgejo Action? Veja o guia de iniciação rápida. +runs.no_job_without_needs = A sequência de trabalho tem de conter pelo menos um trabalho sem dependências. +runs.workflow = Sequência de trabalho [projects] type-1.display_name=Planeamento individual @@ -3715,7 +3782,7 @@ submodule=Submódulo [search] org_kind = Pesquisar organizações... keyword_search_unavailable = Pesquisar por palavra-chave não está disponível, neste momento. Entre em contacto com o administrador. -code_search_by_git_grep = Os resultados da pesquisa no código-fonte neste momento são fornecidos pelo "git grep". Esses resultados podem ser melhores se o administrador habilitar o indexador do repositório. +code_search_by_git_grep = Os resultados da pesquisa no código-fonte neste momento são fornecidos pelo "git grep". Esses resultados podem ser melhores se o administrador habilitar o indexador de código-fonte. no_results = Não foram encontrados resultados correspondentes. package_kind = Pesquisar pacotes... runner_kind = Pesquisar executores... @@ -3732,4 +3799,18 @@ repo_kind = Pesquisar repositórios... user_kind = Pesquisar utilizadores... team_kind = Pesquisar equipas... code_kind = Pesquisar código... -code_search_unavailable = A pesquisa de código não está disponível, neste momento. Entre em contacto com o administrador. \ No newline at end of file +code_search_unavailable = A pesquisa de código não está disponível, neste momento. Entre em contacto com o administrador. + +[munits.data] +kib = KiB +mib = MiB +gib = GiB +tib = TiB +pib = PiB +eib = EiB +b = B + +[markup] +filepreview.lines = Linhas %[1]d até %[2]d em %[3]s +filepreview.line = Linha %[1]d em %[2]s +filepreview.truncated = A previsão foi truncada \ No newline at end of file diff --git a/options/locale/locale_ru-RU.ini b/options/locale/locale_ru-RU.ini index 6017980183..7ba9719a05 100644 --- a/options/locale/locale_ru-RU.ini +++ b/options/locale/locale_ru-RU.ini @@ -157,6 +157,7 @@ filter.is_archived = Архивированные filter.not_mirror = Не зеркала more_items = Больше элементов invalid_data = Неверные данные: %v +copy_generic = Копировать в буфер обмена [aria] navbar=Панель навигации @@ -1174,7 +1175,7 @@ migrate.cancel_migrating_title=Отменить перенос migrate.cancel_migrating_confirm=Вы хотите отменить эту миграцию? mirror_from=зеркало из -forked_from=ответвлено от +forked_from=ответвлён от generated_from=создано из fork_from_self=Вы не можете создать ответвление собственного репозитория. fork_guest_user=Войдите, чтобы создать ответвление репозитория. @@ -1784,10 +1785,10 @@ pulls.manually_merged=Слито вручную pulls.merged_info_text=Ветку %s теперь можно удалить. pulls.is_closed=Запрос на слияние закрыт. pulls.title_wip_desc=`Добавьте %s в начало заголовка для защиты от случайного досрочного принятия запроса на слияние` -pulls.cannot_merge_work_in_progress=Этот запрос на слияние помечен как в процессе работы. +pulls.cannot_merge_work_in_progress=Этот запрос слияния помечен как черновик. pulls.still_in_progress=Всё ещё в процессе? -pulls.add_prefix=Добавить %s префикс -pulls.remove_prefix=Удалить %s префикс +pulls.add_prefix=Добавить префикс %s +pulls.remove_prefix=Удалить префикс %s pulls.data_broken=Содержимое этого слияния нарушено из-за удаления информации об ответвлении. pulls.files_conflicted=Этот запрос на слияние имеет изменения конфликтующие с целевой веткой. pulls.is_checking=Продолжается проверка конфликтов. Повторите попытку позже. @@ -1813,7 +1814,7 @@ pulls.wrong_commit_id=id коммита должен быть ид коммит pulls.no_merge_desc=Запрос на слияние не может быть принят, так как отключены все настройки слияния. pulls.no_merge_helper=Включите опции слияния в настройках репозитория или совершите слияние этого запроса вручную. -pulls.no_merge_wip=Данный запрос на слияние не может быть принят, поскольку он помечен как находящийся в разработке. +pulls.no_merge_wip=Этот запрос слияния не может быть принят, поскольку он помечен как черновик. pulls.no_merge_not_ready=Этот запрос не готов к слиянию, обратите внимания на отзывы и проверки. pulls.no_merge_access=У вас нет права для слияния данного запроса. pulls.merge_pull_request=Создать коммит слияния @@ -2486,7 +2487,7 @@ diff.comment.add_single_comment=Добавить простой коммента diff.comment.add_review_comment=Добавить комментарий diff.comment.start_review=Начать рецензию diff.comment.reply=Ответ -diff.review=Рецензия +diff.review=Завершить рецензию diff.review.header=Отправить рецензию diff.review.placeholder=Рецензионный комментарий diff.review.comment=Комментировать @@ -2735,6 +2736,8 @@ settings.sourcehut_builds.access_token_helper = Токен builds.sr.ht с ра settings.matrix.room_id_helper = ID комнаты можно получить в веб-клиенте Element: Настройки комнаты > Подробности > Внутренний ID комнаты. Пример: %s. settings.matrix.access_token_helper = Рекомендуется создать отдельный аккаунт. Токен доступа можно получить в веб-клиенте Element (в приватной вкладке или режиме инкогнито): Пользовательское меню (сверху слева) > Все настройки > Помощь и о программе > Токен доступа (под ссылкой Homeserver). Закройте вкладку/окно, не выходя из Element. Выход аннулирует токен. settings.mirror_settings.pushed_repository = Удалённый репозиторий +release.hide_archive_links = Скрыть автоматически генерируемые архивы +release.hide_archive_links_helper = Скрыть автоматически добавляемые архивы исходного кода для этого релиза. Например, если вы загружаете свои архивы. [graphs] @@ -3403,6 +3406,7 @@ config_settings = Настройки auths.tips.gmail_settings = Настройки Gmail: auths.tip.gitlab_new = Создайте новое приложение в https://gitlab.com/-/profile/applications monitor.queue.review_add = Подробности / добавить рабочих +auths.default_domain_name = Домен по умолчанию для адресов эл. почты [action] @@ -3687,42 +3691,42 @@ status.cancelled=Отменено status.skipped=Пропущено status.blocked=Заблокировано -runners=Раннеры -runners.runner_manage_panel=Управление раннерами -runners.new=Создать новый раннер -runners.new_notice=Как запустить раннер -runners.status=Статус +runners=Исполнители +runners.runner_manage_panel=Управление исполнителями +runners.new=Создать новый исполнитель +runners.new_notice=Как запустить исполнитель +runners.status=Состояние runners.id=ID runners.name=Название runners.owner_type=Тип runners.description=Описание runners.labels=Метки -runners.last_online=Был онлайн -runners.runner_title=Раннер -runners.task_list=Недавние задания на раннере +runners.last_online=Был в сети +runners.runner_title=Исполнитель +runners.task_list=Недавние задания исполнителя runners.task_list.no_tasks=Задания пока нет. runners.task_list.run=Запуск -runners.task_list.status=Статус +runners.task_list.status=Состояние runners.task_list.repository=Репозиторий -runners.task_list.commit=коммит +runners.task_list.commit=Коммит runners.task_list.done_at=Время завершения -runners.edit_runner=Изменить раннер +runners.edit_runner=Изменить исполнитель runners.update_runner=Обновить изменения -runners.update_runner_success=Раннер успешно обновлён -runners.update_runner_failed=Не удалось обновить раннер -runners.delete_runner=Удалить этот раннер -runners.delete_runner_success=Раннер успешно удалён -runners.delete_runner_failed=Не удалось удалить раннер -runners.delete_runner_header=Подтвердите удаление раннера -runners.delete_runner_notice=Если на этом раннере выполняется задание, оно будет завершено и помечено как неудачное. Это может нарушить рабочий поток сборки. -runners.none=Нет доступных раннеров +runners.update_runner_success=Исполнитель успешно обновлён +runners.update_runner_failed=Не удалось обновить исполнитель +runners.delete_runner=Удалить этот исполнитель +runners.delete_runner_success=Исполнитель успешно удалён +runners.delete_runner_failed=Не удалось удалить исполнитель +runners.delete_runner_header=Подтвердите удаление исполнителя +runners.delete_runner_notice=Если на этом исполнителе выполняется задание, оно будет завершено и помечено как неудачное. Это может нарушить рабочий поток при сборке. +runners.none=Нет доступных исполнителей runners.status.unspecified=Неизвестно runners.status.idle=Простаивает runners.status.active=Активный runners.status.offline=Недоступен runners.version=Версия -runners.reset_registration_token=Сброс регистрационного токена -runners.reset_registration_token_success=Токен регистрации раннера успешно сброшен +runners.reset_registration_token=Сброс токена регистрации +runners.reset_registration_token_success=Токен регистрации исполнителя успешно сброшен runs.all_workflows=Все рабочие потоки runs.commit=коммит @@ -3764,7 +3768,7 @@ runs.no_workflows.quick_start = Не знаете, как начать испо runs.no_workflows.documentation = Чтобы узнать больше о Действиях Forgejo, читайте документацию. runs.workflow = Рабочий поток runs.status_no_select = Любой статус -runs.no_matching_online_runner_helper = Нет работающего раннера с меткой: %s +runs.no_matching_online_runner_helper = Нет работающего исполнителя с меткой: %s runs.no_job_without_needs = Рабочий процесс должен содержать хотя бы одну задачу без зависимостей. [projects] @@ -3812,7 +3816,7 @@ no_results = По запросу ничего не найдено. keyword_search_unavailable = Поиск по ключевым словам недоступен. Уточните подробности у администратора. match_tooltip = Включать только результаты, точно соответствующие запросу code_search_unavailable = Поиск по коду сейчас недоступен. Уточните подробности у администратора. -runner_kind = Поиск раннеров... +runner_kind = Поиск исполнителей... code_search_by_git_grep = Эти результаты получены через «git grep». Результатов может быть больше, если администратор сервера включит индексатор кода. diff --git a/options/locale/locale_tr-TR.ini b/options/locale/locale_tr-TR.ini index 153e40b113..c2c5385421 100644 --- a/options/locale/locale_tr-TR.ini +++ b/options/locale/locale_tr-TR.ini @@ -141,6 +141,21 @@ confirm_delete_selected=Tüm seçili öğeleri gerçekten silmek istiyor musunuz name=İsim value=Değer +copy_generic = Kopyala +filter = Filtrele +filter.not_archived = Arşivlenmemiş +filter.clear = Filtreleri Temizle +filter.is_archived = Arşivlenmiş +filter.is_mirror = Yansılaştırılmış +filter.is_fork = Çatallanmış +filter.not_fork = Çatallanmamış +filter.not_mirror = Yansılanmamış +filter.is_template = Şablon +filter.not_template = Şablon değil +filter.public = Herkese açık +filter.private = Gizli +more_items = Daha fazla öğe +invalid_data = Geçersiz veri: %v [aria] navbar=Gezinti Çubuğu diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index f1a4d28491..dab4287f06 100644 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -90,7 +90,7 @@ add=添加 add_all=添加所有 remove=移除 remove_all=移除所有 -remove_label_str=`删除标签 "%s"` +remove_label_str=删除标签 "%s" edit=编辑 view=查看 @@ -154,9 +154,10 @@ filter.is_template = 模板 filter.not_template = 非模板 filter.public = 公开 filter.private = 私有 -toggle_menu = 菜单 -invalid_data = 无效数据: %v +toggle_menu = 切换菜单 +invalid_data = 无效数据:%v more_items = 显示更多 +copy_generic = 复制到剪贴板 [aria] navbar=导航栏 @@ -166,7 +167,7 @@ footer.links=链接 [heatmap] number_of_contributions_in_the_last_12_months=一年内 %s 次贡献 -contributions_zero=目前还没有贡献。 +contributions_zero=目前还没有贡献 less=更少的 more=更多的 contributions_format = {year}{month}{day} 当日有 {contributions} @@ -217,7 +218,7 @@ license_desc=所有的代码都开源在 官方文档 后再对本页面进行填写。 -require_db_desc=Forgejo 需要使用 MySQL、PostgreSQL、SQLite3 或 TiDB (MySQL协议) 等数据库 +require_db_desc=Forgejo 需要使用 MySQL、PostgreSQL、SQLite3 或 TiDB(MySQL 协议)等数据库。 db_title=数据库设置 db_type=数据库类型 host=数据库主机 @@ -247,7 +248,7 @@ app_name=站点名称 app_name_helper=您可以在此输入您公司的名称。 repo_path=仓库根目录 repo_path_helper=所有远程 Git 仓库将保存到此目录。 -lfs_path=LFS根目录 +lfs_path=LFS 根目录 lfs_path_helper=存储为Git LFS的文件将被存储在此目录。留空禁用LFS run_user=以用户运行 run_user_helper=输入 Forgejo 运行的操作系统用户名。请注意,此用户必须具有对仓库根路径的访问权限。 @@ -631,6 +632,12 @@ admin_cannot_delete_self=当您是管理员时,您不能删除自己。请先 unsupported_login_type = 该账号使用的登录方式不支持删除此账户。 unset_password = 当前登录用户尚未设置密码。 required_prefix = 输入必须以“%s”开头 +FullName = 全名 +Website = 网站 +Location = 地区 +To = 分支名 +AccessToken = 访问令牌 +Description = 描述 [user] change_avatar=修改头像 @@ -3817,4 +3824,5 @@ mib = MiB [markup] filepreview.line = %[2]s 中的第 %[1]d 行 -filepreview.lines = %[3]s 中的第 %[1]d 到 %[2]d 行 \ No newline at end of file +filepreview.lines = %[3]s 中的第 %[1]d 到 %[2]d 行 +filepreview.truncated = 预览已被截断 \ No newline at end of file diff --git a/options/locale/locale_zh-HK.ini b/options/locale/locale_zh-HK.ini index 9bca942df1..1d914e6957 100644 --- a/options/locale/locale_zh-HK.ini +++ b/options/locale/locale_zh-HK.ini @@ -61,6 +61,32 @@ concept_code_repository=儲存庫 name=組織名稱 +sign_in_with_provider = 使用 %s 登入 +sign_up = 登記 +email = 電子信箱 +access_token = 訪問令牌 +powered_by = 由 %s 提供 +create_new = 建立… +user_profile_and_more = 個人資料同埋設定… +signed_in_as = 已經登入 +toc = 目錄 +licenses = 軟件授權 +return_to_gitea = 返來 Forgejo +username = 用戶名 +captcha = 驗證碼 +toggle_menu = 切換選單 +webauthn_insert_key = 插入安全密鑰 +twofa = 兩步驟驗證 +webauthn_sign_in = 撳下安全密鑰嘅掣。如果安全密鑰冇掣,請再插入。 +webauthn_press_button = 請撳下安全密鑰嘅掣… +more_items = 多啲嘢 +webauthn_use_twofa = 用手機嘅兩步驟驗證 +webauthn_error = 唔可以讀取安全密鑰。 +webauthn_unsupported_browser = 你嘅瀏覽器唔支援 WebAuthn。 +webauthn_error_unknown = 發生未知嘅錯誤,請再試下。 +webauthn_error_unable_to_process = 伺服器唔可以執行你嘅請求。 +logo = 標識 +enable_javascript = 本網站需要 JavaScript。 [aria] diff --git a/options/locale/locale_zh-TW.ini b/options/locale/locale_zh-TW.ini index 96d5d0b29c..e7334dbd16 100644 --- a/options/locale/locale_zh-TW.ini +++ b/options/locale/locale_zh-TW.ini @@ -28,7 +28,7 @@ return_to_gitea=返回 Forgejo username=帳號 email=電子信箱 password=密碼 -access_token=訪問令牌(Access Token) +access_token=訪問符記 re_type=確認密碼 captcha=驗證碼 twofa=兩步驟驗證 @@ -138,13 +138,13 @@ view = 查看 filter = 篩選 filter.clear = 清除篩選條件 filter.is_archived = 已歸檔 -filter.not_archived = 未歸檔 +filter.not_archived = 未封存 filter.is_fork = 已派生 -filter.not_fork = 未派生 +filter.not_fork = 不是分岔 filter.is_mirror = 已鏡像 -filter.not_mirror = 未鏡像 +filter.not_mirror = 不是鏡像 filter.is_template = 模板 -filter.not_template = 非模版 +filter.not_template = 不是範本 filter.public = 公開 filter.private = 私有 artifacts = 製品 @@ -155,6 +155,9 @@ show_full_screen = 全屏顯示 download_logs = 下載日誌 confirm_delete_selected = 確認刪除所有選中專案? confirm_delete_artifact = 您確定要刪除製品“%s”嗎? +more_items = 顯示更多 +invalid_data = 無效數據:%v +copy_generic = 複製到剪貼簿 [aria] navbar=導航列 @@ -167,6 +170,9 @@ number_of_contributions_in_the_last_12_months=過去十二個月內有 %s 個貢 contributions_zero=沒有貢獻 less=少 more=多 +contributions_format = {year} {month} {day} 有 {contributions} +contributions_one = 貢獻 +contributions_few = 項貢獻 [editor] buttons.heading.tooltip=新增標題 @@ -209,7 +215,7 @@ license_desc=取得 安裝指南再來調整設定。 require_db_desc=Forgejo 需要 MySQL、PostgreSQL、SQLite3、TiDB (MySQL 協定) 等其中一項。 db_title=資料庫設定 @@ -237,27 +243,27 @@ err_admin_name_pattern_not_allowed=無效的管理員帳號,該帳號符合保 err_admin_name_is_invalid=無效的管理員帳號 general_title=一般設定 -app_name=網站標題 +app_name=站點標題 app_name_helper=您可以在此輸入您的公司名稱。 repo_path=儲存庫的根目錄 repo_path_helper=所有遠端 Git 儲存庫會儲存到此目錄。 lfs_path=Git LFS 根目錄 lfs_path_helper=以 Git LFS 儲存檔案時會被儲存在此目錄中。請留空以停用 LFS 功能。 -run_user=以使用者名稱執行 +run_user=以…使用者名稱執行 domain=伺服器域名 domain_helper=伺服器的域名或主機位置。 ssh_port=SSH 伺服器埠 -ssh_port_helper=SSH 伺服器使用的埠號,留空以停用此設定。 -http_port=Forgejo HTTP 埠 -http_port_helper=Forgejo 的網頁伺服器要接聽的埠號。 -app_url=Forgejo 基本 URL +ssh_port_helper=SSH 伺服器使用的埠號,留空以停用 SSH 伺服器。 +http_port=HTTP 埠 +http_port_helper=Forgejo 的網頁伺服器所使用的埠號。 +app_url=基本 URL app_url_helper=用於 HTTP(S) Clone 和電子郵件通知的基本網址。 log_root_path=日誌路徑 log_root_path_helper=日誌檔將寫入此目錄。 optional_title=可選設定 email_title=電子郵件設定 -smtp_addr=SMTP 主機 +smtp_addr=SMTP 主機地址 smtp_port=SMTP 連接埠 smtp_from=電子郵件寄件者 smtp_from_helper=Forgejo 將會使用的電子信箱,直接輸入電子信箱或使用「"名稱" 」的格式。 @@ -270,14 +276,14 @@ offline_mode=啟用本地模式 offline_mode_popup=停用其他服務並在本地提供所有資源。 disable_gravatar=停用 Gravatar disable_gravatar_popup=停用 Gravatar 和其他大頭貼服務。除非使用者在本地上傳大頭貼,否則將使用預設的大頭貼。 -federated_avatar_lookup=啟用 Federated Avatars +federated_avatar_lookup=啟用 Federated 大頭貼 federated_avatar_lookup_popup=使用 Libravatar 以啟用 Federated Avatar 查詢服務 -disable_registration=關閉註冊功能 +disable_registration=禁用自助註冊 disable_registration_popup=關閉註冊功能,只有管理員可以新增帳戶。 allow_only_external_registration_popup=只允許從外部服務註冊 openid_signin=啟用 OpenID 登入 openid_signin_popup=啟用 OpenID 登入 -openid_signup=啟用 OpenID 註冊 +openid_signup=啟用 OpenID 自助註冊 openid_signup_popup=啟用基於 OpenID 的註冊 enable_captcha=在註冊時啟用驗證碼 enable_captcha_popup=要求在用戶註冊時輸入驗證碼 @@ -285,13 +291,13 @@ require_sign_in_view=需要登入才能瀏覽頁面 require_sign_in_view_popup=限制已登入的使用者才能存取頁面。訪客只會看到登入和註冊頁面。 admin_setting_desc=建立管理員帳戶是選用的。 第一個註冊的使用者將自動成為管理員。 admin_title=管理員帳戶設定 -admin_name=管理員帳號 +admin_name=管理員使用者名稱 admin_password=管理員密碼 confirm_password=確認密碼 admin_email=電子信箱 install_btn_confirm=安裝 Forgejo -test_git_failed=無法識別「git」命令:%v -sqlite3_not_available=您目前的版本不支援 SQLite3,請從 %s 下載官方的預先編譯版本 (不是 gobuild 版本)。 +test_git_failed=無法識別「git」指令:%v +sqlite3_not_available=這個 Forgejo 版本不支援 SQLite3,請從 %s 下載官方的預先編譯版本 (不是 「gobuild」 版本)。 invalid_db_setting=資料庫設定不正確: %v invalid_db_table=資料庫的資料表「%s」無效: %v invalid_repo_path=儲存庫根目錄設定不正確:%v @@ -313,8 +319,14 @@ no_reply_address_helper=作為隱藏電子信箱使用者的域名。例如, password_algorithm=密碼雜湊演算法 invalid_password_algorithm=無效的密碼雜湊演算法 password_algorithm_helper=設定密碼雜湊演算法。演算法有不同的需求與強度。argon2 演算法雖然較安全但會使用大量記憶體,可能不適用於小型系統。 -enable_update_checker=啟用更新檢查器 +enable_update_checker=啟用更新檢查 run_user_helper = 輸入 Forgejo 執行的作業系統使用者名稱。請注意,此使用者必須具有對儲存庫根路徑的訪問許可權。 +env_config_keys_prompt = 以下的環境變數也會被套用於您的設定檔: +env_config_keys = 環境設定 +smtp_from_invalid = 電子郵件寄件者地址無效 +config_location_hint = 這些設定將被儲存在: +allow_dots_in_usernames = 允許使用者在使用者名稱中使用英文句點。不影響現有帳戶。 +enable_update_checker_helper_forgejo = 透過檢查 release.forgejo.org 的 DNS TXT 記錄來定期檢查新的 Forgejo 版本。 [home] uname_holder=帳號或電子信箱 @@ -323,7 +335,7 @@ switch_dashboard_context=切換資訊主頁帳戶 my_repos=儲存庫 show_more_repos=顯示更多儲存庫... collaborative_repos=參與協作的儲存庫 -my_orgs=我的組織 +my_orgs=組織 my_mirrors=我的鏡像 view_home=訪問 %s search_repos=搜尋儲存庫... @@ -363,6 +375,10 @@ code_search_results=「%s」的搜尋結果 code_last_indexed_at=最後索引 %s relevant_repositories_tooltip=已隱藏缺少主題、圖示、說明、Fork 的儲存庫。 relevant_repositories=只顯示相關的儲存庫,顯示未篩選的結果。 +stars_few = %d 個星星 +stars_one = %d 個星星 +forks_one = %d 個 fork +forks_few = %d 個 fork [auth] create_new_account=註冊帳戶 @@ -426,11 +442,25 @@ authorize_title=授權「%s」存取您的帳戶? authorization_failed=授權失效 sspi_auth_failed=SSPI 認證失敗 password_pwned_err=無法完成對 HaveIBeenPwned 的請求。 +tab_signin = 登入 +change_unconfirmed_email_summary = 更改接收帳號啟用信的信箱地址。 +change_unconfirmed_email = 如果您在註冊帳號時寫錯了信箱地址,您可以在下面更改它。您會在這個新地址收到一封確認信。 +change_unconfirmed_email_error = 無法更改信箱地址:%v +tab_signup = 註冊 +last_admin = 您無法刪除最後一個管理員。必須至少有一個管理員。 +prohibit_login_desc = 您的帳號被禁止登入,請連絡網站管理員。 +sign_up_successful = 已成功建立帳號。歡迎! +invalid_code_forgot_password = 您的驗證碼無效或是已過期。點擊這裡來開始一個新的 session。 +reset_password_wrong_user = 您以 %s 登入,但是帳號復原連結是給 %s 的 +password_pwned = 該密碼出現在先前資料洩露的被盜密碼清單中。請用一個不同的密碼再試一次,並考慮在其他地方也更換此密碼。 +authorization_failed_desc = 偵測到無效請求,授權失敗。請連絡您嘗試授權的應用的維護者。 +openid_signin_desc = 輸入您的 OpenID URI。例如:alice.openid.example.org 或是 https://openid.example.org/alice。 +remember_me.compromised = 此登入 token 已經無效,這可能是因為您的帳號被盜用了。請檢查您的帳號是否有異常活動。 [mail] view_it_on=在 %s 上查看 reply=或是直接回覆此電子郵件 -link_not_working_do_paste=無法開啟?請複製超連結到瀏覽器貼上。 +link_not_working_do_paste=無法開啟?試試複製超連結到瀏覽器貼上。 hi_user_x=%s 您好, activate_account=請啟用您的帳戶 @@ -445,11 +475,11 @@ register_notify=歡迎來到 Forgejo register_notify.title=%[1]s,歡迎來到 %[2]s register_notify.text_1=這是您在 %s 的註冊確認信! register_notify.text_2=您現在可以用帳號 %s 登入。 -register_notify.text_3=如果這是由管理員為您建立的帳戶,請先設定您的密碼。 +register_notify.text_3=如果其他人為您建立了此帳號,請先設定您的密碼。 reset_password=救援您的帳戶 -reset_password.title=%s,您已請求帳戶救援 -reset_password.text=請在 %s內點擊下列連結以救援您的帳戶: +reset_password.title=%s,我們收到了您的帳號恢復請求 +reset_password.text=如果是您做出的請求,請在 %s內點擊下列連結以救援您的帳戶: register_success=註冊成功 @@ -491,6 +521,10 @@ team_invite.subject=%[1]s 邀請您加入組織 %[2]s team_invite.text_1=%[1]s 邀請您加入組織 %[3]s 中的 %[2]s 團隊 team_invite.text_2=請點擊下方連結加入團隊: team_invite.text_3=備註: 這是寄給 %[1]s 的邀請。若您未預期收到此邀請,請忽略此郵件。 +activate_email.title = %s,請驗證你的信箱地址 +admin.new_user.subject = 新使用者 %s 剛剛完成註冊 +admin.new_user.user_info = 使用者資訊 +admin.new_user.text = 請點擊這裡以在管理員控制台管理此使用者。 [modal] yes=是 @@ -523,8 +557,8 @@ SSPISeparatorReplacement=分隔符 SSPIDefaultLanguage=預設語言 require_error=` 不能為空。` -alpha_dash_error=`應該只包含英文字母、數字、破折號 ("-")、和底線 ("_") 字元。` -alpha_dash_dot_error=`應該只包含英文字母、數字、破折號 ("-")、下底線("_")和小數點 (".") 字元。` +alpha_dash_error=`應該只包含英文字母、數字、破折號("-")和底線("_") 字元。` +alpha_dash_dot_error=`應該只包含英文字母、數字、破折號 ("-")、下底線("_")和小數點(".")字元。` git_ref_name_error=` 必須是格式正確的 Git 參考名稱。` size_error=` 長度必須為 %s。` min_size_error=` 長度最小為 %s 個字元。` @@ -569,7 +603,7 @@ enterred_invalid_owner_name=新的擁有者名稱無效。 enterred_invalid_password=您輸入的密碼不正確。 user_not_exist=該用戶名不存在 team_not_exist=團隊不存在 -last_org_owner=你不能從「Owners」團隊中刪除最後一個使用者。每個組織中至少要有一個擁有者。 +last_org_owner=你不能從「所有者」團隊中刪除最後一個使用者。每個組織中至少要有一個擁有者。 cannot_add_org_to_team=組織不能被新增為團隊成員。 duplicate_invite_to_team=該使用者已經被邀請為團隊成員。 organization_leave_success=您已成功離開組織 %s。 @@ -578,7 +612,7 @@ invalid_ssh_key=無法驗證您的 SSH 密鑰:%s invalid_gpg_key=無法驗證您的 GPG 密鑰:%s invalid_ssh_principal=無效的主體: %s must_use_public_key=您提供的金鑰是私有金鑰,請勿上傳您的私有金鑰到任何地方,請使用您的公鑰。 -unable_verify_ssh_key=無法驗證 SSH 金鑰,請再次檢查以避免錯誤。 +unable_verify_ssh_key=無法驗證 SSH 金鑰,請再次檢查是否有錯誤。 auth_failed=授權認證失敗:%v still_own_repo=您的帳戶擁有一個以上的儲存庫,請先刪除或轉移它們。 @@ -588,6 +622,20 @@ org_still_own_repo=此組織仍然擁有一個以上的儲存庫,請先刪除 org_still_own_packages=此組織仍然擁有一個以上的套件,請先刪除它們。 target_branch_not_exist=目標分支不存在 +unset_password = 此使用者尚未設置密碼。 +unsupported_login_type = 該帳號的登入方式使它無法被刪除。 +To = 分支名稱 +FullName = 全名 +Description = 說明 +Pronouns = 代名詞 +Biography = 個人簡介 +Website = 網站 +Location = 地區 +AccessToken = 存取令牌 +username_has_not_been_changed = 帳號名稱未被更改 +admin_cannot_delete_self = 當您是管理員時,您不能刪除自己。請先移除您的管理員權限。 +username_error_no_dots = ` 只能包含英數字符("0-9","a-z","A-Z"),破折號("-")和底線("_")。只能以英數字元開頭或結尾,連續的非英數字元也不被允許。` +required_prefix = 輸入文字必須以「%s」開頭 [user] @@ -595,7 +643,7 @@ change_avatar=更改大頭貼... repositories=儲存庫 activity=公開動態 followers_few=%d 追蹤者 -starred=已加星號 +starred=已加星號的儲存庫 watched=關注的儲存庫 code=程式碼 projects=專案 @@ -610,7 +658,15 @@ email_visibility.private=只有您和系統管理員可以看到您的電子信 form.name_reserved=「%s」是保留的帳號。 form.name_pattern_not_allowed=帳號不可包含字元「%s」。 -form.name_chars_not_allowed=帳號「%s」包含無效字元。 +form.name_chars_not_allowed=使用者名稱「%s」包含無效字元。 +joined_on = 在 %s 註冊 +show_on_map = 在地圖上顯示這個地點 +settings = 使用者設定 +block_user = 封鎖使用者 +block_user.detail_1 = 該使用者已停止追踪您。 +block_user.detail_2 = 這個使用者無法對您的儲存庫、您提出的問題或發表的留言做出任何操作。 +followers_one = %d 個追踪者 +following_one = 追踪 %d 個人 [settings] profile=個人資料 @@ -625,10 +681,10 @@ applications=應用程式 orgs=管理組織 repos=儲存庫 delete=刪除帳戶 -twofa=兩步驟驗證 +twofa=兩步驟驗證 (TOTP) account_link=已連結帳號 organization=組織 -webauthn=安全金鑰 +webauthn=兩步驟驗證(安全金鑰) public_profile=公開的個人資料 password_username_disabled=非本地使用者不允許更改他們的帳號。詳細資訊請聯絡您的系統管理員。 @@ -666,7 +722,7 @@ privacy=隱私 keep_activity_private_popup=讓動態只有你和管理員看得到 lookup_avatar_by_mail=以電子信箱查詢大頭貼 -federated_avatar_lookup=Federated Avatar 查詢 +federated_avatar_lookup=Federated 大頭貼查詢 enable_custom_avatar=使用自訂大頭貼 choose_new_avatar=選擇新的大頭貼 update_avatar=更新大頭貼 @@ -686,7 +742,7 @@ password_change_disabled=非本地帳戶無法透過 Forgejo 的網頁介面更 emails=電子信箱 manage_emails=管理電子信箱 manage_themes=選擇預設佈景主題 -manage_openid=管理 OpenID 位址 +manage_openid=管理 OpenID 地址 theme_desc=這將是您在整個網站上的預設佈景主題。 primary=主要 activated=已啟用 @@ -716,16 +772,16 @@ openid_desc=OpenID 讓你可以授權認證給外部服務。 manage_ssh_keys=管理 SSH 金鑰 manage_ssh_principals=管理 SSH 認證主體 manage_gpg_keys=管理 GPG 金鑰 -add_key=增加金鑰 -ssh_desc=這些 SSH 公鑰已關聯至你的帳戶。持有相對應的私鑰將擁有完全控制你的儲存庫的權限。 +add_key=新增金鑰 +ssh_desc=這些 SSH 公鑰已連結至您的帳戶。持有相對應的私鑰將擁有完全控制你的儲存庫的權限。可以使用已驗證的 SSH 金鑰校驗 SSH 簽署的提交。 principal_desc=這些 SSH 認證主體已關聯到您的帳戶並擁有完全存取您的儲存庫的權限。 -gpg_desc=這些 GPG 公鑰已經關聯到你的帳戶。請妥善保管你的私鑰因為他們將被用於認證提交。 +gpg_desc=這些 GPG 公鑰已經連結到您的帳戶,並被用於校驗您的提交。因為它們能用您的身分簽署提交,請妥善保管您的私鑰。 ssh_helper=需要協助嗎?建議可看看 GitHub 的文件以建立您的 SSH 金鑰或解決您使用 SSH 時碰到的常見問題。 gpg_helper=需要協助嗎?建議可看看 GitHub 的 about GPG 文件。 -add_new_key=增加 SSH 金鑰 +add_new_key=新增 SSH 金鑰 add_new_gpg_key=新增 GPG 金鑰 -key_content_ssh_placeholder=以下列字段開頭:'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', or 'sk-ssh-ed25519@openssh.com' -key_content_gpg_placeholder=以 '-----BEGIN PGP PUBLIC KEY BLOCK-----' 開頭 +key_content_ssh_placeholder=以 「ssh-ed25519」、「ssh-rsa」、「ecdsa-sha2-nistp256」、「ecdsa-sha2-nistp384」、「ecdsa-sha2-nistp521」、「sk-ecdsa-sha2-nistp256@openssh.com」、或 「sk-ssh-ed25519@openssh.com」 開頭 +key_content_gpg_placeholder=以 「-----BEGIN PGP PUBLIC KEY BLOCK-----」 開頭 add_new_principal=新增主體 ssh_key_been_used=此 SSH 金鑰早已加入本伺服器。 ssh_key_name_used=已有相同名稱的 SSH 金鑰存在於您的帳戶。 @@ -743,7 +799,7 @@ gpg_token=Token gpg_token_help=您可以使用以下方法產生簽署: gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig gpg_token_signature=Armored GPG 簽署 -key_signature_gpg_placeholder=以「-----BEGIN PGP SIGNATURE-----」開頭 +key_signature_gpg_placeholder=以 「-----BEGIN PGP SIGNATURE-----」 開頭 verify_gpg_key_success=已驗證 GPG 金鑰「%s」。 ssh_key_verified=已驗證的金鑰 ssh_key_verified_long=金鑰已被 Token 驗證且可用來驗證符合此使用者已啟用的電子信箱的提交。 @@ -801,7 +857,7 @@ access_token_deletion_cancel_action=取消 access_token_deletion_confirm_action=刪除 access_token_deletion_desc=刪除 Token 後,使用此 Token 的應用程式將無法再存取您的帳戶,此動作不可還原。是否繼續? delete_token_success=已刪除 Token。使用此 Token 的應用程式無法再存取您的帳戶。 -permission_no_access=沒有權限 +permission_no_access=沒有存取權 permission_read=讀取 manage_oauth2_applications=管理 OAuth2 應用程式 @@ -879,6 +935,37 @@ visibility.public=公開 visibility.public_tooltip=所有人都可以看到 visibility.limited=受限 visibility.private=私人 +blocked_users_none = 您沒有封鎖任何使用者 。 +blocked_users = 封鎖的使用者 +hints = 提示 +update_hints = 更新提示 +update_hints_success = 提示已被更改。 +added_on = 於 %s 新增 +biography_placeholder = 和我們介紹一下您自己吧!(您可以使用 Markdown) +location_placeholder = 和其他人分享您的地理位置 +profile_desc = 管理其他人如何看到您的個人資料。通知、密碼復原和網頁上的 Git 操作會使用您的主要電子信箱。 +hidden_comment_types.ref_tooltip = 註記哪些問題/提交/… 提及了此問題 +keep_activity_private = 隱藏個人頁面中的活動資料 +uploaded_avatar_is_too_big = 上傳檔案的大小 (%d KiB)超過了上限 (%d KiB )。 +select_permissions = 選擇權限 +permission_write = 讀寫 +permissions_list = 權限: +add_email_confirmation_sent = 我們已發送一封確認信至 「%s」。請檢查您的信箱並在 %s 內確認註冊。 +repo_and_org_access = 儲存庫和組織存取權 +permissions_public_only = 僅公開 +permissions_access_all = 全部(公開、私有和受限) +at_least_one_permission = 您必須至少選擇一個權限才能建立 token +can_not_add_email_activations_pending = 已有一個待處理的啟用請求,如果您想要新增電子信箱,請稍等幾分鐘。 +uid = UID +change_password = 更改密碼 +valid_until_date = 至 %s 有效 +social_desc = 這些社群帳號可以被用來登入您的帳號。請確保您認得每一個。 +unbind_success = 已成功移除該社群帳號。 +create_oauth2_application_success = 您已成功建立一個新的 OAuth2 應用程式。 +change_username_prompt = 註:更新您的使用者名稱將改變您的帳號 URL。 +change_username_redirect_prompt = 舊的使用者名稱在其他使用者認領之前將會轉址到新的使用者名稱。 +visibility.limited_tooltip = 只有已登入的使用者能看見 +visibility.private_tooltip = 只有您加入的組織之成員能看見 [repo] owner=擁有者 @@ -893,7 +980,7 @@ template_description=儲存庫範本讓使用者可新增相同目錄結構、 visibility=瀏覽權限 visibility_description=只有組織擁有者或有權限的組織成員才能看到。 visibility_helper_forced=您的網站管理員強制新的存儲庫必需設定為私有。 -visibility_fork_helper=(修改本值將會影響所有 fork 儲存庫) +visibility_fork_helper=(修改本值將會影響所有 fork 儲存庫的能見度) clone_helper=需要有關 Clone 的協助嗎?查看幫助 。 fork_repo=Fork 儲存庫 fork_from=Fork 自 @@ -931,14 +1018,14 @@ default_branch=預設分支 default_branch_helper=預設分支是合併請求和提交程式碼的基礎分支。 mirror_prune=裁減 mirror_prune_desc=刪除過時的遠端追蹤參考 -mirror_interval=鏡像間隔 (有效時間單位為 'h'、'm'、's'),設為 0 以停用定期同步。(最小間隔: %s) +mirror_interval=鏡像週期(有效時間單位為「h」、「m」、「s」),設為 0 以停用定期同步。(最小值為:%s) mirror_interval_invalid=鏡像週期無效 mirror_sync_on_commit=推送提交後進行同步 mirror_address=從 URL Clone mirror_address_desc=在授權資訊中填入必要的資料。 mirror_lfs=Large File Storage (LFS) mirror_lfs_desc=啟動 LFS 檔案的鏡像功能。 -mirror_lfs_endpoint=LFS 端點 +mirror_lfs_endpoint=LFS 終點 mirror_lfs_endpoint_desc=同步將會嘗試使用 Clone URL 來確認 LFS 伺服器。如果存儲庫的 LFS 資料放在其他地方,您也可以指定自訂的端點。 mirror_last_synced=上次同步 mirror_password_placeholder=(未變更) @@ -963,7 +1050,7 @@ blame_prior=檢視此變更前的 Blame author_search_tooltip=最多顯示 30 位使用者 -transfer.accept=同意轉移 +transfer.accept=接受轉移 transfer.accept_desc=轉移到「%s」 transfer.reject=拒絕轉移 transfer.reject_desc=取消轉移到「%s」 @@ -975,9 +1062,9 @@ desc.internal=組織內部用 desc.archived=已封存 template.items=範本項目 -template.git_content=Git 內容(預設分支) +template.git_content=Git 內容(預設分支) template.git_hooks=Git Hook -template.git_hooks_tooltip=目前來說,一旦您加入了 Git Hook 就無法修改或移除。唯有您信任該儲存庫範本時才選取此項目。 +template.git_hooks_tooltip=目前來說,一旦您新增了 Git Hook 就無法修改或移除。唯有您信任該儲存庫範本時才選取此項目。 template.webhooks=Webhook template.topics=主題 template.avatar=大頭貼 @@ -1010,22 +1097,22 @@ migrate_items_merge_requests=合併請求 migrate_items_releases=版本發布 migrate_repo=遷移儲存庫 migrate.clone_address=從 URL 遷移 / Clone -migrate.clone_address_desc=現有存儲庫的 HTTP(S) 或 Git Clone URL +migrate.clone_address_desc=現有儲存庫的 HTTP(S) 或 Git 「clone」 URL migrate.github_token_desc=由於 GitHub API 的速率限制,您可在此輸入一個或多個由半形逗號「,」分隔的 Token 來加快遷移速度。警告:濫用此功能可能會違反該服務提供者的政策並導致帳戶被封鎖。 migrate.clone_local_path=或者是本地端伺服器路徑 migrate.permission_denied=您並沒有導入本地儲存庫的權限。 migrate.permission_denied_blocked=您無法從未允許的主機匯入,請聯絡管理員檢查以下設定值 ALLOWED_DOMAINS/ALLOW_LOCALNETWORKS/BLOCKED_DOMAINS -migrate.invalid_local_path=無效的本地路徑,該路徑不存在或不是一個目錄。 +migrate.invalid_local_path=無效的本地路徑。它不存在或不是一個資料夾。 migrate.invalid_lfs_endpoint=該 LFS 端點無效。 migrate.failed=遷移失敗:%v -migrate.migrate_items_options=遷移其他項目需要 Access Token。 +migrate.migrate_items_options=遷移其他項目需要取用 Token migrated_from=已從 %[2]s 遷移 migrated_from_fake=已從 %[1]s 遷移 migrate.migrate=從 %s 遷移 migrate.migrating=正在從 %s 遷移... migrate.migrating_failed=從 %s 遷移失敗 migrate.migrating_failed_no_addr=遷移失敗。 -migrate.github.description=從 github.com 或其他 GitHub 執行個體遷移資料。 +migrate.github.description=從 github.com 或 GitHub Enterprise 伺服器遷移資料。 migrate.git.description=從任何 Git 服務遷移儲存庫。 migrate.gitlab.description=從 gitlab.com 或其他 GitLab 執行個體遷移資料。 migrate.gitea.description=從 gitea.com 或其他 Gitea/Forgejo 執行個體遷移資料。 @@ -1037,7 +1124,7 @@ migrate.migrating_git=正在遷移 Git 資料 migrate.migrating_topics=正在遷移主題 migrate.migrating_milestones=正在遷移里程碑 migrate.migrating_labels=正在遷移標籤 -migrate.migrating_releases=正在遷移版本發布 +migrate.migrating_releases=正在遷移版本發佈 migrate.migrating_issues=正在遷移問題 migrate.migrating_pulls=正在遷移合併請求 @@ -1057,7 +1144,7 @@ download_archive=下載此儲存庫 more_operations=更多操作 no_desc=暫無描述 -quick_guide=快速幫助 +quick_guide=快速指南 clone_this_repo=Clone 此儲存庫 cite_this_repo=引用此儲存庫 create_new_repo_command=從命令列建立新儲存庫。 @@ -1095,7 +1182,7 @@ file.title=%s 於 %s file_raw=原始文件 file_history=歷史記錄 file_view_source=檢視原始碼 -file_view_rendered=檢視渲染圖 +file_view_rendered=檢視渲染版本 file_view_raw=查看原始文件 file_permalink=永久連結 file_too_large=檔案太大,無法顯示。 @@ -1105,10 +1192,10 @@ ambiguous_character=`%[1]c [U+%04[1]X] 容易與 %[2]c [U+%04[2]X] 混淆` escape_control_characters=Escape unescape_control_characters=Unescape -file_copy_permalink=複製固定連結 +file_copy_permalink=複製永久連結 view_git_blame=檢視 Git Blame -video_not_supported_in_browser=您的瀏覽器不支援使用 HTML5 播放影片。 -audio_not_supported_in_browser=您的瀏覽器不支援 HTML5 的「audio」標籤 +video_not_supported_in_browser=您的瀏覽器不支援 HTML5 的「video」標籤。 +audio_not_supported_in_browser=您的瀏覽器不支援 HTML5 的「audio」標籤。 stored_lfs=已使用 Git LFS 儲存 symbolic_link=符號連結 commit_graph=提交線圖 @@ -1123,8 +1210,8 @@ line=行 lines=行 from_comment=(留言) -editor.add_file=加入檔案 -editor.new_file=新增檔案 +editor.add_file=新增檔案 +editor.new_file=建立新檔案 editor.upload_file=上傳檔案 editor.edit_file=編輯檔案 editor.preview_changes=預覽更改 @@ -1138,7 +1225,7 @@ editor.delete_this_file=刪除檔案 editor.must_have_write_access=您必須擁有寫入權限才能對此檔案進行修改或提出變更。 editor.file_delete_success=已刪除文件「%s」。 editor.name_your_file=命名您的檔案... -editor.filename_help=輸入名稱和斜線 ('/') 以新增目錄。在文字框的開始輸入倒退鍵以移除目錄。 +editor.filename_help=輸入名稱和斜線("/") 以新增目錄。在文字框開始處輸入退格鍵以移除目錄。 editor.or=或 editor.cancel_lower=取消 editor.commit_signed_changes=提交簽署過的變更 @@ -2358,6 +2445,45 @@ find_file.no_matching=找不到符合的檔案 error.csv.too_large=無法渲染此檔案,因為它太大了。 error.csv.unexpected=無法渲染此檔案,因為它包含了未預期的字元,於第 %d 行第 %d 列。 error.csv.invalid_field_count=無法渲染此檔案,因為它第 %d 行的欄位數量有誤。 +fork_no_valid_owners = 因為此儲存庫沒有有效的所有者,它無法被 fork。 +fork_branch = 要複製到 fork 的分支 +commit.load_referencing_branches_and_tags = 載入引用這個提交的分支和標籤 +mirror_sync = 已同步 +commit.contained_in_default_branch = 這個提交是預設分支的一部分 +editor.invalid_commit_mail = 用於建立提交的信箱無效。 +admin.update_flags = 更新旗標 +admin.failed_to_replace_flags = 儲存庫旗標更新失敗 +admin.flags_replaced = 儲存庫旗標已被更換 +default_branch_label = 預設 +tree_path_not_found_tag = 路徑 %[1]s 不存在於標籤 %[2]s 中 +tree_path_not_found_commit = 路徑 %[1]s 不存在於提交 %[2]s 中 +tree_path_not_found_branch = 路徑 %[1]s 不存在於分支 %[2]s 中 +transfer.no_permission_to_accept = 您沒有權限接受這項轉讓。 +archive.title = 這個儲存庫被封存了。您可以檢視其中的檔案或是 Clone 它,但您無法推送提交,提出問題或合併請求。 +archive.title_date = 這個儲存庫在 %s 被封存了。您可以檢視其中的檔案或 clone 它,但您無法推送提交,提出問題或合併請求。 +migrate.forgejo.description = 從 codeberg.org 或其他 Forgejo 站點遷移資料。 +migrate.cancel_migrating_title = 取消遷移 +executable_file = 可執行檔 +all_branches = 所有分支 +object_format_helper = 儲存庫的物件格式。一旦設定便無法更改。SHA1 的相容性最好。 +stars_remove_warning = 這將會移除此儲存庫的所有星星。 +transfer.no_permission_to_reject = 您沒有權限拒絕這項轉讓。 +desc.sha256 = SHA256 +form.name_pattern_not_allowed = 您無法在儲存庫的名字中使用「%s」格式。 +admin.manage_flags = 管理旗標 +visibility_helper = 將儲存庫設為私有 +mirror_address_url_invalid = URL 無效。您必須將整個 URL 正確轉義(escape)。 +migrate.migrating_failed.error = 遷移失敗:%s +migrate.cancel_migrating_confirm = 您確定要取消這次的遷移嗎? +invisible_runes_header = `此檔案內含不可見的 Unicode 字元` +ambiguous_runes_header = `這個檔案內含模棱兩可的 Unicode 字元` +rss.must_be_on_branch = 您必須在一個分支上才能訂閱 RSS。 +admin.enabled_flags = 該儲存庫的旗標: +mirror_address_protocol_invalid = 輸入的 URL 無效。只有 https(s):// 或 git:// 連結可以被設定為鏡像來源。 +ambiguous_runes_description = `這個檔案內含容易造成混淆的 Unicode 字元。如果您覺得這是檔案作者的本意,您可以安全的忽略這則訊息。按下 Escape 可以顯示這些字元。` +commit.contained_in = 這個提交存在於: +settings.archive.mirrors_unavailable = 不能鏡像已封存的儲存庫。 +settings.mirror_settings.push_mirror.edit_sync_time = 編輯鏡像同步週期 [graphs] @@ -2408,14 +2534,14 @@ settings.update_avatar_success=已更新組織的大頭貼。 settings.delete=刪除組織 settings.delete_account=刪除這個組織 settings.delete_prompt=該組織將被永久刪除。此動作不可還原! -settings.confirm_delete_account=確認刪除組織 +settings.confirm_delete_account=確認刪除 settings.delete_org_title=刪除組織 settings.delete_org_desc=即將永久刪除這個組織,是否繼續? settings.hooks_desc=此組織下的所有存儲庫都會觸發在此新增的 Webhook。 settings.labels_desc=在此處新增的標籤可用於此組織下的所有儲存庫。 -members.membership_visibility=成員可見性: +members.membership_visibility=成員能見度: members.public=可見 members.public_helper=隱藏 members.private=隱藏 @@ -2451,7 +2577,7 @@ teams.owners_permission_desc=擁有者對 所有儲存庫 具 teams.members=團隊成員 teams.update_settings=更新設定 teams.delete_team=刪除團隊 -teams.add_team_member=增加團隊成員 +teams.add_team_member=新增團隊成員 teams.invite_team_member=邀請至 %s teams.invite_team_member.list=待處理的邀請 teams.delete_team_title=刪除團隊 @@ -2516,7 +2642,7 @@ dashboard.cron.error=Cron 中的錯誤: %s: %[3]s dashboard.cron.finished=Cron: %[1]s 已完成 dashboard.delete_inactive_accounts=刪除所有未啟用帳戶 dashboard.delete_inactive_accounts.started=刪除所有未啟用帳戶的任務已啟動。 -dashboard.delete_repo_archives=刪除所有儲存庫存檔 (ZIP, TAR.GZ, etc..) +dashboard.delete_repo_archives=刪除所有儲存庫存檔 (ZIP、TAR.GZ 等) dashboard.delete_repo_archives.started=刪除所有儲存庫存檔的任務已啟動。 dashboard.delete_missing_repos=刪除所有遺失 Git 檔案的儲存庫 dashboard.delete_missing_repos.started=刪除所有遺失 Git 檔案的儲存庫的任務已啟動。 @@ -2529,35 +2655,35 @@ dashboard.deleted_branches_cleanup=清理已刪除的分支 dashboard.update_migration_poster_id=更新遷移發布者 ID dashboard.git_gc_repos=對所有儲存庫進行垃圾回收 dashboard.resync_all_sshkeys=使用 Forgejo 的 SSH 金鑰更新「.ssh/authorized_keys」檔案。 -dashboard.resync_all_sshprincipals=使用 Forgejo 的 SSH 主體更新「.ssh/authorized_principals」檔案。 -dashboard.resync_all_hooks=重新同步所有儲存庫的 pre-receive、update 和 post-receive Hook。 +dashboard.resync_all_sshprincipals=使用 Forgejo 的 SSH 規則更新「.ssh/authorized_principals」檔案。 +dashboard.resync_all_hooks=重新同步所有儲存庫的 pre-receive、update 和 post-receive Hook dashboard.reinit_missing_repos=重新初始化所有記錄存在但遺失的 Git 儲存庫 dashboard.sync_external_users=同步外部使用者資料 dashboard.cleanup_hook_task_table=清理 hook_task 資料表 dashboard.cleanup_packages=清理已過期的套件 -dashboard.server_uptime=服務執行時間 +dashboard.server_uptime=伺服器運作時間 dashboard.current_goroutine=目前的 Goroutines 數量 dashboard.current_memory_usage=目前記憶體使用量 dashboard.total_memory_allocated=所有被分配的記憶體 -dashboard.memory_obtained=記憶體佔用量 -dashboard.pointer_lookup_times=指針查找次數 +dashboard.memory_obtained=獲得的記憶體 +dashboard.pointer_lookup_times=指標尋找次數 dashboard.memory_allocate_times=記憶體分配次數 dashboard.memory_free_times=記憶體釋放次數 dashboard.current_heap_usage=目前 Heap 記憶體使用量 -dashboard.heap_memory_obtained=Heap 記憶體佔用量 +dashboard.heap_memory_obtained=獲得的 Heap 記憶體 dashboard.heap_memory_idle=Heap 記憶體閒置量 dashboard.heap_memory_in_use=正在使用的 Heap 記憶體 dashboard.heap_memory_released=被釋放的 Heap 記憶體 dashboard.heap_objects=Heap 物件數量 dashboard.bootstrap_stack_usage=啟動 Stack 使用量 -dashboard.stack_memory_obtained=被分配的 Stack 記憶體 +dashboard.stack_memory_obtained=獲得的 Stack 記憶體 dashboard.mspan_structures_usage=MSpan 結構使用量 -dashboard.mspan_structures_obtained=被分配的 MSpan 結構 -dashboard.mcache_structures_usage=MCache 結構記使用量 -dashboard.mcache_structures_obtained=被分配的 MCache 結構 +dashboard.mspan_structures_obtained=獲得的 MSpan 結構 +dashboard.mcache_structures_usage=MCache 結構使用量 +dashboard.mcache_structures_obtained=獲得的 MCache 結構 dashboard.profiling_bucket_hash_table_obtained=被分配的剖析雜湊表 dashboard.gc_metadata_obtained=被分配 GC Metadata -dashboard.other_system_allocation_obtained=其他被分配的系統記憶體 +dashboard.other_system_allocation_obtained=其他獲得的系統記憶體 dashboard.next_gc_recycle=下次 GC 記憶體回收量 dashboard.last_gc_time=距離上次 GC 時間 dashboard.total_gc_time=總 GC 暫停時間 @@ -2597,7 +2723,7 @@ users.edit_account=編輯使用者帳戶 users.max_repo_creation=最大儲存庫數量 users.max_repo_creation_desc=(設定 -1 使用全域預設限制) users.is_activated=使用者帳戶已啟用 -users.prohibit_login=停用登入 +users.prohibit_login=禁止登入 users.is_admin=是管理員 users.is_restricted=受限制的 users.allow_git_hook=可以建立 Git Hook @@ -2621,7 +2747,7 @@ users.list_status_filter.not_active=未啟用 users.list_status_filter.is_admin=管理員 users.list_status_filter.not_admin=非管理員 users.list_status_filter.is_restricted=受限 -users.list_status_filter.not_restricted=未受限 +users.list_status_filter.not_restricted=未受限制 users.list_status_filter.is_prohibit_login=禁止登入 users.list_status_filter.not_prohibit_login=允許登入 users.list_status_filter.is_2fa_enabled=已啟用兩步驟驗證 @@ -2633,7 +2759,7 @@ emails.activated=已啟用 emails.filter_sort.email=電子信箱 emails.filter_sort.email_reverse=電子信箱(倒序) emails.filter_sort.name=使用者名稱 -emails.filter_sort.name_reverse=使用者名稱(倒序) +emails.filter_sort.name_reverse=使用者名稱(倒序) emails.updated=信箱已更新 emails.not_updated=電子信箱更新失敗: %v emails.duplicate_active=此信箱已被其他使用者使用 @@ -2794,11 +2920,11 @@ auths.login_source_of_type_exist=已經有相同類型的認證來源。 auths.unable_to_initialize_openid=無法初始化 OpenID 連接提供者: %s auths.invalid_openIdConnectAutoDiscoveryURL=自動探索 URL 無效 (它必須是以 http:// 或 https:// 開頭的有效 URL) -config.server_config=伺服器組態 +config.server_config=伺服器設定 config.app_name=網站標題 config.app_ver=Forgejo 版本 config.app_url=Forgejo 基本 URL -config.custom_conf=設定檔案路徑 +config.custom_conf=設定檔路徑 config.custom_file_root_path=自訂檔案根目錄 config.domain=伺服器域名 config.offline_mode=本地模式 @@ -2812,7 +2938,7 @@ config.log_file_root_path=日誌路徑 config.script_type=腳本類型 config.reverse_auth_user=反向代理認證 -config.ssh_config=SSH 組態 +config.ssh_config=SSH 設定 config.ssh_enabled=已啟用 config.ssh_start_builtin_server=使用內建的伺服器 config.ssh_domain=SSH 伺服器域名 @@ -2824,12 +2950,12 @@ config.ssh_keygen_path=金鑰產生 (' ssh-keygen ') 路徑 config.ssh_minimum_key_size_check=金鑰最小大小檢查 config.ssh_minimum_key_sizes=金鑰最小大小 -config.lfs_config=LFS 組態 +config.lfs_config=LFS 設定 config.lfs_enabled=已啟用 config.lfs_content_path=LFS 內容路徑 config.lfs_http_auth_expiry=LFS HTTP 驗證有效時間 -config.db_config=資料庫組態 +config.db_config=資料庫設定 config.db_type=資料庫類型 config.db_host=主機地址 config.db_name=名稱 @@ -2838,7 +2964,7 @@ config.db_schema=結構描述 config.db_ssl_mode=SSL config.db_path=資料庫路徑 -config.service_config=服務組態 +config.service_config=服務設定 config.register_email_confirm=要求註冊時確認電子郵件 config.disable_register=關閉註冊功能 config.allow_only_internal_registration=只允許從 Forgejo 註冊 @@ -2857,15 +2983,15 @@ config.enable_timetracking=啟用時間追蹤 config.default_enable_timetracking=預設啟用時間追蹤 config.default_allow_only_contributors_to_track_time=只讓貢獻者追蹤時間 config.no_reply_address=隱藏電子信箱域名 -config.default_visibility_organization=新組織的預設瀏覽權限 +config.default_visibility_organization=新組織的預設能見度 config.default_enable_dependencies=預設啟用問題的先決條件 -config.webhook_config=Webhook 組態 +config.webhook_config=Webhook 設定 config.queue_length=佇列長度 config.deliver_timeout=傳送逾時 config.skip_tls_verify=略過 TLS 驗證 -config.mailer_config=郵件程式組態 +config.mailer_config=郵件程式設定 config.mailer_enabled=啟用服務 config.mailer_enable_helo=啟用 HELO config.mailer_name=發送者名稱 @@ -2879,20 +3005,20 @@ config.mailer_sendmail_args=Sendmail 參數 config.mailer_sendmail_timeout=Sendmail 逾時 config.mailer_use_dummy=Dummy config.test_email_placeholder=電子信箱 (例:test@example.com) -config.send_test_mail=傳送測試郵件 -config.test_mail_failed=傳送測試郵件到「%s」時失敗: %v -config.test_mail_sent=測試郵件已傳送到「%s」。 +config.send_test_mail=寄送測試郵件 +config.test_mail_failed=傳送測試郵件至「%s」時失敗: %v +config.test_mail_sent=測試郵件已傳送至「%s」。 -config.oauth_config=OAuth 組態 +config.oauth_config=OAuth 設定 config.oauth_enabled=啟用服務 -config.cache_config=Cache 組態 -config.cache_adapter=Cache 適配器 -config.cache_interval=Cache 週期 +config.cache_config=快取設定 +config.cache_adapter=快取轉接器(adapter) +config.cache_interval=快取週期 config.cache_conn=Cache 連接字符串 config.cache_item_ttl=快取項目 TTL -config.session_config=Session 組態 +config.session_config=Session 設定 config.session_provider=Session 提供者 config.provider_config=提供者設定 config.cookie_name=Cookie 名稱 @@ -2901,24 +3027,24 @@ config.session_life_time=Session 生命週期 config.https_only=僅限 HTTPS config.cookie_life_time=Cookie 生命週期 -config.picture_config=圖片和大頭貼組態 +config.picture_config=圖片和大頭貼設定 config.picture_service=圖片服務 config.disable_gravatar=停用 Gravatar -config.enable_federated_avatar=啟用 Federated Avatars +config.enable_federated_avatar=啟用 Federated 大頭貼 -config.git_config=Git 組態 +config.git_config=Git 設定 config.git_disable_diff_highlight=停用比較語法高亮 config.git_max_diff_lines=差異比較時顯示的最多行數 (單檔) config.git_max_diff_line_characters=差異比較時顯示的最多字元數 (單行) config.git_max_diff_files=差異比較時顯示的最多檔案數 config.git_gc_args=GC 參數 config.git_migrate_timeout=遷移逾時 -config.git_mirror_timeout=鏡像更新超時 +config.git_mirror_timeout=鏡像更新逾時 config.git_clone_timeout=Clone 作業逾時 config.git_pull_timeout=Pull 作業逾時 config.git_gc_timeout=GC 作業逾時 -config.log_config=日誌組態 +config.log_config=日誌設定 config.disabled_logger=已停用 config.access_log_mode=存取日誌模式 config.xorm_log_sql=記錄 SQL @@ -2961,10 +3087,10 @@ monitor.queue.settings.changed=已更新設定 notices.system_notice_list=系統提示 notices.view_detail_header=查看提示細節 notices.operations=操作 -notices.select_all=選取全部 +notices.select_all=全部選取 notices.deselect_all=取消所有選取 notices.inverse_selection=反向選取 -notices.delete_selected=刪除選取項 +notices.delete_selected=刪除所選項目 notices.delete_all=刪除所有提示 notices.type=類型 notices.type_1=儲存庫 @@ -2972,6 +3098,29 @@ notices.type_2=任務 notices.desc=描述 notices.op=操作 notices.delete_success=已刪除系統提示。 +settings = 管理員設定 +emails.change_email_text = 您確定要更新這個電子信箱地址嗎? +monitor.download_diagnosis_report = 下載診斷報告 +dashboard.task.cancelled = 作業:%[1]s 已被取消:%[3]s +dashboard.cron.cancelled = 定時作業:%[1]s 已被取消:%[3]s +dashboard.cleanup_actions = 清除過期的 Action 日誌和物件 +users.bot = 機器人 +users.remote = 遠端 +monitor.queue.settings.remove_all_items_done = 已移除佇列中所有項目。 +config.access_log_template = 存取日誌範本 +monitor.stats = 統計資料 +self_check.no_problem_found = 未發現任何問題。 +config.send_test_mail_submit = 寄送 +users.details = 使用者詳細資訊 +assets = 程式碼資料 +dashboard.sync_branch.started = 已開始同步分支 +dashboard.rebuild_issue_indexer = 重建問題索引 +repos.lfs_size = LFS 大小 +packages.cleanup = 清除過期資料 +packages.cleanup.success = 已成功清除過期資料 +monitor.processes_count = %d 個程序 +monitor.queue.settings.remove_all_items = 全部移除 +identity_access = 身分和存取權限 [action] @@ -3052,8 +3201,8 @@ default_key=使用預設金鑰簽署 error.extract_sign=無法提取簽署 error.generate_hash=無法產生提交的雜湊值 error.no_committer_account=提交者的電子信箱沒有連結到任何帳戶 -error.no_gpg_keys_found=沒有發現已知的金鑰在資料庫的簽署中 -error.not_signed_commit=未簽名的提交 +error.no_gpg_keys_found=資料庫中找不到此簽署所對應的金鑰 +error.not_signed_commit=未簽署的提交 error.failed_retrieval_gpg_keys=找不到任何與該提交者帳戶相關的金鑰 error.probable_bad_signature=警告!雖然資料庫中有此 ID 的金鑰,但此提交未通過它的驗證!此提交是有疑慮的。 error.probable_bad_default_signature=警告!雖然預設金鑰擁有此 ID,但此提交未通過它的驗證!此提交是有疑慮的。 @@ -3183,7 +3332,7 @@ owner.settings.cargo.rebuild.success=成功重建了 Cargo 索引。 owner.settings.cleanuprules.title=管理清理規則 owner.settings.cleanuprules.add=加入清理規則 owner.settings.cleanuprules.edit=編輯清理規則 -owner.settings.cleanuprules.preview=清理規則預覽 +owner.settings.cleanuprules.preview=預覽清理規則 owner.settings.cleanuprules.preview.overview=已排定要移除 %d 個套件。 owner.settings.cleanuprules.preview.none=清理規則不符合任何套件。 owner.settings.cleanuprules.enabled=已啟用 @@ -3201,6 +3350,9 @@ owner.settings.cleanuprules.success.update=已更新清理規則。 owner.settings.cleanuprules.success.delete=已刪除清理規則。 owner.settings.chef.title=Chef Registry owner.settings.chef.keypair=產生密鑰組 +debian.repository.components = 元件 +go.install = 從指令列安裝套件: +owner.settings.cleanuprules.none = 目前沒有任何清理規則。 [secrets] secrets=Secret @@ -3221,9 +3373,9 @@ actions=Actions unit.desc=管理 Actions -status.unknown=未知 -status.waiting=正在等候 -status.running=正在執行 +status.unknown=未知的 +status.waiting=等待中 +status.running=執行中 status.success=成功 status.failure=失敗 status.skipped=已略過 @@ -3276,11 +3428,65 @@ workflow.enable=啟用工作流程 workflow.enable_success=已成功啟用工作流程「%s」。 need_approval_desc=來自 Frok 儲存庫的合併請求需要核可才能執行工作流程。 +variables.edit = 編輯變數 +variables = 變數 +variables.management = 變數管理 +variables.id_not_exist = ID 為 %d 的變數不存在。 +variables.description = 變數會被傳給特定的 Actions,除此之外它們無法被讀取。 +variables.creation.failed = 變數新增失敗。 +variables.update.success = 該變數已被編輯。 +variables.deletion.failed = 變數刪除失敗。 +variables.deletion.success = 該變數已被刪除。 +variables.creation = 新增變數 +variables.none = 目前沒有變數。 +variables.deletion = 刪除變數 +variables.deletion.description = 刪除變數是永久且不可取消的。要繼續嗎? +variables.creation.success = 變數 「%s」已成功被新增。 +variables.update.failed = 編輯變數失敗。 +runs.no_results = 沒有相符的結果。 +runs.no_workflows = 目前沒有任何工作流程。 +runs.pushed_by = 推送者 +runs.status_no_select = 所有狀態 +runs.scheduled = 已排程 +runs.empty_commit_message = (空白的提交訊息) +runners.task_list.no_tasks = 目前沒有任何工作。 +workflow.disabled = 工作流程已被停用。 +status.cancelled = 已取消 [projects] +type-2.display_name = 儲存庫專案 +type-1.display_name = 個人專案 +type-3.display_name = 組織專案 [git.filemode] ; Ordered by git filemode value, ascending. E.g. directory has "040000", normal file has "100644", … symbolic_link=符號連結 +changed_filemode = %[1]s → %[2]s +submodule = 子模組 +normal_file = 一般檔案 +executable_file = 可執行檔 + + +[search] +package_kind = 搜尋套件… +search = 搜尋… +type_tooltip = 搜尋類型 +match_tooltip = 僅包含與搜尋字詞完全相符的結果 +repo_kind = 搜尋儲存庫… +fuzzy = 模糊 +fuzzy_tooltip = 讓搜尋結果也包含與搜尋詞相近的的項目 +match = 相符 +user_kind = 搜尋使用者… +org_kind = 搜尋組織… +team_kind = 搜尋團隊… +code_kind = 搜尋程式碼 +code_search_unavailable = 程式碼搜尋目前無法使用。請連絡網站管理員。 +no_results = 沒有找到相符的結果。 +keyword_search_unavailable = 關鍵字搜尋目前無法使用。請連絡網站管理員。 +runner_kind = 搜尋 Runners … +project_kind = 搜尋專案… +branch_kind = 搜尋分支… +commit_kind = 搜尋提交… +code_search_by_git_grep = 目前搜尋結果由「git grep」提供。如果網站管理員啟程式碼索引,可能會有更好的結果。 \ No newline at end of file From df8b1b5dd202822f216d270c461f350dbc99e885 Mon Sep 17 00:00:00 2001 From: Robin Kloppe Date: Sat, 27 Apr 2024 20:17:33 +0200 Subject: [PATCH 069/401] RELEASE Version Link --- RELEASE-NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 9980338629..844c0621fe 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -51,7 +51,7 @@ $ git -C forgejo log --oneline --no-merges origin/v1.21/forgejo..origin/v7.0/for Note that the modifications related to CSS, templates or assets (images, fonts, etc.) are not documented here. Although they can be extracted and modified, Forgejo does not provide any guarantee that such changes will be portable from one version to another (even a patch version). See also - [the developer documentation about interface customization](https://forgejo.org/docs/v1.21/developer/customization/). + [the developer documentation about interface customization](https://forgejo.org/docs/v7.0/developer/customization/). * [Update checker setting might change](https://codeberg.org/forgejo/forgejo/pulls/2925). The documentation was listing it as enabled by default, however, for a while it was disabled unless it was explicitly specified in the config or on the installation page. Instances migrated from Gitea also had it disabled due to different default value. Since then Forgejo got a privacy-friendly DNS-based update checking mechanism which is now being enabled by default unless explicitly specified [in the config](https://forgejo.org/docs/v7.0/admin/config-cheat-sheet/#cron---check-for-new-forgejo-versions-cronupdate_checker). * Language statistics for repositories that use `linguist` attributes in `.gitattributes` *may* show different statistics than previously, because Forgejo recognizes more [linguist attributes](https://forgejo.org/docs/v7.0/user/language-detection/) now. * It is [no longer possible to replace the default web editor](https://codeberg.org/forgejo/forgejo/pulls/2916) used to write comments or issues and pull requests with the EasyMDE editor. It is however still available as an alternative to edit releases and wiki pages. From 5c76c37a50c337d34ab9b75dbbb8104eb2bb11e0 Mon Sep 17 00:00:00 2001 From: Otto Richter Date: Sat, 27 Apr 2024 22:03:25 +0200 Subject: [PATCH 070/401] Release notes for Limit database max connections by default --- release-notes/8.0.0/3383.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 release-notes/8.0.0/3383.md diff --git a/release-notes/8.0.0/3383.md b/release-notes/8.0.0/3383.md new file mode 100644 index 0000000000..9832030aa3 --- /dev/null +++ b/release-notes/8.0.0/3383.md @@ -0,0 +1 @@ +The default config for `database.MAX_OPEN_CONNS` changed from 0 (unlimited) to 100 to avoid problems if it exceeds the limit by the database server. If you require high concurrency, try to increase this value for both Forgejo **and your database server**. [`Limit database max connections by default`](https://codeberg.org/forgejo/forgejo/pulls/3383) From 10cd0f3992dde47187a84268ba87875d743b655f Mon Sep 17 00:00:00 2001 From: Robin Kloppe Date: Sat, 27 Apr 2024 23:27:57 +0200 Subject: [PATCH 071/401] replaced link to gitea docu --- templates/repo/settings/options.tmpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index aeb61d9eb3..31d5ae77f2 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -86,18 +86,18 @@ {{else}} {{if $newMirrorsEntirelyEnabled}} {{ctx.Locale.Tr "repo.settings.mirror_settings.docs"}} - {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}

+ {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}

{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.pull_mirror_instructions"}} - {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_pull_section"}}
+ {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_pull_section"}}
{{else if $onlyNewPushMirrorsEnabled}} {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_pull_mirror.instructions"}} {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.more_information_if_disabled"}} - {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}
+ {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}
{{else if $onlyNewPullMirrorsEnabled}} {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.instructions"}} {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.pull_mirror_warning"}} {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.more_information_if_disabled"}} - {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}

+ {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}

{{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.info"}} {{if $existingPushMirror}} {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.can_still_use"}} From 162b8401008b9a9a111a32187a20f494858ab84b Mon Sep 17 00:00:00 2001 From: Beowulf Date: Sun, 28 Apr 2024 00:33:03 +0200 Subject: [PATCH 072/401] Add inline attachments to comments If incoming email is configured and an email is sent, inline attachments are currently not added to the comment if it has the `Content-Disposition: inline` instead of `Content-Disposition: attachment` as e.g. with Apple Mail. This adds inline attachments (`Content-Disposition: inline`) that have a filename as attachment to the comment. Fixes #3496 --- services/mailer/incoming/incoming.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/mailer/incoming/incoming.go b/services/mailer/incoming/incoming.go index eade0cf271..a2352773ae 100644 --- a/services/mailer/incoming/incoming.go +++ b/services/mailer/incoming/incoming.go @@ -367,6 +367,14 @@ func getContentFromMailReader(env *enmime.Envelope) *MailContent { Content: attachment.Content, }) } + for _, inline := range env.Inlines { + if inline.FileName != "" { + attachments = append(attachments, &Attachment{ + Name: inline.FileName, + Content: inline.Content, + }) + } + } return &MailContent{ Content: reply.FromText(env.Text), From 95f8b1bbc59ce92322730c2a81b01f6155643c5c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 28 Apr 2024 00:05:53 +0000 Subject: [PATCH 073/401] Update module github.com/urfave/cli/v2 to v2.27.2 --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index f32e871921..a7ca6c202c 100644 --- a/go.mod +++ b/go.mod @@ -92,7 +92,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/syndtr/goleveldb v1.0.0 github.com/ulikunitz/xz v0.5.11 - github.com/urfave/cli/v2 v2.27.1 + github.com/urfave/cli/v2 v2.27.2 github.com/xanzy/go-gitlab v0.96.0 github.com/yohcop/openid-go v1.0.1 github.com/yuin/goldmark v1.7.0 @@ -161,7 +161,7 @@ require ( github.com/couchbase/go-couchbase v0.1.1 // indirect github.com/couchbase/gomemcached v0.3.0 // indirect github.com/couchbase/goutils v0.1.2 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davidmz/go-pageant v1.0.2 // indirect @@ -269,7 +269,7 @@ require ( github.com/x448/float16 v0.8.4 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect - github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect + github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect github.com/zeebo/blake3 v0.2.3 // indirect go.etcd.io/bbolt v1.3.9 // indirect go.mongodb.org/mongo-driver v1.13.1 // indirect diff --git a/go.sum b/go.sum index 95e400e40e..79d348cec5 100644 --- a/go.sum +++ b/go.sum @@ -203,8 +203,8 @@ github.com/couchbase/gomemcached v0.3.0 h1:XkMDdP6w7rtvLijDE0/RhcccX+XvAk5cboyBv github.com/couchbase/gomemcached v0.3.0/go.mod h1:mxliKQxOv84gQ0bJWbI+w9Wxdpt9HjDvgW9MjCym5Vo= github.com/couchbase/goutils v0.1.2 h1:gWr8B6XNWPIhfalHNog3qQKfGiYyh4K4VhO3P2o9BCs= github.com/couchbase/goutils v0.1.2/go.mod h1:h89Ek/tiOxxqjz30nPPlwZdQbdB8BwgnuBxeoUe/ViE= -github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= @@ -800,8 +800,8 @@ github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0o github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM= github.com/unknwon/com v1.0.1 h1:3d1LTxD+Lnf3soQiD4Cp/0BRB+Rsa/+RTvz8GMMzIXs= github.com/unknwon/com v1.0.1/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM= -github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= -github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= +github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.37.1-0.20220607072126-8a320890c08d/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= @@ -823,8 +823,8 @@ github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgk github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= -github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI= -github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= +github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= github.com/yardenshoham/feeds v0.0.0-20240110072658-f3d0c21c0bd5 h1:3seWKGVhGoc66Ht5QlhQsr4xT2caDnFegsnh2NqvENU= github.com/yardenshoham/feeds v0.0.0-20240110072658-f3d0c21c0bd5/go.mod h1:WMib8uJP3BbY+X8Szd1rA5Pzhdfh+HCCAYT2z7Fza6Y= github.com/yohcop/openid-go v1.0.1 h1:DPRd3iPO5F6O5zX2e62XpVAbPT6wV51cuucH0z9g3js= From 4b8f0d09726a49439c74efefe70045e419ce9130 Mon Sep 17 00:00:00 2001 From: Otto Richter Date: Sun, 28 Apr 2024 12:48:17 +0200 Subject: [PATCH 074/401] Revert "Unify watching template" This reverts commit 47ef51d51ee46976171bab80314baa3798e45d13. --- .../repo/issue/view_content/sidebar/watch.tmpl | 13 +------------ templates/repo/issue/view_content/watching.tmpl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 templates/repo/issue/view_content/watching.tmpl diff --git a/templates/repo/issue/view_content/sidebar/watch.tmpl b/templates/repo/issue/view_content/sidebar/watch.tmpl index 6c74b140c8..852738a706 100644 --- a/templates/repo/issue/view_content/sidebar/watch.tmpl +++ b/templates/repo/issue/view_content/sidebar/watch.tmpl @@ -1,17 +1,6 @@
{{ctx.Locale.Tr "notification.notifications"}}
-
- - -
+ {{template "repo/issue/view_content/watching" .}}
diff --git a/templates/repo/issue/view_content/watching.tmpl b/templates/repo/issue/view_content/watching.tmpl new file mode 100644 index 0000000000..05936d090b --- /dev/null +++ b/templates/repo/issue/view_content/watching.tmpl @@ -0,0 +1,12 @@ +
+ + +
From bc8860ce32a8f83b32630d38904843f1ff9453c0 Mon Sep 17 00:00:00 2001 From: Otto Richter Date: Sun, 28 Apr 2024 12:56:28 +0200 Subject: [PATCH 075/401] Move watching sub-template to sidebar folder --- routers/web/repo/issue_watch.go | 2 +- templates/repo/issue/view_content/sidebar/watch.tmpl | 2 +- templates/repo/issue/view_content/{ => sidebar}/watching.tmpl | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename templates/repo/issue/view_content/{ => sidebar}/watching.tmpl (100%) diff --git a/routers/web/repo/issue_watch.go b/routers/web/repo/issue_watch.go index 8b033f3b17..c8d7187b8e 100644 --- a/routers/web/repo/issue_watch.go +++ b/routers/web/repo/issue_watch.go @@ -14,7 +14,7 @@ import ( ) const ( - tplWatching base.TplName = "repo/issue/view_content/watching" + tplWatching base.TplName = "repo/issue/view_content/sidebar/watching" ) // IssueWatch sets issue watching diff --git a/templates/repo/issue/view_content/sidebar/watch.tmpl b/templates/repo/issue/view_content/sidebar/watch.tmpl index 852738a706..ee14168070 100644 --- a/templates/repo/issue/view_content/sidebar/watch.tmpl +++ b/templates/repo/issue/view_content/sidebar/watch.tmpl @@ -1,6 +1,6 @@
{{ctx.Locale.Tr "notification.notifications"}}
- {{template "repo/issue/view_content/watching" .}} + {{template "repo/issue/view_content/sidebar/watching" .}}
diff --git a/templates/repo/issue/view_content/watching.tmpl b/templates/repo/issue/view_content/sidebar/watching.tmpl similarity index 100% rename from templates/repo/issue/view_content/watching.tmpl rename to templates/repo/issue/view_content/sidebar/watching.tmpl From b796694cd5df688105b490edd43aa923743b3113 Mon Sep 17 00:00:00 2001 From: Beowulf Date: Sun, 28 Apr 2024 14:11:17 +0200 Subject: [PATCH 076/401] Skip already handled incoming emails It seems like (at least on my machine) that every mail is processed twice. Added a check if the email is already handled and if so, skip it. --- services/mailer/incoming/incoming.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/mailer/incoming/incoming.go b/services/mailer/incoming/incoming.go index a2352773ae..555cdfee8b 100644 --- a/services/mailer/incoming/incoming.go +++ b/services/mailer/incoming/incoming.go @@ -219,6 +219,11 @@ loop: } err := func() error { + if handledSet.Contains(msg.SeqNum) { + log.Debug("Skipping already handled message") + return nil + } + r := msg.GetBody(section) if r == nil { return fmt.Errorf("could not get body from message: %w", err) From 2ec0c5e28454413856a6de48d197fa29170dd79b Mon Sep 17 00:00:00 2001 From: Cheng <36215014+ChengenH@users.noreply.github.com> Date: Mon, 22 Apr 2024 03:44:03 +0800 Subject: [PATCH 077/401] chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621) use errors.New to replace fmt.Errorf with no parameters will much better (cherry picked from commit 9de443ced2c328d9b58a5e144a765f402aab859d) --- cmd/admin_auth.go | 3 ++- cmd/admin_auth_oauth.go | 3 ++- cmd/admin_auth_stmp.go | 3 +-- cmd/admin_user_delete.go | 3 ++- cmd/admin_user_generate_access_token.go | 5 +++-- cmd/embedded.go | 6 +++--- cmd/manager_logging.go | 3 ++- models/auth/oauth2.go | 3 ++- models/git/lfs_lock.go | 4 ++-- models/repo_transfer.go | 3 ++- 10 files changed, 21 insertions(+), 15 deletions(-) diff --git a/cmd/admin_auth.go b/cmd/admin_auth.go index ec92e342d4..4777a92908 100644 --- a/cmd/admin_auth.go +++ b/cmd/admin_auth.go @@ -4,6 +4,7 @@ package cmd import ( + "errors" "fmt" "os" "text/tabwriter" @@ -91,7 +92,7 @@ func runListAuth(c *cli.Context) error { func runDeleteAuth(c *cli.Context) error { if !c.IsSet("id") { - return fmt.Errorf("--id flag is missing") + return errors.New("--id flag is missing") } ctx, cancel := installSignals() diff --git a/cmd/admin_auth_oauth.go b/cmd/admin_auth_oauth.go index c151c0af27..8e6239ac33 100644 --- a/cmd/admin_auth_oauth.go +++ b/cmd/admin_auth_oauth.go @@ -4,6 +4,7 @@ package cmd import ( + "errors" "fmt" "net/url" @@ -193,7 +194,7 @@ func runAddOauth(c *cli.Context) error { func runUpdateOauth(c *cli.Context) error { if !c.IsSet("id") { - return fmt.Errorf("--id flag is missing") + return errors.New("--id flag is missing") } ctx, cancel := installSignals() diff --git a/cmd/admin_auth_stmp.go b/cmd/admin_auth_stmp.go index 58a6e2ac22..d724746905 100644 --- a/cmd/admin_auth_stmp.go +++ b/cmd/admin_auth_stmp.go @@ -5,7 +5,6 @@ package cmd import ( "errors" - "fmt" "strings" auth_model "code.gitea.io/gitea/models/auth" @@ -166,7 +165,7 @@ func runAddSMTP(c *cli.Context) error { func runUpdateSMTP(c *cli.Context) error { if !c.IsSet("id") { - return fmt.Errorf("--id flag is missing") + return errors.New("--id flag is missing") } ctx, cancel := installSignals() diff --git a/cmd/admin_user_delete.go b/cmd/admin_user_delete.go index 1cbc6f7527..520557554a 100644 --- a/cmd/admin_user_delete.go +++ b/cmd/admin_user_delete.go @@ -4,6 +4,7 @@ package cmd import ( + "errors" "fmt" "strings" @@ -42,7 +43,7 @@ var microcmdUserDelete = &cli.Command{ func runDeleteUser(c *cli.Context) error { if !c.IsSet("id") && !c.IsSet("username") && !c.IsSet("email") { - return fmt.Errorf("You must provide the id, username or email of a user to delete") + return errors.New("You must provide the id, username or email of a user to delete") } ctx, cancel := installSignals() diff --git a/cmd/admin_user_generate_access_token.go b/cmd/admin_user_generate_access_token.go index 6e78939680..6c2c10494e 100644 --- a/cmd/admin_user_generate_access_token.go +++ b/cmd/admin_user_generate_access_token.go @@ -4,6 +4,7 @@ package cmd import ( + "errors" "fmt" auth_model "code.gitea.io/gitea/models/auth" @@ -42,7 +43,7 @@ var microcmdUserGenerateAccessToken = &cli.Command{ func runGenerateAccessToken(c *cli.Context) error { if !c.IsSet("username") { - return fmt.Errorf("You must provide a username to generate a token for") + return errors.New("You must provide a username to generate a token for") } ctx, cancel := installSignals() @@ -68,7 +69,7 @@ func runGenerateAccessToken(c *cli.Context) error { return err } if exist { - return fmt.Errorf("access token name has been used already") + return errors.New("access token name has been used already") } // make sure the scopes are valid diff --git a/cmd/embedded.go b/cmd/embedded.go index 71d483d11c..9f03f7be7c 100644 --- a/cmd/embedded.go +++ b/cmd/embedded.go @@ -157,9 +157,9 @@ func runViewDo(c *cli.Context) error { } if len(matchedAssetFiles) == 0 { - return fmt.Errorf("no files matched the given pattern") + return errors.New("no files matched the given pattern") } else if len(matchedAssetFiles) > 1 { - return fmt.Errorf("too many files matched the given pattern, try to be more specific") + return errors.New("too many files matched the given pattern, try to be more specific") } data, err := matchedAssetFiles[0].fs.ReadFile(matchedAssetFiles[0].name) @@ -180,7 +180,7 @@ func runExtractDo(c *cli.Context) error { } if c.NArg() == 0 { - return fmt.Errorf("a list of pattern of files to extract is mandatory (e.g. '**' for all)") + return errors.New("a list of pattern of files to extract is mandatory (e.g. '**' for all)") } destdir := "." diff --git a/cmd/manager_logging.go b/cmd/manager_logging.go index 2c701f2672..6049b00d5e 100644 --- a/cmd/manager_logging.go +++ b/cmd/manager_logging.go @@ -4,6 +4,7 @@ package cmd import ( + "errors" "fmt" "os" @@ -249,7 +250,7 @@ func runAddFileLogger(c *cli.Context) error { if c.IsSet("filename") { vals["filename"] = c.String("filename") } else { - return fmt.Errorf("filename must be set when creating a file logger") + return errors.New("filename must be set when creating a file logger") } if c.IsSet("rotate") { vals["rotate"] = c.Bool("rotate") diff --git a/models/auth/oauth2.go b/models/auth/oauth2.go index 5eabc7d9b4..125d64b36f 100644 --- a/models/auth/oauth2.go +++ b/models/auth/oauth2.go @@ -8,6 +8,7 @@ import ( "crypto/sha256" "encoding/base32" "encoding/base64" + "errors" "fmt" "net" "net/url" @@ -301,7 +302,7 @@ func UpdateOAuth2Application(ctx context.Context, opts UpdateOAuth2ApplicationOp return nil, err } if app.UID != opts.UserID { - return nil, fmt.Errorf("UID mismatch") + return nil, errors.New("UID mismatch") } builtinApps := BuiltinApplications() if _, builtin := builtinApps[app.ClientID]; builtin { diff --git a/models/git/lfs_lock.go b/models/git/lfs_lock.go index 261c73032a..2f65833fe3 100644 --- a/models/git/lfs_lock.go +++ b/models/git/lfs_lock.go @@ -5,7 +5,7 @@ package git import ( "context" - "fmt" + "errors" "strings" "time" @@ -148,7 +148,7 @@ func DeleteLFSLockByID(ctx context.Context, id int64, repo *repo_model.Repositor } if !force && u.ID != lock.OwnerID { - return nil, fmt.Errorf("user doesn't own lock and force flag is not set") + return nil, errors.New("user doesn't own lock and force flag is not set") } if _, err := db.GetEngine(dbCtx).ID(id).Delete(new(LFSLock)); err != nil { diff --git a/models/repo_transfer.go b/models/repo_transfer.go index f20c5bcdc0..0c23d759f9 100644 --- a/models/repo_transfer.go +++ b/models/repo_transfer.go @@ -5,6 +5,7 @@ package models import ( "context" + "errors" "fmt" "code.gitea.io/gitea/models/db" @@ -120,7 +121,7 @@ func DeleteRepositoryTransfer(ctx context.Context, repoID int64) error { func TestRepositoryReadyForTransfer(status repo_model.RepositoryStatus) error { switch status { case repo_model.RepositoryBeingMigrated: - return fmt.Errorf("repo is not ready, currently migrating") + return errors.New("repo is not ready, currently migrating") case repo_model.RepositoryPendingTransfer: return ErrRepoTransferInProgress{} } From e64e8d24ace06910aab574eb073b429f3717cc0a Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Apr 2024 22:24:56 +0200 Subject: [PATCH 078/401] Fix flash on dashboard (#30572) Fixes https://github.com/go-gitea/gitea/issues/30566, regression from https://github.com/go-gitea/gitea/pull/30214. (cherry picked from commit 1b1b8500aea0a17e999093e65b573ce54ae080ae) Conflicts: web_src/css/base.css the conflict is because https://codeberg.org/forgejo/forgejo/pulls/3350 skipped Remove fomantic menu module (gitea#30325) and it was not ported. --- templates/user/dashboard/dashboard.tmpl | 2 +- web_src/css/base.css | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl index 030fd49940..415423d436 100644 --- a/templates/user/dashboard/dashboard.tmpl +++ b/templates/user/dashboard/dashboard.tmpl @@ -1,8 +1,8 @@ {{template "base/head" .}}
{{template "user/dashboard/navbar" .}} + {{template "base/alert" .}}
- {{template "base/alert" .}}
{{template "user/heatmap" .}} {{template "user/dashboard/feeds" .}} diff --git a/web_src/css/base.css b/web_src/css/base.css index c571280ee0..ce0b0f569a 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -636,6 +636,12 @@ img.ui.avatar, background: var(--color-active); } +/* add horizontal margin to elements that are outside top-level of .flex-container or .ui.container */ +.page-content > .flash-message { + margin-left: var(--page-margin-x); + margin-right: var(--page-margin-x); +} + .ui.form .fields.error .field textarea, .ui.form .fields.error .field select, .ui.form .fields.error .field input:not([type]), From 4e2de8bdc62b3bb8c0a63358573985ec2ab87b5e Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 22 Apr 2024 06:19:59 +0800 Subject: [PATCH 079/401] fix(api): refactor branch and tag existence checks (#30618) - Update branch existence check to also include tag existence check - Adjust error message for branch/tag existence check ref: https://github.com/go-gitea/gitea/pull/30349 --------- Signed-off-by: appleboy Co-authored-by: wxiaoguang Co-authored-by: Giteabot (cherry picked from commit 6459c50278906893f3cbc2bf3e52eff65e739b37) --- routers/api/v1/repo/pull.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index eec3c49bc4..e982b5a450 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -1079,11 +1079,10 @@ func parseCompareInfo(ctx *context.APIContext, form api.CreatePullRequestOption) } ctx.Repo.PullRequest.SameRepo = isSameRepo - log.Info("Base branch: %s", baseBranch) - log.Info("Repo path: %s", ctx.Repo.GitRepo.Path) + log.Trace("Repo path: %q, base branch: %q, head branch: %q", ctx.Repo.GitRepo.Path, baseBranch, headBranch) // Check if base branch is valid. - if !ctx.Repo.GitRepo.IsBranchExist(baseBranch) { - ctx.NotFound("IsBranchExist") + if !ctx.Repo.GitRepo.IsBranchExist(baseBranch) && !ctx.Repo.GitRepo.IsTagExist(baseBranch) { + ctx.NotFound("BaseNotExist") return nil, nil, nil, nil, "", "" } @@ -1146,7 +1145,7 @@ func parseCompareInfo(ctx *context.APIContext, form api.CreatePullRequestOption) } // Check if head branch is valid. - if !headGitRepo.IsBranchExist(headBranch) { + if !headGitRepo.IsBranchExist(headBranch) && !headGitRepo.IsTagExist(headBranch) { headGitRepo.Close() ctx.NotFound() return nil, nil, nil, nil, "", "" From 2b45aa42f564d25d952ecc9b517a2b8713a6d5ff Mon Sep 17 00:00:00 2001 From: GiteaBot Date: Mon, 22 Apr 2024 00:25:56 +0000 Subject: [PATCH 080/401] [skip ci] Updated licenses and gitignores (cherry picked from commit 31386dc2bb94346b5a1039f009021a4e2f5eb166) --- options/license/HPND-UC-export-US | 10 ++++++++++ options/license/NCL | 32 +++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 options/license/HPND-UC-export-US create mode 100644 options/license/NCL diff --git a/options/license/HPND-UC-export-US b/options/license/HPND-UC-export-US new file mode 100644 index 0000000000..015556c5f9 --- /dev/null +++ b/options/license/HPND-UC-export-US @@ -0,0 +1,10 @@ +Copyright (C) 1985, 1990 Regents of the University of California. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies. The University of California +makes no representations about the suitability of this +software for any purpose. It is provided "as is" without +express or implied warranty. Export of this software outside +of the United States of America may require an export license. diff --git a/options/license/NCL b/options/license/NCL new file mode 100644 index 0000000000..3bfb658c26 --- /dev/null +++ b/options/license/NCL @@ -0,0 +1,32 @@ +Copyright (c) 2004 the University Corporation for Atmospheric +Research ("UCAR"). All rights reserved. Developed by NCAR's +Computational and Information Systems Laboratory, UCAR, +www.cisl.ucar.edu. + +Redistribution and use of the Software in source and binary forms, +with or without modification, is permitted provided that the +following conditions are met: + +- Neither the names of NCAR's Computational and Information Systems +Laboratory, the University Corporation for Atmospheric Research, +nor the names of its sponsors or contributors may be used to +endorse or promote products derived from this Software without +specific prior written permission. + +- Redistributions of source code must retain the above copyright +notices, this list of conditions, and the disclaimer below. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions, and the disclaimer below in the +documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. From 02316e1e408bdfcf95a0c5ae0d174e8241c17e8a Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 22 Apr 2024 12:48:14 +0200 Subject: [PATCH 081/401] Hide diff stats on empty PRs (#30629) When a PR is empty, e.g. has neither additions nor deletions, we don't need to show this: Screenshot 2024-04-21 at 23 25 38 (cherry picked from commit 0386a42f70d1026c50697b12378f5026a63182b9) --- templates/repo/pulls/tab_menu.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/repo/pulls/tab_menu.tmpl b/templates/repo/pulls/tab_menu.tmpl index c0e48928f9..a6d058f160 100644 --- a/templates/repo/pulls/tab_menu.tmpl +++ b/templates/repo/pulls/tab_menu.tmpl @@ -15,12 +15,14 @@ {{ctx.Locale.Tr "repo.pulls.tab_files"}} {{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}} + {{if or .Diff.TotalAddition .Diff.TotalDeletion}} {{if .Diff.TotalAddition}}+{{.Diff.TotalAddition}}{{end}} {{if .Diff.TotalDeletion}}-{{.Diff.TotalDeletion}}{{end}}
+ {{end}}
From 31b608a1e9c0e1602b7b0242e0c35b89b8921a57 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 22 Apr 2024 13:21:06 +0200 Subject: [PATCH 082/401] Remove obsolete CSS text classes (#30576) - `.text-thin` and `.text-italic` are not present in CSS so were doing nothing and I removed them. - `.text.middle` was unused so I removed it. - `.text.italic` is replaced with `tw-italic`. - `.text.normal` had exactly one use and it wasn't even needed. - add a `muted` class to the link to `org_profile_avatar.tmpl`. --------- Co-authored-by: wxiaoguang (cherry picked from commit aff7b7bdd285cc1fcabea774f153886e11ae9f5d) --- templates/org/team/members.tmpl | 2 +- templates/org/team/repositories.tmpl | 2 +- templates/org/team/sidebar.tmpl | 2 +- templates/repo/create.tmpl | 6 +++--- templates/repo/file_info.tmpl | 2 +- templates/repo/settings/collaboration.tmpl | 4 ++-- templates/repo/settings/options.tmpl | 2 +- templates/shared/user/org_profile_avatar.tmpl | 2 +- web_src/css/base.css | 16 ---------------- 9 files changed, 11 insertions(+), 27 deletions(-) diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index 5719328a27..7e9a59a6bf 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -46,7 +46,7 @@
{{else}}
- {{ctx.Locale.Tr "org.teams.members.none"}} + {{ctx.Locale.Tr "org.teams.members.none"}}
{{end}}
diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index 98b4854eb8..f5d68ce416 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -48,7 +48,7 @@
{{else}}
- {{ctx.Locale.Tr "org.teams.repos.none"}} + {{ctx.Locale.Tr "org.teams.repos.none"}}
{{end}}
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 9311a46e38..c9f80259e2 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -22,7 +22,7 @@ {{if .Team.Description}} {{.Team.Description}} {{else}} - {{ctx.Locale.Tr "org.teams.no_desc"}} + {{ctx.Locale.Tr "org.teams.no_desc"}} {{end}}
{{if eq .Team.LowerName "owners"}} diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index bcd3c16b6a..c1c8c2185e 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -65,7 +65,7 @@
-