f94ee4fd3c
Get changed files based on merge base when checking pull_request
actions trigger ( #34106 )
...
Fix #33941
2025-04-03 05:13:16 +00:00
45c45934aa
Add last_committer_date
and last_author_date
for file contents API ( #32921 )
...
Fix #32886
Add `last_committer_date` and `last_author_date` in the content API
which is not implemented by Github API v3 at the moment.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-04-02 21:47:31 -07:00
c27d87a9ac
Refactor Branch struct in package modules/git ( #33980 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been skipped
The `Branch` struct in `modules/git` package is unnecessary. We can just
use a `string` to represent a branch
2025-04-02 17:31:32 +00:00
285950a222
Support creating relative link to raw path in markdown ( #34105 )
...
Fix #34104
2025-04-03 01:05:43 +08:00
6ed1b26c58
Do not show 500 error when default branch doesn't exist ( #34096 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Fix #34090
2025-04-01 21:39:00 -07:00
ee3c82f874
Enable addtional linters ( #34085 )
...
enable mirror, usestdlibbars and perfsprint
part of: https://github.com/go-gitea/gitea/issues/34083
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-04-01 10:14:01 +00:00
741b53eb30
[Fix] Resolve the problem of commit_statuses not being loaded at the top - right when switching files from the file tree ( #34079 )
...
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-03-31 18:39:08 +00:00
0fde8ecd55
Enable testifylint rules ( #34075 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
enable testifylint rules disabled in:
https://github.com/go-gitea/gitea/pull/34054
2025-03-31 01:53:48 -04:00
b59705fa34
Add a config option to block "expensive" pages for anonymous users ( #34024 )
...
Fix #33966
```
;; User must sign in to view anything.
;; It could be set to "expensive" to block anonymous users accessing some pages which consume a lot of resources,
;; for example: block anonymous AI crawlers from accessing repo code pages.
;; The "expensive" mode is experimental and subject to change.
;REQUIRE_SIGNIN_VIEW = false
```
2025-03-30 05:26:19 +00:00
cddd19efc8
Add anonymous access support for private/unlisted repositories ( #34051 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Follow #33127
Fix #8649 , fix #639
This is a complete solution. A repo unit could be set to:
* Anonymous read (non-signed-in user)
* Everyone read (signed-in user)
* Everyone write (wiki-only)
2025-03-29 13:26:41 +08:00
321cbcb45a
Fix bug on downloading job logs ( #34041 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Fix #34038
2025-03-27 17:20:56 -07:00
894821d522
Fix git client accessing renamed repo ( #34034 )
...
Fix #28460
The `reqGitSignIn` is just copied-pasted code (from githtttp.go) and
causes the regression bug.
Co-authored-by: Giteabot <teabot@gitea.io >
2025-03-28 07:28:58 +08:00
053592d847
fix org repo creation being limited by user limits ( #34030 )
...
fixes an issue where user is unable to create new repository in
organization via UI if repository limits are in place and user has
exhausted them for their own namespace.
closes: https://github.com/go-gitea/gitea/issues/15504
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-03-27 13:16:17 +00:00
0c6957ef8d
Download actions job logs from API ( #33858 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
Related to #33709 , #31416
It's similar with
https://docs.github.com/en/rest/actions/workflow-jobs?apiVersion=2022-11-28#download-job-logs-for-a-workflow-run--code-samples .
This use `job_id` as path parameter which is consistent with Github's
APIs.
---------
Co-authored-by: ChristopherHX <christopher.homberger@web.de >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-03-26 11:30:52 -07:00
51d86adb6d
Fix some migration and repo name problems ( #33986 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
1. Ignore empty inputs in `UnmarshalHandleDoubleEncode`
2. Ignore non-existing `stateEvent.User` in gitlab migration
3. Enable `release` and `wiki` units when they are selected in migration
4. Sanitize repo name for migration and new repo
2025-03-24 20:26:58 -07:00
3fe449c21a
Use filepath.Join instead of path.Join for file system file operations ( #33978 )
2025-03-24 14:50:28 -07:00
b1e326d09e
Auto expand "New PR" form ( #33971 )
...
Follow GitHub's behavior: use `?expand=1` to expand the "New PR" form
2025-03-24 14:28:02 +00:00
e1bba9c1a2
Improve oauth2 error handling ( #33969 )
...
cron-translations / crowdin-pull (push) Has been skipped
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
Show the callback error to end users, it should be safe.
Fix #33967
2025-03-22 10:15:45 +08:00
8f051d598c
Added Description Field for Secrets and Variables ( #33526 )
...
Fixes #33484
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-03-17 19:24:54 +00:00
30b13942f0
Give organisation members access to organisation feeds ( #33508 )
...
Currently the organisation feed only includes items for public
repositories (for non-administrators). This pull requests adds
notifications from private repositories to the organisation-feed (for
accounts that have access to the organisation).
Feed-items only get shown for repositories where the users team(s)
should have access to, this filtering seems to get done by some existing
code.
Needs some tests, but am unsure where/how to add them.
Before:

After:

---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-03-15 17:49:06 +00:00
65e2411394
Feature: Ephemeral action runners ( #33570 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
* This includes a runner mock test for hardend PickTask behavior like
described in my proposal
* Runner register ephemeral flag introduced in
https://gitea.com/gitea/act_runner/pulls/649
Closes #32461
2025-03-14 12:27:24 -07:00
b094f9b75d
Improve repo commit view ( #33877 )
...
Fix #24623
Major changes:
1. Redirect `/owner/repo/blob/*` requests to `/owner/repo/src/commit/*`
(like GitHub)
2. Add a "view file diff" link (see screenshot below)
3. Refactor "AssertHTMLElement" to generic, now we can accurately assert
existence or number.
4. Add more tests
---------
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: delvh <dev.lh@web.de >
2025-03-14 07:45:11 +00:00
1e7248047c
Pull request updates will also trigger code owners review requests ( #33744 )
...
Fix #33490
It will only read the changed file on the pushed commits but not all the
files of this PR.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-03-13 19:36:14 -07:00
651ef66966
Add workflow_job webhook ( #33694 )
...
Provide external Integration information about the Queue lossly based on
https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=completed#workflow_job
Naming conflicts between GitHub & Gitea are here, Blocked => Waiting,
Waiting => Queued
Rationale Enhancement for ephemeral runners management #33570
2025-03-11 10:40:38 -07:00
e47bba046c
Fix test code ( #33829 )
...
Do not use onGiteaRun if there is no git operation
2025-03-10 21:45:42 +00:00
c102492e5a
Fix LFS URL ( #33840 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Fix #33839
2025-03-10 17:36:02 +08:00
34e5df6d30
Add material icons for file list ( #33837 )
2025-03-10 15:57:17 +08:00
3f1f808b9e
Full-file syntax highlighting for diff pages ( #33766 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Fix #33358 , fix #21970
This adds a step in the `GitDiffForRender` that does syntax highlighting for the
entire file and then only references lines from that syntax highlighted
code. This allows things like multi-line comments to be syntax
highlighted correctly.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-03-09 12:51:58 +08:00
6422f05a4e
Decouple diff stats query from actual diffing ( #33810 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
The diff stats are no longer part of the diff generation.
Use `GetDiffShortStat` instead to get the total number of changed files,
added lines, and deleted lines.
As such, `gitdiff.GetDiff` can be simplified:
It should not do more than expected.
And do not run "git diff --shortstat" for pull list. Fix #31492
2025-03-08 17:36:08 +08:00
1b2dffff8e
Add global lock for migrations to make upgrade more safe with multiple replications ( #33706 )
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
2025-03-07 21:08:53 +00:00
ae3a18e01a
Remove context from git struct ( #33793 )
...
Argument is moved from struct init in command run, which lets us remove
context from struct.
2025-03-04 11:56:11 -08:00
b684f51d20
Webhook add X-Gitea-Hook-Installation-Target-Type Header ( #33752 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
This is a X-GitHub Header port
* repository for repository webhooks (matches GitHub)
* organization for organization webhooks (matches GitHub)
* user for user webhooks (Gitea specific)
* system for system webhooks (Gitea specific)
* default for default hooks needs testing (Gitea specific)
- `X-Gitea-Hook-Installation-Target-Type`
- `X-GitHub-Hook-Installation-Target-Type`
2025-03-01 06:50:49 +00:00
aca21549f2
Add composor source field ( #33502 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Fix #33066
2025-02-28 16:29:21 +00:00
303af554c9
Improve "generate new access token" form ( #33730 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
Fix: https://github.com/go-gitea/gitea/issues/33519
As discussed in [PR
#33614 ](https://github.com/go-gitea/gitea/pull/33614 ), the
ScopedAccessTokenSelector Vue component is not particularly useful.
This PR removes the component and reverts to using HTML templates. It
also introduces some (hopefully) useful refactoring.
The Vue component was causing the UX bug reported in the linked issue.
Required form fields are now properly working, as expected (see
screenshot).

---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-02-27 19:40:12 +00:00
f52e31f5ce
Clone repository with Tea CLI ( #33725 )
...
This PR adds "Tea CLI" as a clone method.
<img width="350" alt="Capture d’écran 2025-02-25 à 23 38 47"
src="https://github.com/user-attachments/assets/8e86e54a-998b-45d1-9f20-167b449e79b6 "
/>
---------
Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-02-27 18:18:02 +00:00
56a0a9c750
Fix git empty check and HEAD request ( #33690 )
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
2025-02-24 02:11:29 +00:00
8ae46d9684
Fix some user name usages ( #33689 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
1. GetUserOrgsList should "order by" lower_name
2. GetIssuePostersWithSearch should search in-case-sensitive-ly
3. LoginName should not be used as username
By the way, remove unnecessary "onGiteaRun"
2025-02-23 12:33:43 +00:00
a61014ea47
Fix for Maven Package Naming Convention Handling ( #33678 )
...
Make legacy package names could be listed and add tests
---------
Co-authored-by: diana.strebkova@t-systems.com <diana.strebkova@t-systems.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-02-22 01:38:49 +08:00
3ee5ee2029
Upgrade golangci-lint to v1.64.5 ( #33654 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
Use `usetesting` instead of deprecated `tenv`.
1. Follow up #33648
2. Make lint pass and add some comments
2025-02-21 00:05:40 +08:00
cc1fdc84ca
Use test context in tests and new loop system in benchmarks ( #33648 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Replace all contexts in tests with go1.24 t.Context()
---------
Co-authored-by: Giteabot <teabot@gitea.io >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-02-20 09:57:40 +00:00
69de5a65c2
Fix project issues list and counting ( #33594 )
...
Co-authored-by: delvh <dev.lh@web.de >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-02-17 05:14:56 +00:00
5df9fd3e9c
Add API to support link package to repository and unlink it ( #33481 )
...
Fix #21062
---------
Co-authored-by: Zettat123 <zettat123@gmail.com >
2025-02-16 19:18:00 -08:00
2b8cfb557d
Artifacts download api for artifact actions v4 ( #33510 )
...
* download endpoint has to use 302 redirect
* fake blob download used if direct download not possible
* downloading v3 artifacts not possible
New repo apis based on GitHub Rest V3
- GET /runs/{run}/artifacts (Cannot use run index of url due to not
being unique)
- GET /artifacts
- GET + DELETE /artifacts/{artifact_id}
- GET /artifacts/{artifact_id}/zip
- (GET /artifacts/{artifact_id}/zip/raw this is a workaround for a http
302 assertion in actions/toolkit)
- api docs removed this is protected by a signed url like the internal
artifacts api and no longer usable with any token or swagger
- returns http 401 if the signature is invalid
- or change the artifact id
- or expired after 1 hour
Closes #33353
Closes #32124
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-02-16 08:32:54 +08:00
70327d6a92
Improve commits list performance to reduce unnecessary database queries ( #33528 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
When listing commits, Gitea attempts to retrieve the actual user based
on the commit email. Querying users one by one from the database is
inefficient. This PR optimizes the process by batch querying users by
email, reducing the number of database queries.
2025-02-14 00:05:55 -08:00
fba365b425
Only show the latest version in the Arch index ( #33262 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Only show the latest version of the package in the arch repo.
closes #33534
---------
Co-authored-by: Giteabot <teabot@gitea.io >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-02-13 01:24:44 +00:00
e9b98aef44
Enhance routers for the Actions runner operations ( #33549 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
- Find the runner before deleting
- Move the main logic from `routers/web/repo/setting/runners.go` to
`routers/web/shared/actions/runners.go`.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-02-11 01:39:10 +00:00
c422f179dd
Enhance routers for the Actions variable operations ( #33547 )
...
- Find the variable before updating or deleting
- Move the main logic from `routers/web/repo/setting/variables.go` to
`routers/web/shared/actions/variables.go`.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: Giteabot <teabot@gitea.io >
2025-02-11 04:44:04 +08:00
30993e9508
Feature: Support workflow event dispatch via API ( #33545 )
...
Fix: https://github.com/go-gitea/gitea/issues/31765 (Re-open #32059 )
---------
Co-authored-by: Bence Santha <git@santha.eu >
Co-authored-by: Bence Sántha <7604637+bencurio@users.noreply.github.com >
Co-authored-by: Christopher Homberger <christopher.homberger@web.de >
2025-02-11 03:05:42 +08:00
704b65e012
Revert "Feature: Support workflow event dispatch via API ( #32059 )" ( #33541 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
This reverts commit 523751dc82
.
2025-02-10 17:44:42 +08:00
523751dc82
Feature: Support workflow event dispatch via API ( #32059 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
ref: https://github.com/go-gitea/gitea/issues/31765
---------
Signed-off-by: Bence Santha <git@santha.eu >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Christopher Homberger <christopher.homberger@web.de >
2025-02-10 05:23:57 +08:00