Commit Graph

20084 Commits (8feb5f9b9fde17f0ed1c7664024d478c8e3a98eb)

Author SHA1 Message Date
Lunny Xiao 8feb5f9b9f
Merge add labels and remove labels as one operation when firing project workflow 2025-11-11 11:00:02 -08:00
Lunny Xiao bf841a831a Merge branch 'main' into lunny/project_workflow 2025-11-04 15:03:35 -08:00
Lunny Xiao 883718e059
Fix unnecessary comment when moving an issue to the same column 2025-11-04 15:03:22 -08:00
Lunny Xiao be143bdd6e
Delete unused code 2025-11-04 12:53:00 -08:00
Lunny Xiao 7db5b850ca
fix clone workflow 2025-11-04 12:36:00 -08:00
wxiaoguang a0f492d9f4
Make ACME email optional (#35849)
Fix a regression from #33668

Fix #35847
2025-11-04 18:17:50 +00:00
Lunny Xiao 206f4c88b1
Remove wrong code (#35846)
Follow #35821
Fix https://github.com/go-gitea/gitea/pull/35844#issuecomment-3483521045

The reviewed file numbers and progress have been set from backend so
that we don't need to update the numbers when clicking `load more`.
2025-11-04 17:46:17 +00:00
Cory Sanin 851db77256
Fix Arch repo pacman.conf snippet (#35825)
Current template uses the owner followed by the instance URL as the repo
name. Technically this can work if the repo happens to be named the
exact same way. But if, for example, you follow [the
docs](https://docs.gitea.com/usage/packages/arch/#publish-a-package),
you'll end up with a package in `core` while the pacman conf refers to a
non-existent repo `testuser.gitea.example.com`. Whatever is in the
square brackets get substituted in for `$repo`, so we do not want
anything except the exact repo name there.

And since it's now referring to the repo and not the owner, I've updated
the pacman conf to show all repositories.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
2025-11-04 18:07:04 +01:00
Naxdy 2be51d0b27
Port away from `flake-utils` (#35675)
`flake-utils` is currently only used for outputting system-specific dev
shells. This can actually be achieved only using functionality already
present within `nixpkgs`, thus there is no need for an extra dependency.

Additionally, we move to use the `packages` and `env` args for `mkShell`
to more clearly outline what they are used for.

---

Further reading:
https://determinate.systems/blog/best-practices-for-nix-at-work/#avoid-flake-helper-libraries-if-possible

As a side note, using `with` to import large scopes is [discouraged by
official Nix
resources](https://nix.dev/guides/best-practices#with-scopes), so an
alternative approach to list installed packages could be something like
this:

```nix
packages =
  (builtins.attrValues {
    inherit (pkgs)
      # generic
      git
      git-lfs
      gnumake
      gnused
      gnutar
      gzip
      zip

      # frontend
      cairo
      pixman
      pkg-config

      # linting
      uv

      # backend
      gofumpt
      sqlite
      ;

    inherit
      # frontend
      nodejs
      pnpm

      # linting
      python3

      # backend
      go
      ;
  })
  ++ linuxOnlyInputs;
```

But I saw this as too pedantic to include in the initial PR.

Co-authored-by: 6543 <6543@obermui.de>
2025-11-04 16:28:59 +00:00
silverwind 850012bf5c
Update golangci-lint to v2.6.0 (#35801)
https://github.com/golangci/golangci-lint/releases/tag/v2.6.0

- `modernize` linter is enabled, this is the same as `gopls modernize`
- ~~`perfsprint` linter is disabled because it conflicts with
`modernize` (maybe there is a middle ground)~~
- gocritic `deprecatedComment` is disabled as it conflicts with
`go-swagger`
2025-11-04 03:03:06 +00:00
Zettat123 bb1f52347a
Add a doctor command to fix inconsistent run status (#35840)
#35783 fixes an actions rerun bug. Due to this bug, some runs may be
incorrectly marked as `StatusWaiting` even though all the jobs are in
done status. These runs cannot be run or cancelled. This PR adds a new
doctor command to fix the inconsistent run status.

```
gitea doctor check --run fix-actions-unfinished-run-status --fix
```

Thanks to @ChristopherHX  for the test.
2025-11-04 03:32:26 +01:00
Lunny Xiao de26c8acce
Fix viewed files number is not right if not all files loaded (#35821)
Fix #35803

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
2025-11-03 13:34:52 -08:00
Lunny Xiao d9c0f86de8
Fix incorrect pull request counter (#35819)
Fix #35781, #27472

The PR will not correct the wrong numbers automatically. 

There is a cron task `check_repo_stats` which will be run when Gitea
start or midnight. It will correct the numbers.
2025-11-03 20:52:13 +00:00
Lunny Xiao c6bd967966
Merge branch 'main' into lunny/project_workflow 2025-11-03 12:23:08 -08:00
silverwind 37208fef7e
Fix a number of `strictNullChecks`-related issues (#35795)
In preparation to work on enabling
https://www.typescriptlang.org/tsconfig/#strictNullChecks, I fixed all
the issues outside of `web_src` that came up when the option was
enabled. There was also one lint issue in web_src that apparently only
came up with the option enabled, so I fixed that as well.

`isTruthy` is introduced because Typescript has a bug regarding
`filter(Boolean)` which they are seemingly unwilling to fix.

---------

Signed-off-by: silverwind <me@silverwind.io>
2025-11-03 20:17:06 +00:00
techknowlogick aa7ec64a54
ignore .worktrees as a "special folder" (#35835)
following the approach from nixpkgs that ignore the .worktrees folder,
we could also do the same, this would allow worktrees to be worked on in
the same folder as the primary branch.

ref:
b6420c7bca
2025-11-03 20:57:30 +01:00
Lunny Xiao 17a6a2bab1
upgrade go mail to 0.7.2 and fix the bug (#35833)
patch from
https://github.com/wneessen/go-mail/issues/504#issuecomment-3477890515.
Thanks to @wneessen
2025-11-03 11:32:45 -08:00
TheFox0x7 685c8c314f
Add cache to container build (#35697)
add mount cache directives to container builds, which speeds up local
builds bypassing node and go package download entirely on second build
and caching go compilation.
drop job level split on regular/rootless, which allows to reuse the
previously made stage for rootless, skipping duplicate builds in CI.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-11-02 09:42:25 +00:00
Lunny Xiao 5cb453c01b
Revert gomail to v0.7.0 to fix sending mail failed (#35816)
Revert gomail to the last work version to fix #35794

There is a problem between go mail v0.7.1 to prevent sending email work.
https://github.com/wneessen/go-mail/compare/v0.7.0...v0.7.1
2025-11-02 09:07:32 +00:00
鲁汀 f2d7931b70
Fix circular spin animation direction (#35785)
Wait for the status icon to rotate clockwise instead of counterclockwise

before:
![GIF 2025-10-30
10-50-07](https://github.com/user-attachments/assets/3771b0bf-44e4-45a0-bde5-1b2b3dd8ba2a)

after:
![GIF 2025-10-30
10-50-43](https://github.com/user-attachments/assets/c45307fe-39a4-4e60-b48e-9d922c407565)

---------

Signed-off-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: lutinglt <lutinglt@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-02 08:30:13 +00:00
Lunny Xiao b3e5b96111
Fix clone mixed bug (#35810)
Fix #35807
2025-11-02 00:52:59 -07:00
GiteaBot 1dac4d13f3 [skip ci] Updated translations via Crowdin 2025-11-02 00:39:27 +00:00
Lunny Xiao 507c6de07e
Merge branch 'main' into lunny/project_workflow 2025-10-31 21:57:33 -07:00
Lunny Xiao b148bef471
Remove unnecessary function parameter (#35765) 2025-10-31 21:56:08 -07:00
Lunny Xiao 4c4a16ccb5 Merge branch 'main' into lunny/project_workflow 2025-10-31 21:32:51 -07:00
wxiaoguang de70cd3853
Fix cli "Before" handling (#35797)
Regression of #34973

Fix #35796
2025-10-31 18:12:03 +00:00
Mithilesh Gupta ef90befef1
Add test for ExtendCommentTreePathLength migration and fix bugs (#35791)
Co-authored-by: Mithilesh Gupta <guptamithilesh@protonmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-31 08:49:26 +08:00
silverwind c3472dd395
Fix file extension on gogs.png (#35793)
During https://github.com/go-gitea/gitea/issues/35790, it was noticed
that this PNG image had the wrong file extension. I also verified
`dingtalk.ico` and that one is actually an `.ico`.
2025-10-30 18:25:53 +01:00
silverwind 8b290b87e9
Improve and fix markup code preview rendering (#35777)
1. Add the color on the link to the referenced file, which is the more
likely thing the user wants to click
2. Use monospace font on the SHA
3. Tweak text colors
4. Change SHA link to go to the commit instead of the repo root with
commit filter set
5. Added the repo name to the file link text
6. Fix broken line numbering rendering
2025-10-30 05:15:42 +00:00
Zettat123 3ab8ae5807
Fix actions rerun bug (#35783)
Related issues: #35780, #35782 

Rerunning a job or a run is only allowed when the job is done and the
run is done.

Related PR: #34970
2025-10-30 01:08:59 +00:00
GiteaBot 73e229eb42 [skip ci] Updated translations via Crowdin 2025-10-30 00:37:08 +00:00
techknowlogick 98ff7d0773
add pnpm to Snapcraft (#35778) 2025-10-29 19:34:40 +01:00
Zettat123 8aa1179ce4
Fix actions schedule update issue (#35767)
Fix #34472

Add integration tests for actions schedule update.
2025-10-29 16:04:40 +00:00
bytedream 39c08ce4c1
Update tab title when navigating file tree (#35757)
Fix #35749.

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2025-10-29 13:38:09 +00:00
silverwind fe25997157
Enable `vue/require-typed-ref` eslint rule (#35764)
Enable https://eslint.vuejs.org/rules/require-typed-ref 
and fix discovered issues.
2025-10-29 17:42:06 +08:00
Lunny Xiao 984d4b0a3b
Fix lint 2025-10-28 12:15:59 -07:00
Lunny Xiao 0b41bfa135
Add valid when saving project workflow event 2025-10-28 11:52:37 -07:00
Lunny Xiao df50690df7 Merge branch 'main' into lunny/project_workflow 2025-10-28 11:41:39 -07:00
Lunny Xiao e21fb903e3
Fix migration 2025-10-28 11:41:34 -07:00
Lunny Xiao 95b18eb781
Remove unnecessary code and fix comments (#35761)
Follow #35459, #32562

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-28 18:03:57 +00:00
silverwind d69eede59b
Update JS dependencies (#35759)
- Update all JS dependencies
- Added new unicorn rules
- `updates` now also supports updating `packageManager` and `engines`,
and I see no reason not to do that, so I think we can try keeping these
updated as well. If something in the build breaks because of this, I
will revert and exclude `pnpm` from updating further, but as far as I
understand, only corepack respects this field and pnpm itself does not
care about it.
- Regenerate SVGs.
2025-10-28 17:32:11 +00:00
silverwind 91839ca01a
Move `codeformat` folder to tools (#35758)
Followup to https://github.com/go-gitea/gitea/pull/35734.

- Move `codeformat` folder to `tools`
- Add `tools` to `GO_DIRS`
- Move `misspellings.csv` to `assets` so we can lint the whole `tools`
directory without filter shenanigans.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-28 11:23:50 +00:00
wxiaoguang 6b5563c54a
Support selecting theme on the footer (#35741)
Fixes: https://github.com/go-gitea/gitea/pull/27576
2025-10-28 18:25:00 +08:00
Lunny Xiao b4ebf1b6d5
Fix lint 2025-10-27 11:15:07 -07:00
Lunny Xiao 3f9f725bd1
revert label component change 2025-10-27 10:22:44 -07:00
Lunny Xiao b840641fdc
revert label component change 2025-10-27 10:19:36 -07:00
Lunny Xiao b04d42b00f Merge branch 'main' into lunny/project_workflow 2025-10-27 09:30:40 -07:00
wxiaoguang cddff73bbd
Fix "ref-issue" handling in markup (#35739)
This is a follow up for #35662, and also fix #31181, help #30275, fix #31161
2025-10-27 22:45:07 +08:00
Lunny Xiao 418a7bb07e
Add tests for project workflow execution 2025-10-26 22:51:35 -07:00
GiteaBot 87d670c96b [skip ci] Updated translations via Crowdin 2025-10-27 00:39:11 +00:00