1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-10 17:54:27 +00:00

18912 Commits

Author SHA1 Message Date
wxiaoguang
386c1ed908
Refactor HTMLFormat, update chroma render, fix js error (#33136)
A small refactor to improve HTMLFormat, to help to prevent low-level
mistakes.

And fix #33141, fix #33139
2025-01-08 03:44:32 +00:00
Lunny Xiao
67aeb1f896
Add missed transaction on setmerged (#33079)
Follow #33045. There are two updates on `Set Merged`, which should be in
one transaction.
This also introduced some refactors for changeissuestatus to make it
more clear.
2025-01-08 03:16:56 +00:00
Rowan Bohde
a8e7caedfa
add submodule diff links (#33097)
This adds links to submodules in diffs, similar to the existing link
when viewing a repo at a specific commit. It does this by expanding diff
parsing to recognize changes to submodules, and find the specific refs
that are added, deleted or changed.

Related #25888

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-08 01:38:30 +00:00
GiteaBot
ec84687df9 [skip ci] Updated translations via Crowdin 2025-01-08 00:32:07 +00:00
yp05327
32d45ee069
Update status check for all supported on.pull_request.types in Gitea (#33117)
Thanks @Zettat123
Follow #33116
Fix #33051

on.pull_request.types doc:

https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request

on.pull_request.types added in this PR:
```
assigned, unassigned, review_requested, review_request_removed, milestoned, demilestoned, labeled, unlabeled
```

unsupported types in Gitea:
```
// Unsupported activity types:
// converted_to_draft, ready_for_review, locked, unlocked, auto_merge_enabled, auto_merge_disabled, enqueued, dequeued
```

TODO:
- [x] add test
2025-01-08 01:58:47 +08:00
yp05327
0d7d2ed39d
Support the new exit code for git remote subcommands for git version >=2.30.0 (#33129)
Fix #32889

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-07 20:42:45 +08:00
wxiaoguang
34dfc25b83
Make git clone URL could use current signed-in user (#33091)
close #33086

* Add a special value for "SSH_USER" setting: `(DOER_USERNAME)`
* Improve parseRepositoryURL and add tests (now it doesn't have hard
dependency on some setting values)

Many changes are just adding "ctx" and "doer" argument to functions.

By the way, improve app.example.ini, remove all `%(key)s` syntax, it
only makes messy and no user really cares about it.

Document: https://gitea.com/gitea/docs/pulls/138
2025-01-07 13:17:44 +08:00
Lunny Xiao
98637fe76e
Filter reviews of one pull request in memory instead of database to reduce slow response because of lacking database index (#33106)
This PR fixes a performance problem when reviewing a pull request in a
big instance which have many records in the `review` table.
Traditionally, we should add more indexes in that table. But since
dismissed reviews of 1 pull request will not be too many as expected in
a common repository. Filtering reviews in the memory should be more
quick .

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-07 10:50:09 +08:00
GiteaBot
485d184a5c [skip ci] Updated translations via Crowdin 2025-01-07 00:32:09 +00:00
TheFox0x7
4a18c72262
Remove extended glob pattern from branch protection UI (#33125)
Underlying go library has no support for it

Fixes: https://github.com/go-gitea/gitea/issues/33121

---

I never touched frontend tests so pointers how to write them are
welcome.

This can be either fix or workaround, depending if this is something
gitea should support in the future or not. The golang side is unlikely
to get updates though.
2025-01-07 01:23:50 +02:00
Chai-Shi
1a95d9d6a1
fix empty repo updated time (#33120)
fixes #33119 

routers/web/repo/view_home.go

![image](https://github.com/user-attachments/assets/b0d6c5f5-7abc-478a-8d41-4b44dbd460aa)

Calling `updateContextRepoEmptyAndStatus` will always ask the DB to
update the updated Unix attributes.
When revisiting the repo's home page, the timestamp will be updated
unexpectedly, so I added the needsUpdate variable to check whether, in
the end, the commitment to db update is necessary if columns have not
changed at all.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-07 01:54:06 +08:00
wxiaoguang
80e4f4c4eb
Refactor package (routes and error handling, npm peer dependency) (#33111) 2025-01-06 22:45:20 +08:00
wxiaoguang
ef736b7e27
Refactor legacy JS (#33115) 2025-01-06 17:38:42 +08:00
wxiaoguang
40765b5d45
Fix repo empty guide (#33114) 2025-01-06 12:07:52 +08:00
GiteaBot
3c1c508421 [skip ci] Updated translations via Crowdin 2025-01-06 00:34:05 +00:00
wxiaoguang
cf60734a4d
Fix dropdown menu header and mobile view (#33108)
![image](https://github.com/user-attachments/assets/3f831c8c-ef87-4282-880a-c2738f3e1d17)

----

![image](https://github.com/user-attachments/assets/c4c0519b-cfa6-42b4-bd28-205ee514eb34)

----

![image](https://github.com/user-attachments/assets/8624a605-9f2b-4905-9cbc-0af073972874)
2025-01-05 21:20:22 +00:00
ChristopherHX
4237736029
workflow_dispatch use workflow from trigger branch (#33098)
* htmx updates the input form on branch switch
* add workflow warning to dispatch modal
* use name if description of input is empty
* show error if workflow_dispatch not available on branch

Closes #33073
Closes #33099

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-05 21:47:18 +08:00
GiteaBot
3078826d01 [skip ci] Updated translations via Crowdin 2025-01-05 00:35:35 +00:00
wxiaoguang
df9d1fe8c5
Trivial fixes (#33103)
1. remove `gock` dependency, it is not needed
2. fix a regression from org private profile readme
2025-01-04 22:25:50 +00:00
wxiaoguang
3d544a3ad3
Fix empty git repo handling logic (#33101)
Fix #33092
2025-01-04 18:47:24 +08:00
wxiaoguang
2b064b8637
Refactor legacy line-number and scroll code (#33094)
1. remove jquery
2. rewrite the "line number selection", fix various edge cases
3. fix the scroll
2025-01-04 10:56:07 +08:00
Kemal Zebari
188e0ee8e4
Use Project-URL metadata field to get a PyPI package's homepage URL (#33089)
Resolves #33085.
2025-01-03 21:09:47 +00:00
wxiaoguang
68972a9947
Clean up legacy form CSS styles (#33081) 2025-01-03 04:01:19 +00:00
GiteaBot
a739c784d9 [skip ci] Updated translations via Crowdin 2025-01-03 00:31:40 +00:00
metiftikci
83b7e12d4c
add myself to maintainers (#33088) 2025-01-02 18:00:26 -05:00
wxiaoguang
e709cc76da
Make Gitea always use its internal config, ignore /etc/gitconfig (#33076)
In history, Gitea could use the system config `/etc/gitconfig` because
some users said that "they might put certNonceSeed in it"

Actually, we shouldn't not use it, because it also causes conflicts
(there are already some fixes like #28848)

To make the system clear, I think it's worth to introduce the breaking
change: add `GIT_CONFIG_NOSYSTEM=1` to all git commands.


## ⚠️ BREAKING ⚠️

 For most users, nothing need to do.

If you have made changes to `/etc/gitconfig` to affect Gitea's behavior,
you need to move these config options to Gitea's internal git config
file, it is usually in Gitea's `{AppDataPath}/home/.git` directory.
2025-01-02 20:26:48 +00:00
wxiaoguang
9ac536a904
Fix "stop time tracking button" on navbar (#33084)
Fix #33083

By the way (something I was working on):

1. relax color/background-color for more markup elements
2. fix a command line sentence error
2025-01-03 04:01:05 +08:00
wxiaoguang
45973a100b
Fix bleve fuzziness search (#33078)
Close #31565
2025-01-03 00:32:02 +08:00
wxiaoguang
9882917bce
Try to fix ACME directory problem (#33072) 2025-01-02 04:38:27 +00:00
wxiaoguang
4f386e2c5e
Refactor env var related code (#33075)
And add more comments
2025-01-02 11:36:50 +08:00
GiteaBot
2852708fdf [skip ci] Updated translations via Crowdin 2025-01-02 00:31:55 +00:00
JonRB
233b7959e0
unset XDG_HOME_CONFIG as gitea manages configuration locations (#33067)
unset XDG_CONFIG_HOME early to enable gitea to manage git configuration.
simple error checking to satisfy the linting. Closes #33039

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-02 06:37:35 +08:00
wxiaoguang
c1167709ed
Refactor repo-new.ts (#33070)
1. merge `repo-template.ts` into `repo-new.ts` (they are all for "/repo/create")
2. remove jquery
3. fix an anonying fomantic dropdown bug, see the comment of `onResponseKeepSelectedItem`
2025-01-01 17:21:13 +00:00
wxiaoguang
85c756e279
Refactor pull-request compare&create page (#33071)
The old code is unnecessarily complex.
2025-01-02 01:16:09 +08:00
lonix1
d030cace1a
feat: link to nuget dependencies (#26554)
Add links to dependencies and their versions, as done in nuget site.
Makes it easier to use.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-01 19:07:10 +08:00
wxiaoguang
2564c15cb0
Remove some unnecessary template helpers (#33069)
DisableGitHooks and DisableImportLocal are only used when editing a
user, so only set them in `editUserCommon`
2025-01-01 18:02:34 +08:00
Steffen Schröter
57eb9d0b64
Inherit submodules from template repository content (#16237)
Fix #10316

---------

Signed-off-by: Steffen Schröter <steffen@vexar.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-01 02:55:13 +00:00
GiteaBot
92a2900a2d [skip ci] Updated translations via Crowdin 2025-01-01 00:35:43 +00:00
Bo-Yi Wu
6c89de494a
feat(action): issue change title notifications (#33050)
- Add `IssueChangeTitle` method to handle issue title changes
- Add `notifyIssueChangeWithTitleOrContent` method to generalize
notification handling for issue title or content changes

action file as below:

```yaml
name: Semantic Pull Request

on:
  pull_request_target:
    types: [edited]
```

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-31 12:08:36 +00:00
Lunny Xiao
20c7fba601
Use project's redirect url instead of composing url (#33058)
Fix #32992

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-31 19:19:53 +08:00
wxiaoguang
a0853e2278
Fix unittest and repo create bug (#33061)
1. `StatDir` was not right, fix the FIXME
2. Clarify the test cases for `IsUsableRepoName`
3. Fix regression bug in `repo-new.ts`

Fix #33060
2024-12-31 18:45:05 +08:00
wxiaoguang
58c092cfea
Fix locale type (#33059)
Follow #32872
2024-12-31 06:37:37 +00:00
wxiaoguang
e5c576e92b
Refactor maven package registry (#33049)
Close #33036
2024-12-31 05:30:52 +00:00
Kerwin Bryant
54bd220520
Optimize the installation page (#32994)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-31 04:49:26 +00:00
Chai-Shi
0387195abb
[Feature] Private README.md for organization (#32872)
Implemented #29503

---------

Co-authored-by: Ben Chang <ben_chang@htc.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-31 04:22:09 +00:00
wxiaoguang
c09656e0e0
Make issue suggestion work for new PR page (#33035)
Fix #33026
2024-12-31 03:50:55 +00:00
hiifong
4a254856b3
Add IntelliJ Gateway's .uuid to gitignore (#33052) 2024-12-30 21:42:29 -05:00
Lunny Xiao
a54cc05d2a
Fix issue comment number (#30556) 2024-12-30 14:35:46 -08:00
hiifong
a87168869a
Fix duplicate co-author in squashed merge commit messages (#33020)
Fix: #31980

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-30 19:03:21 +00:00
Lunny Xiao
fe32ffe181
Merge updatecommentattachment functions (#33044)
Extract from #32178
2024-12-30 18:21:57 +00:00