aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [skip ci] Updated licenses and gitignoresGiteaBot2024-04-222-0/+42
|
* Use correct hash for "git update-index" (#30626)wxiaoguang2024-04-221-5/+8
|
* Fix repo home UI when there is no repo description (#30552)wxiaoguang2024-04-214-55/+17
| | | | | | Fix #30502 by a new approach. ![image](https://github.com/go-gitea/gitea/assets/2114189/22f48bca-82d1-45cc-b1b7-ee2344b81a76)
* Fix dropdown text ellipsis (#30628)wxiaoguang2024-04-212-10/+4
| | | | | | | | | | | | | Follow https://github.com/go-gitea/gitea/pull/30547#discussion_r1573866519 Fix #30624 The Fomantic UI Dropdown wasn't designed to work that way, its "text" element might contain images. So the "overflow" shouldn't be added to any general dropdown text. ![image](https://github.com/go-gitea/gitea/assets/2114189/f6ceaabd-bc89-4bf2-baa2-a6f0324c1962)
* fix(api): refactor branch and tag existence checks (#30618)Bo-Yi Wu2024-04-221-5/+4
| | | | | | | | | | | | - Update branch existence check to also include tag existence check - Adjust error message for branch/tag existence check ref: https://github.com/go-gitea/gitea/pull/30349 --------- Signed-off-by: appleboy <appleboy.tw@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Add --skip-db option to dump command (#30613)Kemal Zebari2024-04-211-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempts to resolve #28720. --- Note that I am not a Gitea administrator so I don't normally use the gitea CLI. Just saw this issue and wanted an opportunity to understand how this subcommand works and see if I can add this feature :^) I tested both with `--skip-db` and without and it appears to not add any database-specific files to the generated archive i.e. I don't see a `gitea-db.sql` or `gitea.db` file: ```console $ TAGS="bindata sqlite sqlite_unlock_notify" make backend Running go generate... bindata for migration already up-to-date bindata for options already up-to-date bindata for public already up-to-date bindata for templates already up-to-date $ ./gitea dump --skip-db 2024/04/20 01:16:11 ...s/setting/session.go:77:loadSessionFrom() [I] Session Service Enabled 2024/04/20 01:16:11 ...s/storage/storage.go:176:initAttachments() [I] Initialising Attachment storage with type: local 2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/attachments 2024/04/20 01:16:11 ...s/storage/storage.go:166:initAvatars() [I] Initialising Avatar storage with type: local 2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/avatars 2024/04/20 01:16:11 ...s/storage/storage.go:192:initRepoAvatars() [I] Initialising Repository Avatar storage with type: local 2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/repo-avatars 2024/04/20 01:16:11 ...s/storage/storage.go:186:initLFS() [I] Initialising LFS storage with type: local 2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/lfs 2024/04/20 01:16:11 ...s/storage/storage.go:198:initRepoArchives() [I] Initialising Repository Archive storage with type: local 2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/repo-archive 2024/04/20 01:16:11 ...s/storage/storage.go:208:initPackages() [I] Initialising Packages storage with type: local 2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/packages 2024/04/20 01:16:11 ...s/storage/storage.go:219:initActions() [I] Initialising Actions storage with type: local 2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/actions_log 2024/04/20 01:16:11 ...s/storage/storage.go:223:initActions() [I] Initialising ActionsArtifacts storage with type: local 2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/actions_artifacts 2024/04/20 01:16:11 cmd/dump.go:172:runDump() [I] Dumping local repositories... /workspaces/gitea/data/gitea-repositories 2024/04/20 01:16:11 cmd/dump.go:195:runDump() [I] Skipping database 2024/04/20 01:16:11 cmd/dump.go:229:runDump() [I] Adding custom configuration file from /workspaces/gitea/custom/conf/app.ini 2024/04/20 01:16:11 cmd/dump.go:256:runDump() [I] Packing data directory.../workspaces/gitea/data 2024/04/20 01:16:11 cmd/dump.go:335:runDump() [I] Finish dumping in file /workspaces/gitea/gitea-dump-1713575771.zip $ unzip /workspaces/gitea/gitea-dump-1713575771.zip -d example Archive: /workspaces/gitea/gitea-dump-1713575771.zip . . . $ ls example/ app.ini custom data repos $ ls example/data/ actions_artifacts actions_log avatars home indexers jwt queues repo-archive repo-avatars tmp ``` Co-authored-by: Giteabot <teabot@gitea.io>
* Fix flash on dashboard (#30572)silverwind2024-04-212-1/+7
| | | | Fixes https://github.com/go-gitea/gitea/issues/30566, regression from https://github.com/go-gitea/gitea/pull/30214.
* chore: use errors.New to replace fmt.Errorf with no parameters will much ↵Cheng2024-04-2110-15/+21
| | | | | better (#30621) use errors.New to replace fmt.Errorf with no parameters will much better
* Fix issue comment form and quick-submit (#30623)wxiaoguang2024-04-227-38/+37
| | | | 1. Rewrite initGlobalEnterQuickSubmit (by the way, remove jQuery) 2. Fix issue comment form layout
* Use maintained gziphandler (#30592)Lunny Xiao2024-04-215-22/+27
| | | | | | | | Replace #27894 --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-211-10/+21
|
* Fix package list performance (#30520)KN4CK3R2024-04-201-11/+11
| | | | | | | | | Fixes #28255 The new query uses the id field to sort by "newer". This most not be correct (usually it is) but it's faster (see #28255). If someone has a better idea, please propose changes. Co-authored-by: Giteabot <teabot@gitea.io>
* Clarify permission "HasAccess" behavior (#30585)wxiaoguang2024-04-2013-41/+96
| | | | | | | | | | | | | | | Follow #30495 "HasAccess" behavior wasn't clear, to make it clear: * Use a new name `HasAnyUnitAccess`, it will be easier to review related code and permission problems. * Separate everyone access mode to a separate field, then all calls to HasAccess are reverted to old behavior before #30495. * Add new tests. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix links in PyPI Simple Repository API page (#30594)wxiaoguang2024-04-202-3/+4
| | | | | | | | | | | | | | | Thanks to @Zottelchen for looking into problem and proposing the fix. Ref: https://github.com/astral-sh/uv/issues/3017 , https://peps.python.org/pep-0503/ This PR's change is from Zottelchen's work. And I by the way rename the `$p` to `$pd` because `p` is used as "package" in code, while `pd` is used as "package description". ---- Co-authored-by: Zottelchen
* Use action user as the trigger user of schedules (#30581)yp053272024-04-201-2/+7
| | | | | | | | | | | | | | | | | Follow https://github.com/go-gitea/gitea/pull/30357 When user push to default branch, the schedule trigger user will be the user. When disable then enable action units in settings, the schedule trigger user will be action user. When repo is a mirror, the schedule trigger user will be action user. ( before it will return error, fixed by #30357) As scheduled job is a cron, the trigger user should be action user from Gitea, not a real user. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix commit file status parser (#30602)wxiaoguang2024-04-191-1/+1
| | | Try to fix #30492
* Fix HEAD method for robots.txt (#30603)wxiaoguang2024-04-191-1/+1
| | | Fix #30601
* Fix project description rendering for org (#30587)wxiaoguang2024-04-191-2/+2
| | | | | | | | Fix #30263 ![image](https://github.com/go-gitea/gitea/assets/2114189/41cabe6c-f94a-4874-a26f-d01bb89bb28c) Co-authored-by: Giteabot <teabot@gitea.io>
* Fix changelog (main) (#30582)wxiaoguang2024-04-192-5216/+5365
| | | | | 1. The 1.21.11 changelog is missing 2. Split the old content to CHANGELOG-archived.md, to reduce the size of CHANGELOG.md
* Avoid importing `modules/web/middleware` in `modules/session` (#30584)Jason Song2024-04-192-10/+18
| | | | | | | | | | | | Related to #30375. It doesn't make sense to import `modules/web/middleware` and `modules/setting` in `modules/web/session` since the last one is more low-level. And it looks like a workaround to call `DeleteLegacySiteCookie` in `RegenerateSession`, so maybe we could reverse the importing by registering hook functions.
* Enable npm cache on `setup-node` action (#30577)silverwind2024-04-195-0/+16
| | | | | Enable npm dependency cache in [setup-node](https://github.com/actions/setup-node). This should work reliably and across branches as well.
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-194-0/+165
|
* Mock queue backoff duration (#30553)wxiaoguang2024-04-182-1/+10
| | | | During testing, the backoff duration shouldn't be longer than other durations
* Improve "Reference in new issue" modal (#30547)silverwind2024-04-182-18/+23
| | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/29994 Also some misc enhancements done to the form in the modal. <img width="840" alt="Screenshot 2024-04-17 at 23 02 55" src="https://github.com/go-gitea/gitea/assets/115237/e71fba55-55cd-4e48-a497-6b1025c36a43">
* Add a few root files to lint-spell (#30530)silverwind2024-04-182-38/+38
| | | Files in root were not linted, add them. No new violations.
* Refactor and fix archive link bug (#30535)wxiaoguang2024-04-192-32/+26
| | | | | | | | Regression of #29920 Fixes: #30569 Also this is a rewriting to eliminate the remaining jQuery usages from code. Co-authored-by: Giteabot <teabot@gitea.io>
* Fixup app.example.ini for task section, which is now queue.task (#30555)Jerry Jacobs2024-04-183-33/+0
| | | | | | | Config section `[task]` has been deprecated in favor of `[queue.task]` --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Some following up changes for routes (#30550)wxiaoguang2024-04-181-5/+3
| | | | 1. Switch back to the old order for `reqRepoAdmin, context.RepoRef()` 2. Add a routing function info for global NotFound
* Add form field id generation, remove duplicated ids (#30546)silverwind2024-04-185-23/+40
| | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30384 On repo settings page, there id `repo_name` was used 5 times on the same page, some in modal and such. I think we are better off just auto-generating these IDs in the future so that labels link up with their form element. Ideally this id generation would be done in backend in a subtemplate, but seeing that we already have similar JS patches for checkboxes, I took the easy path for now. I also checked that these `#repo_name` were not in use in JS and the only case where this id appears in JS is on the migration page where it's still there. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix border-radius on view, blame and code search (#30545)silverwind2024-04-184-5/+5
| | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30540 1. Fix all these boxes by adding `bottom attached` and removing a problematic CSS rule: <img width="1319" alt="Screenshot 2024-04-17 at 22 25 31" src="https://github.com/go-gitea/gitea/assets/115237/346445a4-4944-4003-a1ef-6f5b0eda624e"> <img width="643" alt="Screenshot 2024-04-17 at 22 21 18" src="https://github.com/go-gitea/gitea/assets/115237/10f17ed3-9ad6-48de-92fa-bac6621815b9"> 2. Change the "last commit" box to `ui segment` which has correct border-radius. Also included is a tiny tweak to make author name ellipse instead of wrap. <img width="1331" alt="Screenshot 2024-04-17 at 22 23 23" src="https://github.com/go-gitea/gitea/assets/115237/285fbd45-ced0-4d33-abe3-7384ffa03188"> Co-authored-by: Giteabot <teabot@gitea.io>
* Disable enter key for accepting code completion in Monaco (#30548)silverwind2024-04-181-0/+4
| | | | | | Fixes https://github.com/go-gitea/gitea/issues/28114 and behaviour matches vscode on desktop as well. Co-authored-by: Giteabot <teabot@gitea.io>
* Add an api test for updating user (#30539)Lunny Xiao2024-04-181-0/+25
| | | Fix #30518
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-1825-88/+0
|
* Expose fuzzy search for issues/pulls (#29701)65432024-04-185-26/+38
| | | | | | | | close #29685 --------- Signed-off-by: 6543 <6543@obermui.de> Co-authored-by: silverwind <me@silverwind.io>
* Allow everyone to read or write a wiki by a repo unit setting (#30495)wxiaoguang2024-04-1724-128/+319
| | | | | Replace #6312 Help #5833 Wiki solution for #639
* Support nuspec manifest download for nuget packages (#28921)Michael Kriese2024-04-173-35/+95
| | | | | | | | | | | | | | | | Support downloading nuget nuspec manifest[^1]. This is useful for renovate because it uses this api to find the corresponding repository - Store nuspec along with nupkg on upload - allow downloading nuspec - add doctor command to add missing nuspec files [^1]: https://learn.microsoft.com/en-us/nuget/api/package-base-address-resource#download-package-manifest-nuspec --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix branch_protection api shows users/teams who has no readAccess (#30291)Edward Zhang2024-04-172-25/+39
| | | | | | | | | | | | Add some logic in `convert.ToBranchProtection` to return only the names associated with readAccess instead of returning all names. This will ensure consistency in behavior between the frontend and backend. Fixes: #27694 --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-authored-by: wenzhuo.zhang <wenzhuo.zhang@geely.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Correct locale string rendering (#30522)wxiaoguang2024-04-172-5/+5
| | | | | | | | Since #29165, the translations are rendered as HTML in templates, so: 1. if the translation does contain `<>`, use `TrString` 2. use `{dummy}` instead of `<dummy>` as much as possible Co-authored-by: Giteabot <teabot@gitea.io>
* Run `go generate` and `go vet` on all packages (#30529)silverwind2024-04-176-11/+9
| | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30512 I think this does mean those tools would run on a potential `vendor` directory, but I'm not sure we really support vendoring of dependencies anymore. `release` has a `vendor` prerequisite so likely the source tarballs contain vendor files?
* Fix and tweak pull request commit list (#30528)silverwind2024-04-172-27/+26
| | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30493, regression from https://github.com/go-gitea/gitea/pull/30374. Also did the flexbox convertion as suggested by the existing comment. <img width="850" alt="Screenshot 2024-04-16 at 22 28 48" src="https://github.com/go-gitea/gitea/assets/115237/e8905944-620a-4211-b5c5-53ed3b3ee23e"> Co-authored-by: Giteabot <teabot@gitea.io>
* Refactor web routes (#30519)wxiaoguang2024-04-1723-374/+391
| | | | | | | Re-organize the routes in web.go and use ctx constants instead of `context.UnitTypes()` --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix install page checkboxes and dropdown width (#30526)silverwind2024-04-171-1/+2
| | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30523 1. Fix checkbox rendering 2. Fix width of selection dropdowns (was too small) --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Reduce unnecessary database queries on actions table (#30509)Lunny Xiao2024-04-171-0/+6
|
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-171-0/+41
|
* Tweak and fix toggle checkboxes (#30527)silverwind2024-04-171-9/+10
| | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30524. Slightly restyled them so that the "knob" is contained inside the background. <img width="179" alt="Screenshot 2024-04-16 at 21 58 09" src="https://github.com/go-gitea/gitea/assets/115237/be94517b-9cb7-46e2-ae96-fcf6767ce4ba"> <img width="187" alt="Screenshot 2024-04-16 at 21 58 50" src="https://github.com/go-gitea/gitea/assets/115237/c13a1959-5c5a-4e88-9225-e5f6fb72e3e0">
* Tweak repo buttons on mobile and labeled button border-radius (#30503)silverwind2024-04-166-26/+40
| | | | | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30514 Fixes: https://github.com/go-gitea/gitea/pull/30288#issuecomment-2057466623 - Fix border-radius regression from https://github.com/go-gitea/gitea/pull/30475 - Fix and simplify hover state - Move the modal HTML so it does not interfere with the CSS - Make the star and unwatch text show on mobile. There is still plenty of space, below is iPhone 12 viewport size <img width="696" alt="Screenshot 2024-04-15 at 20 34 03" src="https://github.com/go-gitea/gitea/assets/115237/af90bb00-4671-4973-a255-8eb44ee6ba8d"> <img width="230" alt="Screenshot 2024-04-15 at 20 31 42" src="https://github.com/go-gitea/gitea/assets/115237/986ef533-7a01-4bb0-8dcd-fd19e4259e84"> <img width="233" alt="Screenshot 2024-04-15 at 20 31 47" src="https://github.com/go-gitea/gitea/assets/115237/5b825dd8-0ccc-4d56-9d8f-774abb935b68"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix long branch name overflows (#30345)silverwind2024-04-168-30/+29
| | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/27971 Fixes: https://github.com/go-gitea/gitea/pull/28010 <img width="689" alt="Screenshot 2024-04-09 at 00 19 57" src="https://github.com/go-gitea/gitea/assets/115237/7c895a47-274f-40a6-a126-290658f1982d"> Also fixes a similar issue in issue list where CSS was there but not active because of missing `display: block`. <img width="372" alt="Screenshot 2024-04-09 at 00 18 25" src="https://github.com/go-gitea/gitea/assets/115237/cfbee7cd-2e15-4ac7-96ce-020816f48798">
* Update API to return 'source_id' for users (#29718)Tobias Balle-Petersen2024-04-163-0/+9
| | | | | | | Using the API, a user's _source_id_ can be set in the _CreateUserOption_ model, but the field is not returned in the _User_ model. This PR updates the _User_ model to include the field _source_id_ (The ID of the Authentication Source).
* Allow `preferred_username` as username source for OIDC (#30454)SimonErm2024-04-164-4/+15
| | | | | | This PR adds the preferred_username claim as a possible username source for the oauth2_client. Closes #21518
* Fix empty field `login_name` in API response JSON when creating user (#30511)yp053272024-04-161-3/+3
| | | | | Fix #30508 ps: if `sourceID` is not set, `LoginName` will be ignored