16517 Commits (9e446dbf0451004f8b24e532ed8dbff180782e78)
 

Author SHA1 Message Date
techknowlogick 9e446dbf04
bump bleve (#27300)
Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
9 months ago
Lunny Xiao 3b2da7e4ae
Redefine the meaning of column is_active to make Actions Registration Token generation easier (#27143)
Partially Fix #25041

This PR redefined the meaning of column `is_active` in table
`action_runner_token`.
Before this PR, `is_active` means whether it has been used by any
runner. If it's true, other runner cannot use it to register again.

In this PR, `is_active` means whether it's validated to be used to
register runner. And if it's true, then it can be used to register
runners until it become false. When creating a new `is_active` register
token, any previous tokens will be set `is_active` to false.
9 months ago
silverwind ee27b94b2c
Use vitest globals (#27102)
Enable [globals](https://vitest.dev/config/#globals) in vitest, reducing
the noise in test files.
9 months ago
yp05327 5ef5a0ade6
Fix divider in subscription page (#27298)
the divider should always display in the subscription page.

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
9 months ago
Lunny Xiao e59c9e3ecd
Fix yaml test (#27297) 9 months ago
silverwind c5247eff73
Enable production source maps for index.js, fix CSS sourcemaps (#27291)
Previously, the production build never output sourcemaps. Now we emit
one file for `index.js` because it is the most likely one where we need
to be able to better debug reported issues like
https://github.com/go-gitea/gitea/issues/27213. This will currently
increase the binary size of gitea by around 700kB which is what the
gzipped source map file has.

Also, I fixed the CSS sourcemap generation which was broken since the
introduction of lightningcss.
9 months ago
wxiaoguang 6967c13ad2
Fix some animation bugs (#27287)
Fix #27286
Replace #27279
9 months ago
silverwind 709c2fad8a
Add missed return to actions view fetch (#27289)
Should fix: #27213
9 months ago
Lunny Xiao eab20cb6bd
Fix more yaml lint errors (#27284)
Fix #27268
9 months ago
delvh 1f89a45926
Fix incorrect change from #27231 (#27275) 9 months ago
wxiaoguang 939d410a93
Add missing IconHTML size (#27269)
Fix #27223

Regression of #27122
9 months ago
wxiaoguang d0012c8806
Document the queue item's marshaling behavior (#27271)
Close #26843
9 months ago
GiteaBot 3f82ca38af [skip ci] Updated translations via Crowdin 9 months ago
JakobDev 7047df36d4
Another round of `db.DefaultContext` refactor (#27103)
Part of #27065

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
9 months ago
wxiaoguang 93bd4351bf
Fix more "locale" usages (#27259) 9 months ago
delvh 7960ba7e2b
Always use `ctx.Locale.Tr` inside templates (#27231) 9 months ago
Yarden Shoham e6d8b14620
Disable `Test Delivery` and `Replay` webhook buttons when webhook is inactive (#27211)
These buttons are now disabled when the webhook is not active.

The buttons were always enabled before this change.

- Fixes #26824
- Replaces #26814

# Before


![image](https://github.com/go-gitea/gitea/assets/20454870/e783d0d8-b433-440e-b95f-50d7c42613d3)


![image](https://github.com/go-gitea/gitea/assets/20454870/b4886151-9f32-4e83-8001-dd3f20c23d70)

# After


![image](https://github.com/go-gitea/gitea/assets/20454870/74b76a72-0818-4143-8548-5d42c4119a05)


![image](https://github.com/go-gitea/gitea/assets/20454870/d5ae4e5c-c1ac-4751-a072-e6f7511b1e07)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
9 months ago
yp05327 65d0b7c13a
Add missing public user visibility in user details page (#27246)
It seems that `Public` user visibility is missing in the template.

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/a8e7f3e0-1b77-41a0-921a-10adba90211e)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/b0bffe13-0ca6-453e-95d7-0794528d5733)
9 months ago
silverwind 6af34c09a7
Use mask-based fade-out effect for `.new-menu` (#27181)
The `.new-menu` was using a pseudo-element based fade-out effect.
Replace this with a more modern mask-based effect which in this case
required a child element to avoid fading out the background as well, so
I applied it to child `new-menu-inner` which was present on all these
menus except explore where I added it.

There is no visual difference except that the items on the explore page
have no `gap` between them any longer, making it consistent with other
menus. Before and after:

<img width="221" alt="Screenshot 2023-09-21 at 21 13 19"
src="https://github.com/go-gitea/gitea/assets/115237/b4a38ce2-cee1-4c54-84a5-e1d0bfd79e29">
<img width="222" alt="Screenshot 2023-09-21 at 21 32 36"
src="https://github.com/go-gitea/gitea/assets/115237/bb6b1335-d935-4ad4-bb85-3b0fc3027c2b">

Also, this cleans up the related CSS vars:

- `--color-header-wrapper-transparent` is removed, no longer needed
- `--color-header-wrapper` is defined in base theme as well, was
previously unset and therefor transparent.

[no whitespace
diff](https://github.com/go-gitea/gitea/pull/27181/files?diff=unified&w=1)
[demo of mask fade](https://jsfiddle.net/silverwind/tsfadb3u/)
9 months ago
GiteaBot c2eed61329 [skip ci] Updated translations via Crowdin 9 months ago
silverwind a50002c75c
Fix z-index on markdown completion (#27237)
Fixes: https://github.com/go-gitea/gitea/issues/27230
9 months ago
techknowlogick 0816463cf4
Update database-preparation and add note re: MariaDB (#27232)
update DB docs per feedback.
https://gitea.com/gitea/gitea-docusaurus/issues/69
9 months ago
Denys Konovalov 2325fe777d
cleanup locale function usage (#27227) 9 months ago
silverwind 3a187eace5
Fix EOL handling in web editor (#27141)
Fixes https://github.com/go-gitea/gitea/issues/27136.

This does the following for Monaco's EOL setting:

1. Use editorconfig setting if present
2. Use the file's dominant line ending as detected by monaco, which uses
LF for empty file
9 months ago
Nabapadma-sarker 8e23524b18
Fix PushEvent NullPointerException jenkinsci/github-plugin (#27203)
Fixes #27202
9 months ago
Denys Konovalov 63b25e816d
fix issues on action runners page (#27226)
- switch from some weird status badge to label
- translate untranslated `Reset registration token` string
- change documentation link from act_runner README to Gitea Docs site
- fix "No runners available" message width
- use `ctx.Locale.Tr` where possible


![grafik](https://github.com/go-gitea/gitea/assets/47871822/65547228-f9ed-4f80-9cfd-df5e55513a44)
9 months ago
wxiaoguang efd5176278
Fix Fomantic UI dropdown icon bug when there is a search input in menu (#27225)
Fix #27224

And add the case to the devtest page.
9 months ago
delvh da0467e3b6
Update go-enry to 2.8.5 (#27215)
Fixes #27214
9 months ago
silverwind 6e2888ce27
Update nodejs installation method in release container (#27207) 9 months ago
KN4CK3R bcb78e70ca
Quote table `release` in sql queries (#27205)
Fixes #27174

`release` is a reserved keyword in MySql. I can't reproduce the issue on
my setup and we have a test for that code but it seems there can be
setups where it fails.


a101dbaa79/tests/integration/repo_activity_test.go (L45-L46)
9 months ago
Daniel Kilimnik 0ee7cbf725
Fix push mirror, wrong timestamp format (#27153)
I noticed, that the push mirrors endpoint, is the only endpoint which
returns the times in long format rather than as time.Time().

I think the behavior should be consistent across the project.

----

## ⚠️ BREAKING ⚠️

This PR changes the time format used in API responses for all
push_mirror endpoints which return a push mirror.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
9 months ago
JakobDev 5f7388e586
Allow copying issue comment link on archived repos and when not logged in (#27193)
Fixes https://codeberg.org/Codeberg/Community/issues/1303
9 months ago
metiftikci 6c563a302a
fix: text decorator on issue sidebar menu label (#27206)
fix underline for label on issue sidebar
9 months ago
silverwind a101dbaa79
Update JS and Poetry dependencies and eslint (#27200)
- Update all JS and Poetry dependencies
- Remove deprecated `eslint-plugin-custom-elements` and replace it with
rules from `eslint-plugin-wc`
- Add a convenience `make update` to update both js and py dependencies
- Tested markdown toolbar, swagger and citation
9 months ago
wxiaoguang c0ed26f987
Remove some dead code (#27196)
Some code is not in use any more, remove them.
9 months ago
GiteaBot 383edf2fd7 [skip ci] Updated translations via Crowdin 9 months ago
JakobDev 28f9b313ba
Updates to the API for archived repos (#27149) 9 months ago
John Olheiser 7520cd678c
Fix release URL in webhooks (#27182) 9 months ago
wxiaoguang 1f026bcb7e
Fix dropdown icon position (#27175)
According to https://fomantic-ui.com/modules/dropdown.html and our
"devtest" page, many dropdown elements has incorrect "icon" position.

This PR fixes all of them. Fix #27173
9 months ago
wxiaoguang c2cabe7b28
Fix repo sub menu (#27169)
Fix #27166
9 months ago
Nanguan Lin 2f8e1604f8
Fix review request number and add more tests (#27104)
fix #27019 
## testfixture yml
1. add issue20(a pr issue) in repo 23, org 17
2. add user15 to team 9
3. add four reviews about issue20
## test case
add two tests that are described with code comments
the code before pr #26784 failed the first test
<img width="479" alt="image"
src="https://github.com/go-gitea/gitea/assets/70063547/1d9b5787-11b4-4c4d-931f-6a9869547f35">
current code failed the second test(as mentioned in #27019)
<img width="484" alt="image"
src="https://github.com/go-gitea/gitea/assets/70063547/05608055-7587-43d1-bae1-92c688270819">
Any advice is appreciated.

---------

Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
Co-authored-by: Giteabot <teabot@gitea.io>
9 months ago
Nanguan Lin 218e719ea8
Fix the variable regexp pattern on web page (#27161)
same as (https://github.com/go-gitea/gitea/pull/26910)
9 months ago
Dionysios Kakouris e46274b5b4
Fix organization field being null in POST /orgs/{orgid}/teams (#27150)
Similarly to the fix in https://github.com/go-gitea/gitea/pull/24694,
this addresses the team creation not returning the organization
information in the response.

This fix is connected to the
[issue](https://gitea.com/gitea/terraform-provider-gitea/issues/27)
discovered in the terraform provider.
Moreover, the
[documentation](https://docs.gitea.com/api/1.20/#tag/organization/operation/orgCreateTeam)
suggests that the response body should include the `organization` field
(currently being `null`).
9 months ago
JakobDev 14731a34ff
Add index to `issue_user.issue_id` (#27154)
This fixes a performance bottleneck. It was discovered by Codeberg.
Every where query on that table (which has grown big over time) uses
this column, but there is no index on it.

See this part of the log which was posted on Matrix:
```
2023/09/10 00:52:01 ...rs/web/repo/issue.go:1446:ViewIssue() [W] [Slow SQL Query] UPDATE `issue_user` SET is_read=? WHERE uid=? AND issue_id=? [true x y] - 51.395434887s
2023/09/10 00:52:01 ...rs/web/repo/issue.go:1447:ViewIssue() [E] ReadBy: Error 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
2023/09/10 00:52:01 ...eb/routing/logger.go:102:func1() [I] router: completed GET /Codeberg/Community/issues/1201 for [::ffff:xxx]:0, 500 Internal Server Error in 52384.2ms @ repo/issue.go:1256(repo.ViewIssue)
```
9 months ago
GiteaBot 2001ffee3f [skip ci] Updated translations via Crowdin 9 months ago
delvh d7f73a1334
Start development on Gitea 1.22 (#27155) 9 months ago
delvh 707c69f399
Fix successful return value for `SyncAndGetUserSpecificDiff` (#27152)
A function should not return an error when it is successful.
Otherwise, things like https://discord.com/channels/322538954119184384/322538954119184384/1153705341620600833 happen…
9 months ago
Zettat123 9336286e35
Improve actions docs related to `pull_request` event (#27126)
Related to #27039

The `ref` property in Gitea Actions is different from GitHub Actions.
This PR improves the documentation to explain the difference.
9 months ago
delvh 24a215e317
Remove outdated paragraphs when comparing Gitea Actions to GitHub Actions (#27119)
No backport needed as this new state only applies to 1.21+

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
9 months ago
hazy 74a5db03fd
Fix: treat tab "overview" as "repositories" in user profiles without readme (#27124)
Beginning since 2af30f715e, Gitea has a
500 error when visiting a user profile with `?tab=overview` in the URL
when the user doesn't have a `.profile/README.md`, because the backend
code assumes that if the tab is overview a profile repository must
exist, and checks that the repository is nil aren't done.

In this PR I treat `?tab=overview` the same as if no tab is set in the
URL, which corrects this behaviour- Now, when visiting `?tab=overview`,
if `.profile/README.md` exists on that user's profile it'll show that as
it should, otherwise it'll show the repositories tab.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
9 months ago