1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 16:44:26 +00:00
Commit Graph

18767 Commits

Author SHA1 Message Date
Lunny Xiao
9264811217
Remove translation to issue add time because the format is fixed should not be translated (#32850)
The input content should always be `1h 2m 3s` and will be the same on
different UI languages. So the translation is wrong.
2024-12-15 07:44:13 +00:00
wxiaoguang
d1c1e3cbcc
Fine tune ssh related comments and code (#32846)
Add more comments to explain the ssh problem, 
and rename `sshConn` to `sshSession`
2024-12-15 06:07:50 +00:00
silverwind
1cfb718976
Update golangci-lint to v1.62.2, fix issues (#32845)
Update it and fix new issues related to `redefines-builtin-id`
2024-12-15 02:31:07 +00:00
hiifong
7616aeb2ea
In some lfs server implementations, they require the ref attribute. (#32838)
Fix: #32611

In some lfs server implementations, they require the ref attribute.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-15 02:06:21 +00:00
mevius4
32059158da
Fix SSPI button visibility when SSPI is the only enabled method (#32841) 2024-12-15 09:41:36 +08:00
silverwind
1a07ebe549
Fix overflow on org header (#32837) 2024-12-14 06:50:12 +00:00
wxiaoguang
cc5ff98e0d
Refactor markdown math render (#32831)
Add more tests
2024-12-14 13:43:05 +08:00
hiifong
82c59d52ea
Add User-Agent for gitea's self-implemented lfs client. (#32832) 2024-12-14 03:35:19 +00:00
silverwind
bed563e574
Improve JSX/TSX support in code editor (#32833)
Two tweaks to Monaco to improve JSX/TSX support.

1. Certain language features like JSX/TSX only work when passing `uri`
(containing the filename), do this.
2. Set the `jsx` compiler option to avoid error annotations

Before:
<img width="441" alt="Screenshot 2024-12-13 at 15 11 33"
src="https://github.com/user-attachments/assets/dac245a7-e80f-4249-8e09-13124b03d12a"
/>

After:
<img width="441" alt="Screenshot 2024-12-13 at 15 10 46"
src="https://github.com/user-attachments/assets/726ad712-d116-438d-88da-bc40534b6860"
/>
2024-12-14 03:10:20 +00:00
Yarden Shoham
2ee4aa8998
Upgrade htmx to 2.0.4 (#32834)
Release notes:
https://github.com/bigskysoftware/htmx/releases/tag/v2.0.4

Tested `Star`, `Watch`, and the admin dashboard page. All functionality
remains unchanged.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2024-12-14 02:34:03 +00:00
Zettat123
7269130d28
Fix missing outputs for jobs with matrix (#32823)
Fix #32795

If a job uses a matrix, multiple `ActionRunJobs` may have the same
`JobID`. We need to merge the outputs of these jobs to make them
available to the jobs that need them.
2024-12-14 10:22:30 +08:00
wxiaoguang
a66c16dc1b
Allow to fork repository into the same owner (#32819)
This feature is experimental, not fully tested, and may be changed in
the future.

It is only designed for users who really need it: set
`[repository].ALLOW_FORK_INTO_SAME_OWNER=true` in your app.ini

Doc: https://gitea.com/gitea/docs/pulls/122


![image](https://github.com/user-attachments/assets/38d08c23-9cfc-49d8-9321-ff81edf65395)
2024-12-14 09:39:05 +08:00
wxiaoguang
5bc030efa2
Fix various UI bugs (#32821) 2024-12-13 01:45:32 -05:00
Lunny Xiao
887928e0a6
Add missing two sync feed for refs/pull (#32815)
Fowllow #32659
2024-12-13 04:22:39 +00:00
wxiaoguang
2910f384d5
Fix misuse of PublicKeyCallback (#32810)
Only upgrading the ssh package is not enough.
2024-12-13 03:57:37 +00:00
hiifong
30008fcfcf
Fix bug of branch/tag selector in the issue sidebar (#32744)
Fix: #32731

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-13 00:45:06 +00:00
hiifong
0b8a8941a0
Fix lfs migration (#32812)
Fix: #32803
2024-12-12 21:36:39 +00:00
Rowan Bohde
a03fdd9566
Avoid MacOS keychain dialog in integration tests (#32813)
Mac's git installation ships with a system wide config that configures
the credential helper `osxkeychain`, which will prompt the user with a
dialog.

```
$ git config list --system 
credential.helper=osxkeychain
```
By setting the environment variable
[`GIT_CONFIG_NOSYSTEM=true`](https://git-scm.com/docs/git-config#ENVIRONMENT),
Git will not load the system wide config, preventing the dialog from
populating.

Closes #26717
2024-12-12 21:10:47 +00:00
techknowlogick
ab6d819a89
Update actionlint.yaml 2024-12-12 15:45:27 -05:00
Lunny Xiao
6370d2fb93
Detect whether action view branch was deleted (#32764)
Fix #32761 

![图片](https://github.com/user-attachments/assets/a5a7eef8-0fea-4242-b199-1b0b73d9bbdb)
2024-12-12 19:28:23 +00:00
Chai-Shi
c9487a755b
Add "n commits" link to contributors in contributors graph page (#32799)
Fixes Issue #29365 and inherit PR #29429

- I should extend the #29429 fork but the fork is not synced, so I
created another PR.
- Use `silenced` class for the link, as in #29847

---------

Co-authored-by: Ben Chang <ben_chang@htc.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-12 19:02:54 +00:00
wxiaoguang
00e2b339b6
Fix "unicode escape" JS error (#32806)
<details>


![image](https://github.com/user-attachments/assets/98aef2fb-791e-4b4a-b2ac-e880f8a52040)


![image](https://github.com/user-attachments/assets/532673ae-c4cf-4d84-a5c6-93e6eacd341c)


![image](https://github.com/user-attachments/assets/2a241a3d-b7f6-44ca-89d9-9d68386fbf3e)


![image](https://github.com/user-attachments/assets/1251e43d-41f2-42d1-a23b-3182e3812c3d)

</details>

---------

Co-authored-by: silverwind <me@silverwind.io>
2024-12-12 18:37:44 +00:00
techknowlogick
566f5356db
use dedicated runners for release artifacts (#32811)
GH runners are having trouble, so switch the remaining release jobs to
use dedicated runners.
2024-12-12 12:02:59 -05:00
wxiaoguang
22bf2ca6ba
Make API "compare" accept commit IDs (#32801) 2024-12-12 08:10:09 +00:00
Kemal Zebari
01b1896bf5
Implement update branch API (#32433)
Resolves #22526.

Builds upon #23061.

---------

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-12 05:02:35 +00:00
wxiaoguang
1e751d81b3
Fix JS error when dropping a file to a editor without dropzone (#32804)
`dropzoneEl` may not exist
2024-12-12 12:37:25 +08:00
RiceChuan
dfd7594499
chore: use errors.New to replace fmt.Errorf with no parameters (#32800)
use errors.New to replace fmt.Errorf with no parameters

Signed-off-by: RiceChuan <lc582041246@gmail.com>
2024-12-12 12:26:11 +08:00
silverwind
ee45950dab
Switch to eslint-plugin-import-x (#32790)
Switch from deprecated `eslint-plugin-i` to
[`eslint-plugin-import-x`](https://github.com/un-ts/eslint-plugin-import-x).
2024-12-12 02:07:32 +00:00
wxiaoguang
17f0411441
Fix clone panel js error (#32798)
side effect of jquery removal, fix #32797
2024-12-12 02:01:20 +00:00
GiteaBot
1893b32670 [skip ci] Updated translations via Crowdin 2024-12-12 00:34:20 +00:00
yp05327
d43620e7bc
Add is_archived option for issue indexer (#32735)
Try to fix #32697

Reason:
`is_archived` is already defined in the query options, but it is not
implemented in the indexer.
2024-12-12 07:33:31 +08:00
Lunny Xiao
39a01016cd
Upgrade dependency crypto library (#32750) 2024-12-11 13:07:48 -05:00
Sebastian T. T.
874b8484aa
Add standard-compliant route to serve outdated R packages (#32783)
The R package repository currently does not have support for older
versions of packages which should be stored in a separate /Archive
router. This PR remedies that by adding a new path router.

I am a member of a group that loves using Gitea and this bug has been
annoying us for a long time. Hope it can be merged in time for Gitea
1.23.0.

Any feedback much appreciated.

Fixes #32782
2024-12-11 16:20:04 +00:00
wxiaoguang
4814f43af7
Fix repo home file list (#32788)
1. use grid instead of table, completely drop "ui table" from that list
2. move some "commit sign" related styles into a new file by the way (no
change) because I need to figure out where `#repo-files-table` is used.
3. move legacy "branch/tag selector" related code into repo-legacy.ts,
now there are 13 `import $` files left.
2024-12-11 23:54:42 +08:00
Blender Defender
18061af490
Rearrange Clone Panel (#31142)
Rearrange the clone panel to use less horizontal space.
The following changes have been made to achieve this:
- Moved everything into the dropdown menu
- Moved the HTTPS/SSH Switch to a separate line
- Moved the "Clone in VS Code"-Button up and added a divider
- Named the dropdown button "Code", added appropriate icon

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-11 21:54:30 +08:00
silverwind
8a53a39c42
Fix a number of typescript errors (#32773)
Fixes 96 typescript errors. Behaviour changes are commented below.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-11 09:29:04 +01:00
wxiaoguang
e619384098
Add label/author/assignee filters to the user/org home issue list (#32779)
Replace #26661, fix #25979

Not perfect, but usable and much better than before. Since it is quite
complex, I am not quite sure whether there would be any regression, if
any, I will fix in first time.

I have tested the related pages many times: issue list, milestone issue
list, project view, user issue list, org issue list.
2024-12-11 06:33:24 +00:00
GiteaBot
734ddf7118 [skip ci] Updated translations via Crowdin 2024-12-11 00:34:48 +00:00
Lunny Xiao
fbe6d9dc6b
Use batch database operations instead of one by one to optimze api pulls (#32680)
Resolve #31492

The response time for the Pull Requests API has improved significantly,
dropping from over `2000ms` to about `350ms` on my local machine. It's
about `6` times faster.

A key area for further optimization lies in batch-fetching data for
`apiPullRequest.ChangedFiles, apiPullRequest.Additions, and
apiPullRequest.Deletions`.

Tests `TestAPIViewPulls` does exist and new tests added.

- This PR also fixes some bugs in `GetDiff` functions.
- This PR also fixes data inconsistent in test data. For a pull request,
the head branch's reference should be equal to the reference in
`pull/xxx/head`.
2024-12-11 05:15:06 +08:00
yp05327
2ac6f2b129
Fix internal server error when updating labels without write permission (#32776)
Fix #32775

if permission denined, `prepareForReplaceOrAdd` will return nothing, and
this case is not handled.
2024-12-10 18:42:52 +00:00
wxiaoguang
8f271c6036
Fix wiki ui (#32781)
Fix #32774
2024-12-10 11:41:44 -05:00
silverwind
d061f6b70a
Change typescript module to nodenext (#32757)
Typescript 5.7 changed semantics around JSON imports and `nodenext` is
now [treated
differently](https://devblogs.microsoft.com/typescript/announcing-typescript-5-7-beta/#validated-json-imports-in---module-nodenext)
than `node16` for JSON imports and it requires the import attribute, so
change the value to that and add the attribute to eliminate this
typescript error.


[`moduleResolution`](https://www.typescriptlang.org/tsconfig/#moduleResolution)
is treated as an alias when `module` is `nodenext`, so we don't need to
specify it.

Also see https://github.com/microsoft/TypeScript/issues/60589. It
appears the next Typescript release will fix this for `node16`, but I
guess it'll still be good to switch to `nodenext`.
2024-12-10 08:44:39 +00:00
wxiaoguang
90d20be541
Refactor issue filter (labels, poster, assignee) (#32771)
Rewrite a lot of legacy strange code, remove duplicate code, remove
jquery, and make these filters reusable.

Let's forget the old code, new code affects: 

* issue list open/close switch
* issue list filter (label, author, assignee)
* milestone list open/close switch
* milestone issue list filter (label, author, assignee)
* project view (label, assignee)
2024-12-10 11:38:22 +08:00
wxiaoguang
1b069dc94a
Make RepoActionView.vue support ##[group] (#32770) 2024-12-10 01:57:20 +00:00
GiteaBot
43ca67eb8c [skip ci] Updated translations via Crowdin 2024-12-10 00:34:44 +00:00
silverwind
57a5e9acf8
Make Monaco theme follow browser, fully type codeeditor.ts (#32756)
1. Monaco's theme now follows changes in dark/light mode setting, this
works via
[`MediaQueryList`](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList)'s
[change
event](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/change_event).
2. Fully type the file, it now passes typescript strict mode.
2024-12-09 17:03:36 +00:00
wxiaoguang
5675efb3e0
Fix duplicate dropdown dividers (#32760)
Fix #27466

The problem is that any item in the menu could be hidden, pure CSS won't
work, and dropdown's builtin "hideDividers" doesn't work with our "scope
dividers". The newly introduced "archived" label makes the dividers
regression more.
2024-12-09 07:54:59 +00:00
yp05327
2d13eafd69
Remove unnecessary border in repo home page sidebar (#32767) 2024-12-09 15:30:16 +08:00
GiteaBot
145b583631 [skip ci] Updated licenses and gitignores 2024-12-09 00:35:40 +00:00
wxiaoguang
c986718965
Fix repo home row-right grow (#32763)
Fix #32753
2024-12-09 00:16:32 +08:00