From d3689b56832907afd52557c4e54c348839885089 Mon Sep 17 00:00:00 2001 From: Typed SIGTERM Date: Mon, 3 Feb 2025 02:42:30 +0800 Subject: [PATCH 1/5] Correct bot label `vertical-align` (#33477) (cherry picked from commit 50873c192559e05e88c8edbdd50ed336ef0a6c11) --- templates/shared/user/authorlink.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/shared/user/authorlink.tmpl b/templates/shared/user/authorlink.tmpl index d57a635b4b..abe1ab1ce2 100644 --- a/templates/shared/user/authorlink.tmpl +++ b/templates/shared/user/authorlink.tmpl @@ -1 +1 @@ -{{.GetDisplayName}}{{if .IsBot}}bot{{end}} +{{.GetDisplayName}}{{if .IsBot}}bot{{end}} From 9d2fabc7d35d52dba32c08b7b9d4171831cacc52 Mon Sep 17 00:00:00 2001 From: GiteaBot Date: Mon, 3 Feb 2025 00:32:15 +0000 Subject: [PATCH 2/5] [skip ci] Updated licenses and gitignores (cherry picked from commit ed84f3737a31c46de537b688f877753a92d0ab5c) --- options/gitignore/Flutter | 119 ++++++++++++++++++ options/gitignore/Nix | 3 + options/gitignore/NotesAndCoreConfiguration | 16 +++ .../gitignore/NotesAndExtendedConfiguration | 38 ++++++ options/gitignore/NotesOnly | 4 + 5 files changed, 180 insertions(+) create mode 100644 options/gitignore/Flutter create mode 100644 options/gitignore/NotesAndCoreConfiguration create mode 100644 options/gitignore/NotesAndExtendedConfiguration create mode 100644 options/gitignore/NotesOnly diff --git a/options/gitignore/Flutter b/options/gitignore/Flutter new file mode 100644 index 0000000000..39b8814aec --- /dev/null +++ b/options/gitignore/Flutter @@ -0,0 +1,119 @@ +# Miscellaneous +*.class +*.lock +*.log +*.pyc +*.swp +.buildlog/ +.history + + + +# Flutter repo-specific +/bin/cache/ +/bin/internal/bootstrap.bat +/bin/internal/bootstrap.sh +/bin/mingit/ +/dev/benchmarks/mega_gallery/ +/dev/bots/.recipe_deps +/dev/bots/android_tools/ +/dev/devicelab/ABresults*.json +/dev/docs/doc/ +/dev/docs/flutter.docs.zip +/dev/docs/lib/ +/dev/docs/pubspec.yaml +/dev/integration_tests/**/xcuserdata +/dev/integration_tests/**/Pods +/packages/flutter/coverage/ +version +analysis_benchmark.json + +# packages file containing multi-root paths +.packages.generated + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +**/generated_plugin_registrant.dart +.packages +.pub-preload-cache/ +.pub/ +build/ +flutter_*.png +linked_*.ds +unlinked.ds +unlinked_spec.ds + +# Android related +**/android/**/gradle-wrapper.jar +.gradle/ +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java +**/android/key.properties +*.jks + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/.last_build_id +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Flutter.podspec +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/ephemeral +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/Flutter/flutter_export_environment.sh +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# macOS +**/Flutter/ephemeral/ +**/Pods/ +**/macos/Flutter/GeneratedPluginRegistrant.swift +**/macos/Flutter/ephemeral +**/xcuserdata/ + +# Windows +**/windows/flutter/generated_plugin_registrant.cc +**/windows/flutter/generated_plugin_registrant.h +**/windows/flutter/generated_plugins.cmake + +# Linux +**/linux/flutter/generated_plugin_registrant.cc +**/linux/flutter/generated_plugin_registrant.h +**/linux/flutter/generated_plugins.cmake + +# Coverage +coverage/ + +# Symbols +app.*.symbols + +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +!/dev/ci/**/Gemfile.lock \ No newline at end of file diff --git a/options/gitignore/Nix b/options/gitignore/Nix index 1fd04ef1f6..912e6700f4 100644 --- a/options/gitignore/Nix +++ b/options/gitignore/Nix @@ -1,3 +1,6 @@ # Ignore build outputs from performing a nix-build or `nix build` command result result-* + +# Ignore automatically generated direnv output +.direnv diff --git a/options/gitignore/NotesAndCoreConfiguration b/options/gitignore/NotesAndCoreConfiguration new file mode 100644 index 0000000000..4eff01dae1 --- /dev/null +++ b/options/gitignore/NotesAndCoreConfiguration @@ -0,0 +1,16 @@ +# Excludes Obsidian workspace cache and plugins. All notes and core obsidian +# configuration files are tracked by Git. + +# The current application UI state (DOM layout, recently-opened files, etc.) is +# stored in these files (separate for desktop and mobile) so you can resume +# your session seamlessly after a restart. If you want to track UI state, use +# the Workspaces core plugin instead of relying on these files. +.obsidian/workspace.json +.obsidian/workspace-mobile.json + +# Obsidian plugins are stored under .obsidian/plugins/$plugin_name. They +# contain metadata (manifest.json), application code (main.js), stylesheets +# (styles.css), and user-configuration data (data.json). +# We want to exclude all plugin-related files, so we can exclude everything +# under this directory. +.obsidian/plugins/**/* diff --git a/options/gitignore/NotesAndExtendedConfiguration b/options/gitignore/NotesAndExtendedConfiguration new file mode 100644 index 0000000000..3e0804f299 --- /dev/null +++ b/options/gitignore/NotesAndExtendedConfiguration @@ -0,0 +1,38 @@ +# Excludes Obsidian workspace cache and plugin code, but retains plugin +# configuration. All notes and user-controlled configuration files are tracked +# by Git. +# +# !!! WARNING !!! +# +# Community plugins may store sensitive secrets in their data.json files. By +# including these files, those secrets may be tracked in your Git repository. +# +# To ignore configurations for specific plugins, add a line like this after the +# contents of this file (order is important): +# .obsidian/plugins/{{plugin_name}}/data.json +# +# Alternatively, ensure that you are treating your entire Git repository as +# sensitive data, since it may contain secrets, or may have contained them in +# past commits. Understand your threat profile, and make the decision +# appropriate for yourself. If in doubt, err on the side of not including +# plugin configuration. Use one of the alternative gitignore files instead: +# * NotesOnly.gitignore +# * NotesAndCoreConfiguration.gitignore + +# The current application UI state (DOM layout, recently-opened files, etc.) is +# stored in these files (separate for desktop and mobile) so you can resume +# your session seamlessly after a restart. If you want to track UI state, use +# the Workspaces core plugin instead of relying on these files. +.obsidian/workspace.json +.obsidian/workspace-mobile.json + +# Obsidian plugins are stored under .obsidian/plugins/$plugin_name. They +# contain metadata (manifest.json), application code (main.js), stylesheets +# (styles.css), and user-configuration data (data.json). +# We only want to track data.json, so we: +# 1. exclude everything under the plugins directory recursively, +# 2. unignore the plugin directories themselves, which then allows us to +# 3. unignore the data.json files +.obsidian/plugins/**/* +!.obsidian/plugins/*/ +!.obsidian/plugins/*/data.json diff --git a/options/gitignore/NotesOnly b/options/gitignore/NotesOnly new file mode 100644 index 0000000000..2b3b76ee0e --- /dev/null +++ b/options/gitignore/NotesOnly @@ -0,0 +1,4 @@ +# Excludes all Obsidian-related configuration. All notes are tracked by Git. + +# All Obsidian configuration and runtime state is stored here +.obsidian/**/* From 8cda45f7502d6c218b6e268fec3f2cd5fa31ee6c Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 6 Feb 2025 19:05:25 -0800 Subject: [PATCH 3/5] Move gitgraph from modules to services layer (#33527) Just move, no code change. (cherry picked from commit 466cc725bc69d9222abf17d7a22d86e7dbe991ac) --- routers/web/repo/commit.go | 2 +- {modules => services/repository}/gitgraph/graph.go | 0 {modules => services/repository}/gitgraph/graph_models.go | 0 {modules => services/repository}/gitgraph/graph_test.go | 0 {modules => services/repository}/gitgraph/parser.go | 0 5 files changed, 1 insertion(+), 1 deletion(-) rename {modules => services/repository}/gitgraph/graph.go (100%) rename {modules => services/repository}/gitgraph/graph_models.go (100%) rename {modules => services/repository}/gitgraph/graph_test.go (100%) rename {modules => services/repository}/gitgraph/parser.go (100%) diff --git a/routers/web/repo/commit.go b/routers/web/repo/commit.go index 2feb898224..c2436a1c59 100644 --- a/routers/web/repo/commit.go +++ b/routers/web/repo/commit.go @@ -21,7 +21,6 @@ import ( "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/charset" "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/gitgraph" "code.gitea.io/gitea/modules/gitrepo" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup" @@ -32,6 +31,7 @@ import ( "code.gitea.io/gitea/services/forms" "code.gitea.io/gitea/services/gitdiff" git_service "code.gitea.io/gitea/services/repository" + "code.gitea.io/gitea/services/repository/gitgraph" ) const ( diff --git a/modules/gitgraph/graph.go b/services/repository/gitgraph/graph.go similarity index 100% rename from modules/gitgraph/graph.go rename to services/repository/gitgraph/graph.go diff --git a/modules/gitgraph/graph_models.go b/services/repository/gitgraph/graph_models.go similarity index 100% rename from modules/gitgraph/graph_models.go rename to services/repository/gitgraph/graph_models.go diff --git a/modules/gitgraph/graph_test.go b/services/repository/gitgraph/graph_test.go similarity index 100% rename from modules/gitgraph/graph_test.go rename to services/repository/gitgraph/graph_test.go diff --git a/modules/gitgraph/parser.go b/services/repository/gitgraph/parser.go similarity index 100% rename from modules/gitgraph/parser.go rename to services/repository/gitgraph/parser.go From 65fa66fb18aa50139fe2d66e2b7d8add29eb0e28 Mon Sep 17 00:00:00 2001 From: Kerwin Bryant Date: Sun, 9 Feb 2025 00:13:41 +0800 Subject: [PATCH 4/5] Add "No data available" display when list is empty (#33517) Add a "No data available" message to be displayed when the list has no data. This improves the user experience by providing clear feedback in an empty state. --------- Co-authored-by: wxiaoguang (cherry picked from commit a52720b5b4da3e324034312f7fe1e29fd22686cc) --- templates/admin/auth/list.tmpl | 2 ++ templates/admin/emails/list.tmpl | 2 ++ templates/admin/notice.tmpl | 2 ++ templates/admin/org/list.tmpl | 2 ++ templates/admin/packages/list.tmpl | 2 ++ templates/admin/repo/list.tmpl | 2 ++ templates/admin/user/list.tmpl | 2 ++ tests/integration/auth_ldap_test.go | 2 +- 8 files changed, 15 insertions(+), 1 deletion(-) diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl index c162b7b74d..9c283fe3d8 100644 --- a/templates/admin/auth/list.tmpl +++ b/templates/admin/auth/list.tmpl @@ -30,6 +30,8 @@ {{DateUtils.AbsoluteShort .CreatedUnix}} {{svg "octicon-pencil"}} + {{else}} + {{ctx.Locale.Tr "no_results_found"}} {{end}} diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl index b07c6fcc01..8796794aee 100644 --- a/templates/admin/emails/list.tmpl +++ b/templates/admin/emails/list.tmpl @@ -66,6 +66,8 @@ + {{else}} + {{ctx.Locale.Tr "no_results_found"}} {{end}} diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl index 04a0b64432..4f8783dd42 100644 --- a/templates/admin/notice.tmpl +++ b/templates/admin/notice.tmpl @@ -24,6 +24,8 @@ {{DateUtils.AbsoluteShort .CreatedUnix}} {{svg "octicon-note" 16}} + {{else}} + {{ctx.Locale.Tr "no_results_found"}} {{end}} {{if .Notices}} diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl index d0805c85bc..b719d259e0 100644 --- a/templates/admin/org/list.tmpl +++ b/templates/admin/org/list.tmpl @@ -66,6 +66,8 @@ {{DateUtils.AbsoluteShort .CreatedUnix}} {{svg "octicon-pencil"}} + {{else}} + {{ctx.Locale.Tr "no_results_found"}} {{end}} diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl index aa38731d4f..f22600a449 100644 --- a/templates/admin/packages/list.tmpl +++ b/templates/admin/packages/list.tmpl @@ -74,6 +74,8 @@ {{DateUtils.AbsoluteShort .Version.CreatedUnix}} {{svg "octicon-trash"}} + {{else}} + {{ctx.Locale.Tr "no_results_found"}} {{end}} diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index c4924c3fac..0422705ea9 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -86,6 +86,8 @@ {{DateUtils.AbsoluteShort .CreatedUnix}} {{svg "octicon-trash"}} + {{else}} + {{ctx.Locale.Tr "no_results_found"}} {{end}} diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl index 9b3447f44a..f4609edbbf 100644 --- a/templates/admin/user/list.tmpl +++ b/templates/admin/user/list.tmpl @@ -109,6 +109,8 @@ + {{else}} + {{ctx.Locale.Tr "no_results_found"}} {{end}} diff --git a/tests/integration/auth_ldap_test.go b/tests/integration/auth_ldap_test.go index 62a7d18904..e8b38afeb1 100644 --- a/tests/integration/auth_ldap_test.go +++ b/tests/integration/auth_ldap_test.go @@ -283,7 +283,7 @@ func TestLDAPUserSyncWithEmptyUsernameAttribute(t *testing.T) { htmlDoc := NewHTMLParser(t, resp.Body) - tr := htmlDoc.doc.Find("table.table tbody tr") + tr := htmlDoc.doc.Find("table.table tbody tr:not(.no-results-row)") assert.Equal(t, 0, tr.Length()) } From 3d708aeee6a186f2d9417eef7e25aedb6ce45382 Mon Sep 17 00:00:00 2001 From: Gusted Date: Sun, 9 Feb 2025 10:34:12 +0100 Subject: [PATCH 5/5] chore: update deadcode --- .deadcode-out | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.deadcode-out b/.deadcode-out index 403a6e40d2..2a4f1c7f2d 100644 --- a/.deadcode-out +++ b/.deadcode-out @@ -103,9 +103,6 @@ code.gitea.io/gitea/modules/git openRepositoryWithDefaultContext ToEntryMode -code.gitea.io/gitea/modules/gitgraph - Parser.Reset - code.gitea.io/gitea/modules/gitrepo GetBranchCommitID GetWikiDefaultBranch @@ -224,6 +221,9 @@ code.gitea.io/gitea/services/repository code.gitea.io/gitea/services/repository/files ContentType.String +code.gitea.io/gitea/services/repository/gitgraph + Parser.Reset + code.gitea.io/gitea/services/webhook NewNotifier