Lunny Xiao
b27dde914d
recover the changes on test
2024-05-04 11:38:48 +08:00
Lunny Xiao
ed56a0f5fc
Add test for NewBoard
2024-05-04 02:36:09 +08:00
Lunny Xiao
da28c1c3a4
Revert unnecessary change
2024-05-04 02:29:01 +08:00
Lunny Xiao
eadf3bbccd
Merge branch 'main' into lunny/fix_move_column
2024-05-04 02:27:10 +08:00
Lunny Xiao
f4dd17289d
Add tests
2024-05-04 02:26:56 +08:00
wxiaoguang
0f3e717a1a
Improve grep search ( #30843 )
...
Reduce the context line number to 1, make "git grep" search respect the
include/exclude patter, and fix #30785
2024-05-03 09:13:48 +00:00
Kemal Zebari
9f0ef3621a
Don't only list code-enabled repositories when using repository API ( #30817 )
...
We should be listing all repositories by default.
Fixes #28483 .
2024-05-03 15:58:31 +08:00
yp05327
a50026e2f3
Fix no edit history after editing issue's title and content ( #30814 )
...
Fix #30807
reuse functions in services
2024-05-03 14:11:51 +08:00
wxiaoguang
53b55223d1
Ignore useless error message "broken pipe" ( #30801 )
...
Fix #30792
2024-05-03 02:39:36 +00:00
silverwind
c4e875402b
Fix JS error on pull request page ( #30838 )
...
Fix this error seen on PR page, regression from
https://github.com/go-gitea/gitea/pull/30803 :
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-05-03 10:12:10 +08:00
silverwind
b30b7df9f4
Fix body margin shifting with modals, fix error on project column edit ( #30831 )
...
Fixes: https://github.com/go-gitea/gitea/issues/30816 , regression from
https://github.com/go-gitea/gitea/pull/30723 .
Fixes: https://github.com/go-gitea/gitea/pull/30815 , regression from
https://github.com/go-gitea/gitea/pull/30723 .
Fomantic [expects a
callback](59d9b40987/src/definitions/modules/modal.js (L530-L534)
)
to be called during `hide` which we did not do, so it could never remove
the margin it added to `body`.
I do observe the body content shifting to right by 1px when modal opens,
but this is a bug that existed on v1.21 as well, so not a regression.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-05-03 01:48:24 +00:00
silverwind
c445a85528
Improve repo button row layout ( #30668 )
...
Since there is now a second `<input>` in the repo buttons, we can make a
better-looking layout with no empty space, except on mobile.
Also I fixed one bug with focus border on clone panel.
## Large
<img width="1163" alt="Screenshot 2024-04-23 at 22 25 22"
src="https://github.com/go-gitea/gitea/assets/115237/8135a572-aa67-4672-ad49-b76b06890b52 ">
## Medium
<img width="870" alt="Screenshot 2024-04-23 at 22 25 34"
src="https://github.com/go-gitea/gitea/assets/115237/9e93f61c-3315-4a78-8328-8cefad5b50fa ">
## Mobile
<img width="416" alt="Screenshot 2024-04-23 at 22 25 52"
src="https://github.com/go-gitea/gitea/assets/115237/859e341f-807a-48e6-8bcf-31715963216c ">
2024-05-02 19:10:49 +00:00
Bo-Yi Wu
e67fbe4f15
refactor: merge ListActionTasks func to action.go file ( #30811 )
...
Just merge actions.go file to action.go
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-05-02 17:43:29 +00:00
Archer
5c542ca94c
Prevent automatic OAuth grants for public clients ( #30790 )
...
This commit forces the resource owner (user) to always approve OAuth 2.0
authorization requests if the client is public (e.g. native
applications).
As detailed in [RFC 6749 Section 10.2](https://www.rfc-editor.org/rfc/rfc6749.html#section-10.2 ),
> The authorization server SHOULD NOT process repeated authorization
requests automatically (without active resource owner interaction)
without authenticating the client or relying on other measures to ensure
that the repeated request comes from the original client and not an
impersonator.
With the implementation prior to this patch, attackers with access to
the redirect URI (e.g., the loopback interface for
`git-credential-oauth`) can get access to the user account without any
user interaction if they can redirect the user to the
`/login/oauth/authorize` endpoint somehow (e.g., with `xdg-open` on
Linux).
Fixes #25061 .
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-05-02 17:05:59 +00:00
Kemal Zebari
872caa17c0
Catch and handle unallowed file type errors in issue attachment API ( #30791 )
...
Before, we would just throw 500 if a user passes an attachment that is
not an allowed type. This commit catches this error and throws a 422
instead since this should be considered a validation error.
2024-05-02 16:33:31 +00:00
wxiaoguang
677032d36a
Fix incorrect message id for releaes email ( #30825 )
...
Make generateMessageIDForRelease outputs the same format as
generateMessageIDForIssue (old `createReference`)
2024-05-02 15:24:21 +00:00
silverwind
6f89d5e3a0
Add hover outline to heatmap squares ( #30828 )
...
Makes it easier to use because you see which square is currently
hovered:
<img width="314" alt="Screenshot 2024-05-02 at 15 38 20"
src="https://github.com/go-gitea/gitea/assets/115237/3a15dad1-2259-4f28-9fae-5cf6ad3d8798 ">
I did try a `scoped` style for this, but that did not work for some
reason.
2024-05-02 14:56:17 +00:00
silverwind
9235442ba5
Remove external API calls in TestPassword
( #30716 )
...
The test had a dependency on `https://api.pwnedpasswords.com ` which
caused many failures on CI recently:
```
--- FAIL: TestPassword (2.37s)
pwn_test.go:41: Get "https://api.pwnedpasswords.com/range/e6b6a ": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
FAIL
coverage: 82.9% of statements
```
2024-05-02 14:43:23 +00:00
Lunny Xiao
cb9e1a3ff6
Upgrade chi-binding ( #30826 )
...
Front port #30742
2024-05-02 14:09:38 +00:00
Lunny Xiao
792ef38f2b
Merge branch 'main' into lunny/fix_move_column
2024-05-02 21:44:20 +08:00
Lunny Xiao
699c9e6187
Follow yp05327's suggestion
2024-05-02 21:44:08 +08:00
silverwind
b1bb3642e5
Improve context popup rendering ( #30824 )
...
Before, lot of empty space when no labels or body:
<img width="281" alt="Screenshot 2024-05-02 at 13 51 29"
src="https://github.com/go-gitea/gitea/assets/115237/8a980ccd-d53c-43a3-a059-dc8c614621e1 ">
After, empty space collapsed:
<img width="306" alt="Screenshot 2024-05-02 at 13 51 16"
src="https://github.com/go-gitea/gitea/assets/115237/8d9c154d-5de1-43d0-8536-afd9194d99b3 ">
All `<p>` (unsuitable) and `<small>` (discouraged in favor of css) tags
are removed.
2024-05-02 15:42:33 +02:00
wxiaoguang
eb8bb82e58
Fix activity heat map padding & locale ( #30823 )
...
Fix #30808
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-05-02 13:22:55 +00:00
wxiaoguang
6ff2acc52c
Fix issue card layout ( #30800 )
...
Fix #30788
2024-05-02 11:19:44 +00:00
wxiaoguang
ebe6f4cad7
Fix branch selector UI ( #30803 )
...
Fix #30802
2024-05-02 10:45:23 +00:00
silverwind
82eca44581
Fix rounded border for segment followed by pagination ( #30809 )
...
Fixes https://github.com/go-gitea/gitea/issues/30673 , specifically
https://github.com/go-gitea/gitea/issues/30673#issuecomment-2085329812 .
2024-05-02 09:25:55 +00:00
Lunny Xiao
85d9fe6f79
Revert "Use json return but not 500 directly"
...
This reverts commit 81d455fa6c
.
2024-05-02 14:27:45 +08:00
Lunny Xiao
e9f58eb5f9
Revert "Reuse method JSONError"
...
This reverts commit 24c2c13c41
.
2024-05-02 14:25:42 +08:00
Lunny Xiao
2bb832ece1
Revert "rename PROJECT_BOARD_CHANGED -> PROJECT_COLUMN_CHANGED"
...
This reverts commit db9362d73c
.
2024-05-02 14:24:37 +08:00
Lunny Xiao
891881a846
Merge branch 'main' into lunny/fix_move_column
2024-05-02 14:24:00 +08:00
Lunny Xiao
db9362d73c
rename PROJECT_BOARD_CHANGED -> PROJECT_COLUMN_CHANGED
2024-05-02 14:23:46 +08:00
wxiaoguang
be112c1fc3
Skip gzip for some well-known compressed file types ( #30796 )
...
Co-authored-by: silverwind <me@silverwind.io>
2024-05-02 02:27:25 +00:00
wxiaoguang
ce08a9fe2f
Fix markdown rendering when mentioning users ( #30795 )
2024-05-02 01:00:46 +00:00
Lunny Xiao
b8a8f41af6
Merge branch 'main' into lunny/fix_move_column
2024-05-01 23:53:12 +08:00
wxiaoguang
6f7cd94a02
Fix bleve fuzziness ( #30799 )
...
Fix #30797
Fix #30317
2024-05-01 15:32:52 +03:00
Kemal Zebari
f135cb7c94
Don't have redis-cluster
as possible cache/session adapter in docs ( #30794 )
...
This is because it doesn't exist as an adapter. The `redis` adapter
already handles Redis cluster configurations.
Fixes #30534 .
2024-05-01 05:33:40 +00:00
Chester
6709e28da7
Add API endpoints for getting action jobs status ( #26673 )
...
Sample of response, it is similar to Github actions
ref
https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository
``` json
{
"workflow_runs": [
{
"id": 3,
"name": "Explore-Gitea-Actions",
"head_branch": "main",
"head_sha": "6d8d29a9f7a01ded8f8aeb64341cb31ee1ab5f19",
"run_number": 3,
"event": "push",
"display_title": "More job",
"status": "success",
"workflow_id": "demo2.yaml",
"url": "/chester/test/actions/runs/3",
"created_at": "2023-08-22T13:41:33-04:00",
"updated_at": "2023-08-22T13:41:37-04:00",
"run_started_at": "2023-08-22T13:41:33-04:00"
},
{
"id": 2,
"name": "Explore-Gitea-Actions",
"head_branch": "main",
"head_sha": "6d8d29a9f7a01ded8f8aeb64341cb31ee1ab5f19",
"run_number": 2,
"event": "push",
"display_title": "More job",
"status": "success",
"workflow_id": "demo.yaml",
"url": "/chester/test/actions/runs/2",
"created_at": "2023-08-22T13:41:30-04:00",
"updated_at": "2023-08-22T13:41:33-04:00",
"run_started_at": "2023-08-22T13:41:30-04:00"
},
{
"id": 1,
"name": "Explore-Gitea-Actions",
"head_branch": "main",
"head_sha": "e5369ab054cae79899ba36e45ee82811a6e0acd5",
"run_number": 1,
"event": "push",
"display_title": "Add job",
"status": "failure",
"workflow_id": "demo.yaml",
"url": "/chester/test/actions/runs/1",
"created_at": "2023-08-22T13:15:21-04:00",
"updated_at": "2023-08-22T13:18:10-04:00",
"run_started_at": "2023-08-22T13:15:21-04:00"
}
],
"total_count": 3
}
```
---------
Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
2024-05-01 09:40:23 +08:00
GiteaBot
d8d46d1c48
[skip ci] Updated translations via Crowdin
2024-05-01 00:26:38 +00:00
wxiaoguang
a988237eb4
Improve logout from worker ( #30775 )
...
A quick fix for #30756
2024-04-30 15:35:42 +00:00
silverwind
564102ce89
Rework and fix stopwatch ( #30732 )
...
Fixes https://github.com/go-gitea/gitea/issues/30721 and overhauls the
stopwatch. Time is now shown inside the "dot" icon and on both mobile
and desktop. All rendering is now done by `<relative-time>`, the
`pretty-ms` dependency is dropped.
Desktop:
<img width="557" alt="Screenshot 2024-04-29 at 22 33 27"
src="https://github.com/go-gitea/gitea/assets/115237/3a46cdbf-6af2-4bf9-b07f-021348badaac ">
Mobile:
<img width="640" alt="Screenshot 2024-04-29 at 22 34 19"
src="https://github.com/go-gitea/gitea/assets/115237/8a2beea7-bd5d-473f-8fff-66f63fd50877 ">
Note for tippy:
Previously, tippy instances defaulted to "menu" theme, but that theme is
really only meant for `.ui.menu`, so it was not optimal for the
stopwatch popover.
This introduces a unopinionated `default` theme that has no padding and
should be suitable for all content. I reviewed all existing uses and
explicitely set the desired `theme` on all of them.
2024-04-30 14:52:46 +00:00
wxiaoguang
5f05e7b41a
Fix dashboard commit status null access ( #30771 )
...
Fix #30768
2024-04-30 12:39:36 +00:00
silverwind
610802df85
Fix tautological conditions ( #30735 )
...
As discovered by https://github.com/go-gitea/gitea/pull/30729 .
---------
Co-authored-by: Giteabot <teabot@gitea.io>
2024-04-30 14:34:40 +02:00
6543
f2d8ccc5bb
Get repo assignees and reviewers should ignore deactivated users ( #30770 )
...
If an user is deactivated, it should not be in the list of users who are
suggested to be assigned or review-requested.
old assignees or reviewers are not affected.
---
*Sponsored by Kithara Software GmbH*
2024-04-30 08:43:08 +00:00
Lunny Xiao
e3d553157a
Fix possible sorting overflow
2024-04-30 15:44:49 +08:00
Lunny Xiao
3710ea2e5e
Merge branch 'main' into lunny/fix_move_column
2024-04-30 15:25:27 +08:00
Lunny Xiao
24c2c13c41
Reuse method JSONError
2024-04-30 15:24:56 +08:00
Lunny Xiao
03562c7ff7
Add limitation for a project's column to 20
2024-04-30 15:21:38 +08:00
Lunny Xiao
81d455fa6c
Use json return but not 500 directly
2024-04-30 15:10:35 +08:00
wxiaoguang
059b2718a5
Right align the "Settings" menu item in overflow-menu ( #30764 )
...
I guess there could be enough people liking to make the Settings menu
item right aligned. As a site admin, I found it's easier to find the
right-aligned Settings menu item.
Tested with various sizes:
![image](https://github.com/go-gitea/gitea/assets/2114189/92836527-2cb2-4531-9296-233c5bd698f4 )
![image](https://github.com/go-gitea/gitea/assets/2114189/3a0729fc-5e33-44b5-9fb4-3a4e787405b5 )
![image](https://github.com/go-gitea/gitea/assets/2114189/9845ab6b-88e3-4e5a-8d6d-2b8af259d593 )
2024-04-30 04:26:13 +00:00
Zettat123
7ad5031328
Fix duplicate status check contexts ( #30660 )
...
Caused by #30076 .
There may be some duplicate status check contexts when setting status
checks for a branch protection rule. The duplicate contexts should be
removed.
Before:
<img
src="https://github.com/go-gitea/gitea/assets/15528715/97f4de2d-4868-47a3-8a99-5a180f9ac0a3 "
width="600px" />
After:
<img
src="https://github.com/go-gitea/gitea/assets/15528715/ff7289c5-9793-4090-ba31-e8cb3c85f8a3 "
width="600px" />
2024-04-30 11:53:16 +08:00