Commit Graph

19003 Commits

Author SHA1 Message Date
Lunny Xiao
3e7ec826d3
Add missed auto merge feed message on dashboard (#33309)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
cron-licenses / cron-licenses (push) Has been skipped
2025-01-26 18:33:05 +00:00
silverwind
9875f9b9b8
Clone button enhancements (#33362)
- Add box-shadow to default tippy theme
- Make colors for tabs match the ones from `.ui.tabular.menu`
- Remove tippy arrow and slightly offset tooltip closer to the button
- Fix setting of `aria-haspopup` when default role is used with tippy

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-27 02:07:29 +08:00
wxiaoguang
e663c4a7f0
Fix issue suggestion bug (#33389)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Fix #33388
2025-01-26 13:13:32 +00:00
GiteaBot
2cc65e356e [skip ci] Updated translations via Crowdin 2025-01-26 00:32:05 +00:00
silverwind
078ef6db89
Update tool dependencies (#33392)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
Update all tool dependencies to latest versions.
2025-01-25 20:14:09 +00:00
wxiaoguang
2c1ff8701a
Refactor context flash msg and global variables (#33375)
1. add `GetSiteCookieFlashMessage` to help to parse flash message
2. clarify `handleRepoHomeFeed` logic
3. remove unnecessary global variables, use `sync.OnceValue` instead
4. add some tests for `IsUsableUsername` and `IsUsableRepoName`
2025-01-25 14:36:47 +00:00
wxiaoguang
6a516a0d14
Do not show unnecessary commit sign lock icon (#33387)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Fix #33385
2025-01-25 19:32:35 +08:00
wxiaoguang
7da8a01d39
Fix js error when edit issue (#33384)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
2025-01-25 09:37:25 +08:00
wxiaoguang
06ff9b6256
Do not access GitRepo when a repo is being created (#33380)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
2025-01-24 18:27:36 +00:00
silverwind
642e8c1122
Repo homepage styling tweaks (#33289)
Reduce it to a value that results in `.repo-home-sidebar-top` and
`.repo-home-sidebar-bottom` having 240px content width, the same as
GitHub.

Before:
<img width="1333" alt="Screenshot 2025-01-15 at 18 28 34"
src="https://github.com/user-attachments/assets/cf0fa21b-87be-40e3-a6cd-26d146bce9cc"
/>

After:
<img width="1330" alt="Screenshot 2025-01-15 at 18 28 27"
src="https://github.com/user-attachments/assets/28acd837-10f4-4176-b8a0-510cd28c8b8d"
/>
2025-01-24 17:35:28 +00:00
Typed SIGTERM
9e028d8d57
Fix comment header padding (#33377) 2025-01-25 01:09:57 +08:00
GiteaBot
3e1b63f75b [skip ci] Updated translations via Crowdin 2025-01-24 00:31:03 +00:00
Lunny Xiao
e94f37f95e
Refactor webhook events (#33337)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
Extract from #33320

This PR uses a map instead of a struct to store webhook event
information. It removes many duplicated functions and makes the logic
clearer.
2025-01-23 18:53:06 +00:00
yp05327
594b8350b1
Add missing POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES in app.example.ini (#33363)
Ref:
https://docs.gitea.com/next/administration/config-cheat-sheet?_highlight=populate_squash_comment_with_commit_messages#repository---pull-request-repositorypull-request
2025-01-23 18:26:39 +00:00
GiteaBot
340d9ec42d [skip ci] Updated translations via Crowdin 2025-01-23 00:31:02 +00:00
yp05327
a0b3d9add0
Support disable passkey auth (#33348)
Fix #33314

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-22 22:58:36 +00:00
silverwind
d64c849d16
Update JS dependencies (#33359)
Fixes: https://github.com/go-gitea/gitea/security/dependabot/88
Fixes: https://github.com/go-gitea/gitea/security/dependabot/87

Tested Katex, works as expected.
2025-01-22 23:33:02 +01:00
silverwind
c7f4ca2653
Enable Typescript noImplicitAny (#33322)
Some checks failed
cron-translations / crowdin-pull (push) Has been skipped
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
Enable `noImplicitAny` and fix all issues.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-22 15:11:51 +08:00
wxiaoguang
6fe4d1c038
Remove duplicate "ResponseWriter.Status" method (#33346) 2025-01-22 06:37:52 +00:00
silverwind
abe743df79
Fix code button alignment (#33345)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Fixes: https://github.com/go-gitea/gitea/issues/33344

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-22 02:24:27 +00:00
GiteaBot
3682231f17 [skip ci] Updated translations via Crowdin 2025-01-22 00:31:50 +00:00
wxiaoguang
7069369e03
Support performance trace (#32973)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
1. Add a OpenTelemetry-like shim-layer to collect traces
2. Add a simple builtin trace collector and exporter, end users could
download the diagnosis report to get the traces.

This PR's design is quite lightweight, no hard-dependency, and it is
easy to improve or remove. We can try it on gitea.com first to see
whether it works well, and fine tune the details.

---------

Co-authored-by: silverwind <me@silverwind.io>
2025-01-21 18:57:07 +00:00
wxiaoguang
2cb3946496
Make issue suggestion work for all editors (#33340)
And do not handle special keys when the text-expander popup exists
2025-01-21 19:33:45 +08:00
wxiaoguang
46d1e91aed
Fix issue count (#33338)
Fix #33336
2025-01-21 18:53:44 +08:00
GiteaBot
2e42e96ce2 [skip ci] Updated translations via Crowdin 2025-01-21 00:31:12 +00:00
wxiaoguang
6cc1067884
Fix incorrect ref commit ID usage (#33331)
Some checks failed
cron-translations / crowdin-pull (push) Has been skipped
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
After the RefName refactoring, the `ctx.Repo.CommitID` is only set when
there is a `RepoRefByType` middleware.

Many handlers do not use that middleware and they only use "default
branch"
2025-01-20 07:43:49 +00:00
wxiaoguang
39de2955fd
Improve sync fork behavior (#33319)
Fix #33271

Suppose there is a `branch-a` in fork repo:

1. if `branch-a` exists in base repo: try to sync `base:branch-a` to `fork:branch-a`
2. if `branch-a` doesn't exist in base repo: try to sync `base:main` to `fork:branch-a`
2025-01-20 15:17:47 +08:00
wxiaoguang
6073e2f1bb
Refactor response writer & access logger (#33323)
And add comments & tests
2025-01-20 06:25:17 +00:00
GiteaBot
13dbd260b7 [skip ci] Updated licenses and gitignores 2025-01-20 00:31:52 +00:00
Michael Vetter
076d122f34
Fix typo in documentation of GetBranchNames() (#33330) 2025-01-19 18:41:15 -05:00
CrimsonEdgeHope
1928918c35
Fix Account linking page (#33325)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
cron-licenses / cron-licenses (push) Has been skipped
Fix password form missing whilst linking account even with
`ENABLE_PASSWORD_SIGNIN_FORM = true`.

Remove redundant empty box in account linking sign up page when
`LinkAccountMode` is true.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-19 20:37:22 +08:00
hiifong
b7614e2d2f
Fix parentCommit invalid memory address or nil pointer dereference. (#33204)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
When the parent Commit does not exist on gitea, an error will be
reported when opening the Commit details page: invalid memory address or
nil pointer dereference.

![image](https://github.com/user-attachments/assets/4c2a9802-935f-41e9-b5b9-a4f0d745f709)

![image](https://github.com/user-attachments/assets/7b0bc15e-7f5f-4d58-8d24-fee667a799fa)
2025-01-19 02:51:43 +00:00
Vladimir Sysoev
dc2308a959
Make tracked time representation display as hours (#33315)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Estimated time represented in hours it might be convenient to
have tracked time represented in the same way to be compared and
managed.

---------

Co-authored-by: Sysoev, Vladimir <i@vsysoev.ru>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-19 09:30:44 +08:00
GiteaBot
f250ee6360 [skip ci] Updated translations via Crowdin 2025-01-19 00:33:43 +00:00
GiteaBot
fffc8550ab [skip ci] Updated translations via Crowdin 2025-01-18 00:30:24 +00:00
Chai-Shi
55e0756c68
Fix push message behavior (#33215)
Fixes #32769 by the logic from pr #33192

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-17 19:37:17 +00:00
6543
1342d48433
Add golang back to nix dev environment and pin v1.23 (#33275) 2025-01-17 12:25:33 -05:00
wxiaoguang
3b839f8dc0
Trivial fixes (#33304)
Some checks failed
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been skipped
1. the error check was added for go-git, it was caused by the empty `.keep` file in the test fixtures.
2. use `PostFormValue` instead of `PostForm.Get` (`Get` needs to parse the form ahead)
3. fix incorrect container text (it should show "Images" in the header but not "OS/Arch")
4. align maven xml
5. fix closed PR color&icon
2025-01-17 08:55:02 +00:00
GiteaBot
7582eb0419 [skip ci] Updated translations via Crowdin 2025-01-17 00:31:11 +00:00
wxiaoguang
cfc6e21f06
Fix incorrect ref usages (#33301)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
Fix #33297

By the way, improve some locales
2025-01-16 13:52:21 +00:00
silverwind
ab347fd0f7
Update JS and PY dependencies (#33249)
- Update all JS and PY dependencies
- Tested affected dependencies
- Disabled `async-preventdefault` lint rule because it brought up new
false-positives.
2025-01-16 09:56:41 +00:00
Kemal Zebari
2483a93fbc
Only allow admins to rename default/protected branches (#33276)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Currently, anyone with write permissions to a repo are able to rename
default or protected branches.

This change follows
[GitHub's](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch)
design by only allowing repo/site admins to change these branches.
However, it also follows are current design for protected branches and
only allows admins to modify branch names == branch protection rule
names. Glob-based rules cannot be renamed by anyone (as was already the
case, but we now catch `ErrBranchIsProtected` which we previously did
not catch, throwing a 500).
2025-01-15 20:51:49 +00:00
silverwind
4b21a6c792
Enable Typescript noImplicitThis (#33250)
- Enable https://www.typescriptlang.org/tsconfig/#noImplicitThis
- Wrap Vue Template-Syntax SFCs in
[`defineComponent`](https://vuejs.org/api/general#definecomponent) which
makes type inference and linter work better
- Move `createApp` calls outside the SFCs into separate files
- Use [`PropType`](https://vuejs.org/api/utility-types#proptype-t) where
appropriate
- Some top-level component properties changed order as dictated by the
linter
- Fix all tsc and lint issues that popped up during these refactors
2025-01-16 04:26:17 +08:00
wxiaoguang
b15d01b0ce
Prepare for support performance trace (#33286)
For #32973
2025-01-15 20:05:18 +00:00
wxiaoguang
6659a381ea
Fix closed dependency title (#33285)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
Fix #33283
2025-01-15 23:38:03 +08:00
Zettat123
d0962ce3da
Move some Actions related functions from routers to services (#33280)
Move the main logic of `generateTaskContext` and `findTaskNeeds` to the
`services` layer.

This is a part of #32751, since we need the git context and `needs` to
parse the concurrency expressions.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-15 21:34:30 +08:00
wxiaoguang
f6dbf0e7b3
Fix incorrect TagName/BranchName usages (#33279)
Add add a new test
2025-01-15 17:34:55 +08:00
wxiaoguang
fcd096231a
Simplify context ref name (#33267)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
2025-01-15 11:15:47 +08:00
GiteaBot
cbf933eb4e [skip ci] Updated translations via Crowdin 2025-01-15 00:31:44 +00:00
wxiaoguang
4d399e717d
Fix some broken route handlers (#33268)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Some mistakes introduced by recent refactoring PRs (some sidebar
dropdowns doesn't work)
2025-01-14 19:03:02 +00:00