Commit Graph

19028 Commits (main)
 

Author SHA1 Message Date
silverwind 05e9063013
Update `@github/text-expander-element`, adapt type imports (#33449)
Followup to https://github.com/go-gitea/gitea/pull/33435, upstream issue
is fixed so the imports are clean now.
6 hours ago
wxiaoguang 5a7b42dac7
Support choose email when creating a commit via web UI (more) (#33445)
Follow #33432
7 hours ago
wxiaoguang b57d9f41d4
Fix issue sidebar dropdown keyboard support (#33447)
Just a quick fix, fix #33444
10 hours ago
wxiaoguang f24d73ab5f
Fix "redirect link" handling (#33440)
`a%2fb` should not redirect to `a/b`

---------

Co-authored-by: delvh <dev.lh@web.de>
13 hours ago
Lunny Xiao f88dbf86b3
Refactor repository transfer (#33211)
- Both have `RejectTransfer` and `CancelTransfer` because the permission
checks are not the same. `CancelTransfer` can be done by the doer or
those who have admin permission to access this repository.
`RejectTransfer` can be done by the receiver user if it's an individual
or those who can create repositories if it's an organization.

- Some tests are wrong, this PR corrects them.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 day ago
silverwind 48183d2b05
Enable two more strict options in tsconfig (#33438)
These have no violations so are safe to enable

- https://www.typescriptlang.org/tsconfig/#strictBindCallApply
- https://www.typescriptlang.org/tsconfig/#strictBuiltinIteratorReturn
1 day ago
Lunny Xiao 75940a0191
Add tests for webhook and fix some webhook bugs (#33396)
This PR created a mock webhook server in the tests and added integration
tests for generic webhooks.
It also fixes bugs in package webhooks and pull request comment
webhooks.
1 day ago
wxiaoguang 256b94e9e9
Support choose email when creating a commit via web UI (#33432)
Initial PR for #24469
1 day ago
Rowan Bohde ac2d97cb61
Link to tree views of submodules if possible (#33424)
This is a follow-up to https://github.com/go-gitea/gitea/pull/33097. 

When linking a submodule at a commit in either the repo view, or a diff
when adding a new submodule, link to the tree view of that submodules
intead of the individual commit. This shows the user the full tree,
instead of the diff of the commit.

This makes the assumption that the tree for a given SHA is at
`<repo_url>/tree/<sha>`. This URL format is supported by both Github &
Gitlab, but not Gitea. To fix this, add a redirect from
`<username>/<repo>/tree/<ref>` to `<username>/<repo>/src/<ref>`, so that
Gitea can support this URL structure.
1 day ago
silverwind dc7ddaee2a
Update `@github/text-expander-element` to 2.9.0 (#33435)
Update and use their newly exported types. Tested, works.

The import path is a bit suboptimal, to be fixed once
https://github.com/github/text-expander-element/pull/75 is merged and
released.

Co-authored-by: Giteabot <teabot@gitea.io>
1 day ago
wxiaoguang 4ffc54f59a
Refactor user & avatar (#33433)
1. better GetPossibleUserByID logic
2. fix some function name & comment typos
3. do not re-generate avatar if one exists
1 day ago
GiteaBot a89c735303 [skip ci] Updated translations via Crowdin 2 days ago
wxiaoguang 8c4f0f02ef
Refactor user package (#33423)
and avoid global variables
2 days ago
Zettat123 a9577e0808
Fix `GetCommitBranchStart` bug (#33298)
Fix #33265
Fix #33370

This PR also fixes some bugs in `TestGitGeneral`.
3 days ago
silverwind 8f433132e1
Update stylelint config (#33419)
- Inherit stylelint config from
[`stylelint-config-recommended`](https://github.com/stylelint/stylelint-config-recommended),
removed all stylelint core rule options that were either already in
their config or disabled.
- `no-descending-specificity` diverges from their config, seems to much
work currently.
- Tweaked a few rules.
- Added
[`stylelint-define-config`](https://github.com/stylelint-types/stylelint-define-config)
so that typescript can validate the config.
3 days ago
GiteaBot 121e4c9624 [skip ci] Updated translations via Crowdin 3 days ago
silverwind 8cd10f7f3b
Updates for poetry 2.0 (#33415)
- Remove removed
[`no-setuptools`](https://github.com/python-poetry/poetry/pull/9331)
option, it's the default now
- Ran `make update-py` under poetry 2.0.1 which updated the lockfile

Also see https://github.com/python-poetry/poetry/releases/tag/2.0.0
3 days ago
wxiaoguang 182e3896bf
Fix flex width (#33414)
Fix #33409
4 days ago
Lunny Xiao 77d14fb6d3
Fix system admin cannot fork or get private fork with API (#33401)
Fix #33368
4 days ago
Lunny Xiao dcd3014567
Add pubdate for repository rss and add some tests (#33411)
Fix #33291
4 days ago
TheFox0x7 6ca91f555a
User facing messages for AGit errors (#33012)
Adds user facing messages to errors when submitting agit pull request
Tries to highlight the returned error more and fixes agit suggestion to
create PR on first submission.

Closes: https://github.com/go-gitea/gitea/issues/32965

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
4 days ago
Wesley van Tilburg c79adf00b8
Add basic auth support to rss/atom feeds (#33371)
Allows RSS readers to access private feeds using their basic auth
capabilities. Not all clients feature the ability to add cookies or
headers.

fixes #32458 

Tested with miniflux

no credentials:

![image](https://github.com/user-attachments/assets/8c3369f2-1cf6-4ce3-ac6e-84447e454928)


basic auth entered:

![image](https://github.com/user-attachments/assets/c93ff22c-1429-4a80-898f-91d9f35c7c61)

![image](https://github.com/user-attachments/assets/60d83afd-9dde-4973-a440-ff8138799e87)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
4 days ago
hiifong 26b51aa032
Optimize makefile help information generation (#33390)
Get help information from the target's comments.

![image](https://github.com/user-attachments/assets/ee259545-99b7-4163-a8da-011159f8301b)
4 days ago
wxiaoguang 517a367abe
Use ProtonMail/go-crypto to replace keybase/go-crypto (#33402)
Fix #33400

The keybase/go-crypto is no longer maintained and it generates malformed
signatures, ProtonMail/go-crypto is the actively maintained fork.
4 days ago
GiteaBot fae69bc6d4 [skip ci] Updated translations via Crowdin 4 days ago
Lunny Xiao 3e7ec826d3
Add missed auto merge feed message on dashboard (#33309) 5 days ago
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>
5 days ago
wxiaoguang e663c4a7f0
Fix issue suggestion bug (#33389)
Fix #33388
5 days ago
GiteaBot 2cc65e356e [skip ci] Updated translations via Crowdin 5 days ago
silverwind 078ef6db89
Update tool dependencies (#33392)
Update all tool dependencies to latest versions.
6 days ago
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`
6 days ago
wxiaoguang 6a516a0d14
Do not show unnecessary commit sign lock icon (#33387)
Fix #33385
6 days ago
wxiaoguang 7da8a01d39
Fix js error when edit issue (#33384) 6 days ago
wxiaoguang 06ff9b6256
Do not access GitRepo when a repo is being created (#33380) 7 days ago
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"
/>
7 days ago
Typed SIGTERM 9e028d8d57
Fix comment header padding (#33377) 7 days ago
GiteaBot 3e1b63f75b [skip ci] Updated translations via Crowdin 1 week ago
Lunny Xiao e94f37f95e
Refactor webhook events (#33337)
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.
1 week ago
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
1 week ago
GiteaBot 340d9ec42d [skip ci] Updated translations via Crowdin 1 week ago
yp05327 a0b3d9add0
Support disable passkey auth (#33348)
Fix #33314

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 week ago
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.
1 week ago
silverwind c7f4ca2653
Enable Typescript `noImplicitAny` (#33322)
Enable `noImplicitAny` and fix all issues.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 week ago
wxiaoguang 6fe4d1c038
Remove duplicate "ResponseWriter.Status" method (#33346) 1 week ago
silverwind abe743df79
Fix code button alignment (#33345)
Fixes: https://github.com/go-gitea/gitea/issues/33344

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 week ago
GiteaBot 3682231f17 [skip ci] Updated translations via Crowdin 1 week ago
wxiaoguang 7069369e03
Support performance trace (#32973)
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>
1 week ago
wxiaoguang 2cb3946496
Make issue suggestion work for all editors (#33340)
And do not handle special keys when the text-expander popup exists
1 week ago
wxiaoguang 46d1e91aed
Fix issue count (#33338)
Fix #33336
1 week ago
GiteaBot 2e42e96ce2 [skip ci] Updated translations via Crowdin 1 week ago