| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Backport #31967 by @lunny
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Backport #31966, #31973
Cherry-pick 30da734f37f0bd60d13044374c1d5af54f2eb416,
74b1c589c6c1a4261556e1a1a868bbcb2964a5d3
Replace #31972
---------
Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
|
|
|
|
| |
Backport #31851
Fix #30171
|
|
|
|
|
| |
Try to fix #31884
Fix #28584
Backport #31903
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#31931) (#31955)
Backport #31931 by @lunny
All refs under `refs/pull` should only be changed from Gitea inside but
not by pushing from outside of Gitea.
This PR will prevent the pull refs update but allow other refs to be
updated on the same pushing with `--mirror` operations.
The main changes are to add checks on `update` hook but not
`pre-receive` because `update` will be invoked by every ref but
`pre-receive` will revert all changes once one ref update fails.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
|
|
|
| |
Backport #31921
|
|
|
|
|
|
|
|
|
| |
(#31880) (#31952)
Backport #31880 by @yp05327
A quick fix for #31871
Co-authored-by: yp05327 <576951401@qq.com>
|
|
|
| |
backport #31939
|
|
|
|
| |
Update webpack on v1.22 branch because of
https://github.com/go-gitea/gitea/security/dependabot/70.
|
|
|
|
|
|
|
| |
Backport #31923 by @lunny
Fix #20658
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test_calcFingerprint (#31905) (#31914)
Backport #31905 by @s4uliu5
DSA is considered inherently insecure and is already disabled/removed in
OpenSSH 9.8.
Therefore "dsa-1024" tescases are failing.
```
--- FAIL: Test_calcFingerprint (0.02s)
--- FAIL: Test_calcFingerprint/dsa-1024 (0.00s)
--- FAIL: Test_calcFingerprint/dsa-1024/SSHKeygen (0.00s)
ssh_key_test.go:196:
Error Trace: /src/gitea/models/asymkey/ssh_key_test.go:196
Error: Received unexpected error:
Unable to verify key content [result: /tmp/gitea_keytest1239408114 is not a public key file.
]
Test: Test_calcFingerprint/dsa-1024/SSHKeygen
ssh_key_test.go:197:
Error Trace: /src/gitea/models/asymkey/ssh_key_test.go:197
Error: Not equal:
expected: "SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc"
actual : ""
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc
+
Test: Test_calcFingerprint/dsa-1024/SSHKeygen
FAIL
```
Fix #31624
Co-authored-by: Saulius Gurklys <s4uliu5@gmail.com>
|
|
|
| |
Backport #31859
|
|
|
| |
backport #31762
|
|
|
| |
Fix #31891
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31754 by @lunny
When opening a repository, it will call `ensureValidRepository` and also
`CatFileBatch`. But sometimes these will not be used until repository
closed. So it's a waste of CPU to invoke 3 times git command for every
open repository.
This PR removed all of these from `OpenRepository` but only kept
checking whether the folder exists. When a batch is necessary, the
necessary functions will be invoked.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
|
|
|
|
|
|
|
| |
Backport #31207 by @lunny
Fix #31134
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31874 by @bohde
In the OpenID flows, the "CfTurnstileSitekey" wasn't populated, which
caused those flows to fail if using Turnstile as the Captcha
implementation.
This adds the missing context variables, allowing Turnstile to be used
in the OpenID flows.
Co-authored-by: Rowan Bohde <rowan.bohde@gmail.com>
|
|
|
|
|
|
|
|
| |
Backport #31866 by @lunny
Try to fix
https://github.com/go-gitea/gitea/issues/31757#issuecomment-2295131062
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31842 by @Adrian-Hirt
When a long line with characters such as dots is returned by a step in
an action (e.g. by the output of the Ruby on Rails test runner), it
overflows the log container, causing the page to scroll sideways (see
first screenshot):

This PR adds the CSS `overflow-wrap: anywhere;` to the
`.job-step-section .job-step-logs .job-log-line .log-msg` selector,
which causes such lines to wrap as well (see second screenshot in which
the line wraps nicely):

Co-authored-by: Adrian Hirt <13788379+Adrian-Hirt@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31825 by @Zettat123
Fix #31395
This regression is introduced by #30273. To find out how GitHub handles
this case, I did [some
tests](https://github.com/go-gitea/gitea/issues/31395#issuecomment-2278929115).
I use redirect in this PR instead of checking if the corresponding `.md`
file exists when rendering the link because GitHub also uses redirect.
With this PR, there is no need to resolve the raw wiki link when
rendering a wiki page. If a wiki link points to a raw file, access will
be redirected to the raw link.
---------
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31843 by @wolfogre
Fix #31625.
If `pull_service.NewPullRequest` return an error which misses each `if`
check, `CompareAndPullRequestPost` will return immediately, since it
doesn't write the HTTP response, a 200 response with empty body will be
sent to clients.
```go
if err := pull_service.NewPullRequest(ctx, repo, pullIssue, labelIDs, attachments, pullRequest, assigneeIDs); err != nil {
if repo_model.IsErrUserDoesNotHaveAccessToRepo(err) {
ctx.Error(http.StatusBadRequest, "UserDoesNotHaveAccessToRepo", err.Error())
} else if git.IsErrPushRejected(err) {
// ...
ctx.JSONError(flashError)
} else if errors.Is(err, user_model.ErrBlockedUser) {
// ...
ctx.JSONError(flashError)
} else if errors.Is(err, issues_model.ErrMustCollaborator) {
// ...
ctx.JSONError(flashError)
}
return
}
```
Not sure what kind of error can cause it to happen, so this PR just
expose it. And we can fix it when users report that creating PRs failed
with error responses.
It's all my guess since I cannot reproduce the problem, but even if it's
not related, the code here needs to be improved.
Co-authored-by: Jason Song <i@wolfogre.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31832 by @yp05327
Fix #31807
ps: the newly added params's value will be changed.
When the first time you selected the filter, the values of params will
be `0` or `1`
But in pager it will be `true` or `false`.
So do we have `boolToInt` function?
Co-authored-by: yp05327 <576951401@qq.com>
|
|
|
|
|
|
|
|
|
|
| |
Backport #31829 by @lunny
Fix #31730
This PR rewrote the function `PublicKeysAreExternallyManaged` with a
simple test. The new function removed the loop to make it more readable.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
organization (#31770) (#31828)
Backport #31770 by @emrebdr
When transferring repositories that have issues linked to a project
board to another organization, the issues remain associated with the
original project board. This causes the columns in the project board to
become bugged, making it difficult to move other issues in or out of the
affected columns. As a solution, I removed the issue relations since the
other organization does not have this project table.
Fix for #31538
Co-authored-by: Edip Emre Bodur <emrebdr29@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#31823)
Backport #31683 by @SimonPistache
As discussed in #31667 & #26561, when a card on a Project contains
images, they can overflow the card on its containing column. This aims
to fix this issue via snapping scrollbars.
---
Issue #31667 is open to discussion as there should be room for
improvement.
Co-authored-by: Simon Priet <105607989+SimonPistache@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31799 by @silverwind
Buttons now show a focus style via
[`:focus-visible`](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible)
when the browser deems the focus to be important, like for example when
the button is focused via keyboard navigation.
<img width="492" alt="Screenshot 2024-08-07 at 22 12 51"
src="https://github.com/user-attachments/assets/060568b1-1599-4c56-bafb-b36ebb1bec35">
<img width="479" alt="image"
src="https://github.com/user-attachments/assets/885f4e10-f496-47f0-8ae5-45827ded09f8">
Co-authored-by: silverwind <me@silverwind.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31788 by @wolfogre
Fix #31784.
Before:
<img width="1648" alt="image"
src="https://github.com/user-attachments/assets/03f32545-4a85-42ed-bafc-2b193a5d8023">
After:
<img width="1653" alt="image"
src="https://github.com/user-attachments/assets/e5bcaf93-49cb-421f-aac1-5122bc488b02">
Co-authored-by: Jason Song <i@wolfogre.com>
|
|
|
|
|
|
|
|
| |
- Change condition to include `RepoID` equal to 0 for organization
secrets
Backport https://github.com/go-gitea/gitea/pull/31715 by @appleboy
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31790 by @wolfogre
Fix #31271.
When gogit is enabled, `IsObjectExist` calls
`repo.gogitRepo.ResolveRevision`, which is not correct. It's for
checking references not objects, it could work with commit hash since
it's both a valid reference and a commit object, but it doesn't work
with blob objects.
So it causes #31271 because it reports that all blob objects do not
exist.
Co-authored-by: Jason Song <i@wolfogre.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31778 by @lunny
Fix #31738
When pushing a new branch, the old commit is zero. Most git commands
cannot recognize the zero commit id. To get the changed files in the
push, we need to get the first diverge commit of this branch. In most
situations, we could check commits one by one until one commit is
contained by another branch. Then we will think that commit is the
diverge point.
And in a pre-receive hook, this will be more difficult because all
commits haven't been merged and they actually stored in a temporary
place by git. So we need to bring some envs to let git know the commit
exist.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31791 by @wolfogre
Found at
https://github.com/go-gitea/gitea/pull/31790#issuecomment-2272898915
`unit-tests-gogit` never work since the workflow set `TAGS` with
`gogit`, but the Makefile use `TEST_TAGS`.
<img width="690" alt="image"
src="https://github.com/user-attachments/assets/fb68df49-952b-42b9-8438-44200cefff43">

This PR adds the values of `TAGS` to `TEST_TAGS`, ensuring that setting
`TAGS` is always acceptable and avoiding confusion about which one
should be set.
After this PR:
<img width="714" alt="image"
src="https://github.com/user-attachments/assets/54cc7f38-d95b-4dbc-a87c-daba63462b86">
Co-authored-by: Jason Song <i@wolfogre.com>
|
| |
|
|
|
|
|
|
|
| |
Backport #31760 by @lunny
Fix #31755
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
of… (#31750)
… the month (31331)
Backport #31331
Fix #31197 on v1.22
Co-authored-by: lukas <lukas.walter@aceart.de>
|
|
|
| |
backport vue-bar-graph bump to remove gsap dep
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#31702) (#31745)
Backport #31702 by @wolfogre
Fix #31137.
Replace #31623 #31697.
When migrating LFS objects, if there's any object that failed (like some
objects are losted, which is not really critical), Gitea will stop
migrating LFS immediately but treat the migration as successful.
This PR checks the error according to the [LFS api
doc](https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#successful-responses).
> LFS object error codes should match HTTP status codes where possible:
>
> - 404 - The object does not exist on the server.
> - 409 - The specified hash algorithm disagrees with the server's
acceptable options.
> - 410 - The object was removed by the owner.
> - 422 - Validation error.
If the error is `404`, it's safe to ignore it and continue migration.
Otherwise, stop the migration and mark it as failed to ensure data
integrity of LFS objects.
And maybe we should also ignore others errors (maybe `410`? I'm not sure
what's the difference between "does not exist" and "removed by the
owner".), we can add it later when some users report that they have
failed to migrate LFS because of an error which should be ignored.
Co-authored-by: Jason Song <i@wolfogre.com>
|
|
|
|
|
|
|
|
|
|
| |
Backport #31732 by @yp05327
Fix: #31727
After:

Co-authored-by: yp05327 <576951401@qq.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31725 by @wolfogre
Fix #31707.
It's split from #31724.
Although #31724 could also fix #31707, it has change a lot so it's not a
good idea to backport it.
Co-authored-by: Jason Song <i@wolfogre.com>
|
|
|
|
|
|
|
| |
Backport #31722 by @wolfogre
Partially fix #31707. Related to #30656.
Co-authored-by: Jason Song <i@wolfogre.com>
|
|
|
|
|
| |
Backport #31033
user should be a collaborator of the base repo to create a PR
|
|
|
|
|
|
|
| |
Backport #31712 by @lunny
Fix #31708
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
|
|
|
|
| |
A separate backport of #31695 for 1.22
Fix #31673
|
|
|
|
|
|
|
| |
Backport #31522 by @kemzeb
Quick fix #31520. This issue is related to #31337.
Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
Backport #31672 by @techknowlogick
This lets developers who have direnv enabled to load our nix flake
automatically when entering it
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
|
|
|
|
|
|
| |
fix https://github.com/go-gitea/gitea/issues/31658
backports #31662
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31659 by @Zettat123
Fix #31599
Fix #31472
A branch divergence is counted based on the default branch. If the
default branch is updated, all divergence caches of the repo need to be
deleted.
Co-authored-by: Zettat123 <zettat123@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31637 by @silverwind
Fixes: https://github.com/go-gitea/gitea/issues/31636
1. Issue sidebar topic is disussed in
https://github.com/go-gitea/gitea/issues/31636
2. Org description already has `overflow-wrap: anywhere` to ensure no
overflow.
Co-authored-by: silverwind <me@silverwind.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport #31564 by @tobiasbp
Gitea 1.22.1 was supposed to allow for team names of length 255 (up from
30) after the following PR was merged in:
https://github.com/go-gitea/gitea/pull/31410. However, the length of
team names was still limited to 30 as described in this issue:
https://github.com/go-gitea/gitea/issues/31554.
One more change to _gitea_ needs to be made to allow for the longer team
names, as there is a 30 character limit here:
https://github.com/go-gitea/gitea/blob/2c92c7c5226e29636a1d47a277130f477fa2037b/services/forms/org.go#L65
This PR changes that value to 255.
Co-authored-by: Tobias Balle-Petersen <tobias.petersen@unity3d.com>
|