Commit Graph

18851 Commits

Author SHA1 Message Date
0ed160ffea Refactor tests ()
1. fix incorrect tests, for example: BeanExists doesn't do assert and
shouldn't be used
2. remove unnecessary test functions
3. introduce DumpQueryResult to help to see the database rows during
test (at least I need it)

```
====== DumpQueryResult: SELECT * FROM action_runner_token ======
- # row[0]
  id: 1
  token: xeiWBL5kuTYxGPynHCqQdoeYmJAeG3IzGXCYTrDX
  owner_id: 0
...
```
2024-12-29 01:05:56 +00:00
e95b946f6d [skip ci] Updated translations via Crowdin 2024-12-29 00:36:47 +00:00
64bebc9402 always show assignees on right ()
### Before

![old_issue_list](https://github.com/user-attachments/assets/c7a6631d-9330-4e29-9e01-c1bcb2a0387f)

### After

![new_issue_list](https://github.com/user-attachments/assets/5a13c413-b58e-40bb-888b-9edfe3c94e0c)
2024-12-29 00:30:06 +00:00
94048f3035 fix toggle commit body button ui when latest commit message is long ()
#### Before


![before](https://github.com/user-attachments/assets/fe36bdb3-10e8-4fe7-9106-0897f49bedb3)

#### After


![after](https://github.com/user-attachments/assets/745bd164-5f25-41ca-b340-36cb695551db)


## Edit:

I found an issue on mobile view and changed the code as using flex gap


![small](https://github.com/user-attachments/assets/dd7c2093-6860-4800-a2bc-676a03e764c8)


![large](https://github.com/user-attachments/assets/5c933779-8281-4d48-9fd0-4d7b245bf4ac)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-29 08:04:56 +08:00
a92f5057ae Fix and/or comment some legacy CSS problems () 2024-12-28 11:51:38 +00:00
3d3ece36d2 Refactor comment history and fix content edit ()
And fix a regression bug for comment content editing.

Now 11 "import jquery" files left
2024-12-28 19:26:16 +08:00
e69da2cd07 Fix bug on activities ()
A repository with no issue will display a random number on activities
page. This is caused by wrong usage of `And` and `Or`.

![9cdbbf81d50aa5d9bd16604e0dab5eb0](https://github.com/user-attachments/assets/828cebdc-bd35-4716-a58c-c1b43ddf8bf0)
2024-12-28 04:04:07 +00:00
e435b1900a Refactor arch route handlers () 2024-12-28 03:31:46 +00:00
254314be5f fix scoped label ui when contains emoji ()
### Before

![old_label](https://github.com/user-attachments/assets/2211f711-613a-4ed4-90fd-8ff6ab0700f5)

### After

![new_label](https://github.com/user-attachments/assets/ecbc89da-7f77-44d0-8ce9-ba51b67421e5)
2024-12-28 00:58:19 +00:00
14ed553fae [skip ci] Updated translations via Crowdin 2024-12-28 00:30:57 +00:00
079a1ffe8f De-emphasize signed commits ()
The new code structure is easier to make more improvements or
refactor, for example: change the colors to de-emphasize more, or design
some new layouts.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-28 04:18:30 +08:00
ea198f9ea8 Fix eslint ()
Fix  
Related 

* eslint-plugin-github 5.1.x doesn't work well with eslint8
* no-undef is still needed
2024-12-27 19:34:39 +00:00
a7b2707be9 Fix Agit pull request permission check ()
user with read permission should also can create agit flow pull request.
looks this logic was broken in
https://github.com/go-gitea/gitea/pull/31033 this pull request try fix
it and add test code.

---------

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-27 18:17:01 +00:00
2d1a171dc7 Support for email addresses containing uppercase characters when activating user account ()
Fix 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-27 19:16:23 +08:00
3c00e89129 [skip ci] Updated translations via Crowdin 2024-12-27 00:32:06 +00:00
df98452c0d Improve Actions test ()
This PR adds a mock runner to test more actions features.
2024-12-26 22:10:30 +00:00
44b4fb21a4 Support org labels when adding labels by label names ()
Fix 
2024-12-26 19:14:49 +00:00
7bb7ba1b5b Add show more organizations icon in user's profile ()
Close 

# ⚠️ Doc update is required


![image](https://github.com/user-attachments/assets/296c5109-8fc1-43ea-b7dc-e79919cc1f9a)

![image](https://github.com/user-attachments/assets/d30980f6-22e4-4b97-9143-c750dc399da6)


------
⚠️This PR refuses to be cherry-picked by any forked projects without any
mentions.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-27 02:49:50 +08:00
550abdbc24 Improve "ellipsis string" () 2024-12-26 14:19:35 +08:00
9bfa9f450d Refactor "string truncate" () 2024-12-26 11:56:03 +08:00
594edad213 Do not render truncated links in markdown ()
Fixes 
2024-12-26 00:33:55 +08:00
5feb1a6bff Use CloseIssue and ReopenIssue instead of ChangeStatus ()
The behaviors of closing issues and reopening issues are very different.
So splitting it into two different functions makes it easier to
maintain.

- [x] Split ChangeIssueStatus into CloseIssue and ReopenIssue both at
the service layer and model layer
- [x] Rename `isClosed` to `CloseOrReopen` to make it more readable.
- [x] Add transactions for ReopenIssue and CloseIssue

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
2024-12-25 07:38:30 +00:00
f44712f22b demilestone should not include milestone ()
Fix 
2024-12-25 05:52:46 +00:00
1a7591d7f9 fix textarea newline handle ()
- Fix cursor position if input newline on middle of lines
- ~Increment number if numbered list~


![image](https://github.com/user-attachments/assets/bcfe2625-11a8-4ea4-9a71-b7ecfe81b2e0)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-25 13:03:43 +08:00
abaeae0b9c Fix Azure blob object Seek ()
This bug was found in a
[test](https://github.com/go-gitea/gitea/actions/runs/12464294025/job/34788152194?pr=32883#step:9:105)
of 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-25 04:54:52 +00:00
973363fec3 Fix maven pom inheritance ()
Fix  
2024-12-25 04:28:37 +00:00
ca31d478ee Refactor arch route handlers () 2024-12-25 04:03:14 +00:00
65e45fdcfd [skip ci] Updated translations via Crowdin 2024-12-25 00:31:17 +00:00
b7260400f8 Refactor tmpl and blob_excerpt ()
1. do not use `{{/* */}}` to remove spaces, use `{{- -}}`
2. fix "blob_excerpt" endpoint, remove the legacy fragile code: have
tested commit diff and wiki diff
2024-12-25 00:51:13 +08:00
2a828e2798 Clarify path param naming ()
In history (from some legacy frameworks), both `:name` and `name` are
supported as path path name, `:name` is an alias to `name`.

To make code consistent, now we should only use `name` but not `:name`.

Also added panic check in related functions to make sure the name won't
be abused in case some downstreams still use them.
2024-12-24 13:47:45 +00:00
b8b690feb9 Refactor getpatch/getdiff functions and remove unnecessary fallback ()
Extract from  

`git diff a..b` is equal to `git diff a b` which is different from `git
diff a...b`. For pull request, we should always 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-24 14:29:34 +08:00
6d5aa9218e Refactor request context ()
Introduce RequestContext: is a short-lived context that is used to store
request-specific data.

RequestContext could be used to clean form tmp files, close context git
repo, and do some tracing in the future.

Then a lot of legacy code could be removed or improved. For example:
most `ctx.Repo.GitRepo.Close()` could be removed because the git repo
could be closed when the request is done.
2024-12-24 11:43:57 +08:00
781c6df40f Add sub issue list support ()
Just like GitHub, show issue icon/title when the issue number is in a list
2024-12-24 01:54:19 +00:00
02c64e48b7 [skip ci] Updated translations via Crowdin 2024-12-24 00:31:53 +00:00
7553ae1a57 Use env GITEA_RUNNER_REGISTRATION_TOKEN as global runner token ()
Fix 

When Gitea starts, it reads GITEA_RUNNER_REGISTRATION_TOKEN
or GITEA_RUNNER_REGISTRATION_TOKEN_FILE to add registration token.
2024-12-23 09:59:16 +00:00
bd5d1341d4 Fix commit range paging () 2024-12-23 07:07:12 +00:00
89f31f79fd Fix outdated tmpl code ()
Some PRs were before tmpl ctx refactoring and used outdated code
2024-12-23 11:21:11 +08:00
462ce31530 Fix repo avatar conflict ()
Continue even if the avatar deleting fails
2024-12-23 02:52:25 +00:00
b5f9a2d7c0 [skip ci] Updated licenses and gitignores 2024-12-23 00:32:58 +00:00
fb75151fb1 fix trailing comma not matched in the case of alphanumeric issue ()
Fix .

Patch the regex to match `,`besides `.` `"` `'` `:` and space.
2024-12-22 21:32:28 +00:00
6279646ee4 Add auto-expanding running actions step ()
Auto-expands the currently running action step.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-22 18:57:17 +00:00
daf2776db7 Fix ()
`/bin/s6-svscan` is actuall located at `/usr/bin/s6-svscan`
2024-12-23 02:31:53 +08:00
a09ea2f483 Use Alpine 3.21 for the docker images () 2024-12-22 15:44:50 +00:00
a163c53a60 Refactor template & test related code ()
Move some legacy code from "base" package to proper packages.
2024-12-22 15:33:19 +00:00
afe314fa77 Use primary as button color ()
* Fix 
* Fix 
2024-12-22 23:03:39 +08:00
35c86af164 [skip ci] Updated translations via Crowdin 2024-12-22 00:35:14 +00:00
5d6d62493b Add action auto-scroll ()
Adds an auto-scroll/follow feature to running actions (fix , fix
).

When new log lines are appended and the bottom of the logs container
(`.action-view-right`) is visible at this time, the page automatically
scrolls down to the bottom of the logs.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-21 14:49:26 -08:00
143946834a Fix locale ()
Fix 
2024-12-21 19:24:43 +00:00
c0e80dbe26 Enable Typescript strictFunctionTypes ()
1. Enable
[strictFunctionTypes](https://www.typescriptlang.org/tsconfig/#strictFunctionTypes)
2. Introduce `DOMEvent` helper type which sets `e.target`. Surely not
totally correct with that `Partial` but seems to work.
3. Various type-related refactors, change objects in
`eventsource.sharedworker.ts` to `Map`.
2024-12-22 02:59:25 +08:00
09a0041965 Fix areYouSure confirm ()
See the comment
2024-12-21 12:11:22 -05:00