summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Less naked returns (#25713)65432023-07-0732-239/+254
| | | | | just a step towards #25655 and some related refactoring
* [skip ci] Updated translations via CrowdinGiteaBot2023-07-071-0/+96
|
* Remove unused code (#25734)KN4CK3R2023-07-062-57/+0
| | | | | The method is only used in the test. Found it because I changed the fixtures and had a hard time fixing this test. My revenge is deleting it.
* Fix commits table regression (#25710)Denys Konovalov2023-07-061-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #25693 The commits table appearance fix in #25634 was incomplete and caused a regression. This PR fixes that issue and removes some unneeded CSS classes because of the proper fix. <details> <summary>Before</summary> ![Bildschirmfoto vom 2023-07-05 19-37-04](https://github.com/go-gitea/gitea/assets/47871822/4f680878-9612-443b-a0a3-b331369c912b) ![Bildschirmfoto vom 2023-07-05 19-38-56](https://github.com/go-gitea/gitea/assets/47871822/8826f246-6bde-4c33-9d10-172d11619908) </details> <details> <summary>After</summary> ![Bildschirmfoto vom 2023-07-05 19-37-44](https://github.com/go-gitea/gitea/assets/47871822/0fe2d2cb-f706-41e0-b341-d1827a64b21a) ![Bildschirmfoto vom 2023-07-05 19-38-08](https://github.com/go-gitea/gitea/assets/47871822/2f29271c-7da5-44d7-bd9a-38a4bfdde219) </details> --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix inconsistent user profile layout across tabs (#25625)puni98692023-07-0630-399/+461
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix ::User Profile Page Project Tab Have Inconsistent Layout and Style Added the big_avator for consistency in the all header_items tabs. Fixes: #24871 > ### Description > in the user profile page the `Packages` and `Projects` tab have small icons for user but other tabs have bigger profile picture with user info: > > ### Screenshots > ### **For Packages And Projects:** > ![image](https://user-images.githubusercontent.com/25511175/240148601-2420d77b-ba25-4718-9ccb-c5d0d95e3079.png) > > ### **For Other Tabs:** > ![image](https://user-images.githubusercontent.com/25511175/240148461-ce9636b3-fe11-4c46-a230-30d83eee5947.png) > ## Before ![image](https://github.com/go-gitea/gitea/assets/80308335/975ad038-07ca-4b10-b75d-ccf259be7b9d) ## After changes Project View <img width="1394" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/95d181d7-8e61-496d-9899-7b825c91ad56"> Packages View <img width="1378" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/7f5fd60f-6b18-4fa8-8c56-7b0d45d1a610"> ## Org view for projects page <img width="1385" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/6400dc89-a5ae-4f0a-831b-5b6efa020d89"> ## Org view for packages page <img width="1387" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/4e1e9ffe-1e4b-4334-8657-de11b5fd31d0"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
* Simplify the LFS GC logger usage (#25717)wxiaoguang2023-07-062-23/+19
| | | | | | | | | Remove unnecessary `if opts.Logger != nil` checks. * For "CLI doctor" mode, output to the console's "logger.Info". * For "Web Task" mode, output to the default "logger.Debug", to avoid flooding the server's log in a busy production instance. Co-authored-by: Giteabot <teabot@gitea.io>
* Allow/fix review (approve/reject) of empty PRs (#25690)sebastian-sauer2023-07-062-170/+164
| | | | | | | | | | | | | | | | | | | | | | | | gitea allows to create empty PRs. Currently when you need approvals for a merge, you have to manually add /files to the url to get to the files tab to approve / reject the PR. This PR allows to open the files tab via the normal tab / link and then fixes the layout of the files tab. **Screenshots:** Before: ![image](https://github.com/go-gitea/gitea/assets/1135157/b5082e5e-8c32-4412-993e-b854905e96d3) After: ![image](https://github.com/go-gitea/gitea/assets/1135157/1f5e056e-396f-4dfb-8d14-e17a2f6495d9) --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Correct permissions for `.ssh` and `authorized_keys` (#25721)Jason Song2023-07-061-1/+9
| | | | | | | | | | | | Set the correct permissions on the .ssh directory and authorized_keys file, or sshd will refuse to use them and lead to clone/push/pull failures. It could happen when users have copied their data to a new volume and changed the file permission by accident, and it would be very hard to troubleshoot unless users know how to check the logs of sshd which is started by s6. Co-authored-by: Giteabot <teabot@gitea.io>
* Sync branches when mirroring (#25722)Lunny Xiao2023-07-062-1/+5
| | | | | | | Caused by #22743 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Disable run user change in installation page (#22499)Lunny Xiao2023-07-062-2/+2
| | | | | | The run user should not be changed on the installation page because it will not be any effect to Gitea. This PR disabled the input box of run user.
* [skip ci] Updated translations via CrowdinGiteaBot2023-07-066-6/+264
|
* Show correct naming for 1 comment (#25704)Earl Warren2023-07-052-1/+2
| | | | | | - Resolves https://codeberg.org/forgejo/forgejo/issues/948 Co-authored-by: Gusted <postmaster@gusted.xyz> Co-authored-by: Giteabot <teabot@gitea.io>
* Check `ctx.Written()` for `GetActionIssue` (#25698)Jason Song2023-07-055-11/+20
| | | | | | | | | Fix #25697. Just avoid panic, maybe there's another bug to trigger this case. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Changelog for v1.19.4 (#25667) (#25709)65432023-07-051-0/+48
| | | frontport #25667
* Remove `feature` label from `feature request` issue template (#25696)Lunny Xiao2023-07-051-1/+1
| | | | We need a feature request process, so when a user submit a feature proposal, it should not be marked as feature before it has been accept.
* Fix tags header and pretty format numbers (#25624)Lunny Xiao2023-07-054-5/+6
| | | This caused by #23465
* Fix position of org follow button (#25688)silverwind2023-07-041-0/+1
| | | | This has recently regressed it seems. Put it back into same position as https://github.com/go-gitea/gitea/pull/24345.
* [skip ci] Updated translations via CrowdinGiteaBot2023-07-053-3/+3
|
* Replace `interface{}` with `any` (#25686)silverwind2023-07-04233-727/+727
| | | | | Result of running `perl -p -i -e 's#interface\{\}#any#g' **/*` and `make fmt`. Basically the same [as golang did](https://github.com/golang/go/commit/2580d0e08d5e9f979b943758d3c49877fb2324cb).
* Several fixes for mobile UI (#25634)Denys Konovalov2023-07-0411-39/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolves #25622 <details> <summary>Screenshots</summary> ![Bildschirmfoto vom 2023-07-02 20-47-34](https://github.com/go-gitea/gitea/assets/47871822/a8a0bff6-9ae3-48f3-b008-00c196a3f8fd) ![Bildschirmfoto vom 2023-07-02 20-47-45](https://github.com/go-gitea/gitea/assets/47871822/172a0021-af74-4690-aa67-0e66688ce733) ![Bildschirmfoto vom 2023-07-02 20-48-37](https://github.com/go-gitea/gitea/assets/47871822/14572ebd-0106-4c8a-ba27-b6b631375ee6) ![Bildschirmfoto vom 2023-07-02 20-49-08](https://github.com/go-gitea/gitea/assets/47871822/7c0ba3aa-1712-482c-aae9-13394dbdaf8a) ![Bildschirmfoto vom 2023-07-02 20-50-28](https://github.com/go-gitea/gitea/assets/47871822/8bd68e26-099a-4abd-8817-16d52af13167) ![Bildschirmfoto vom 2023-07-02 20-51-46](https://github.com/go-gitea/gitea/assets/47871822/3beab8c6-3747-4829-be50-bafaed11000c) ![Bildschirmfoto vom 2023-07-02 20-54-12](https://github.com/go-gitea/gitea/assets/47871822/51f82ef3-a32c-4c27-9056-e8711ed469cc) </details> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Add elapsed time on debug for slow git commands (#25642)Lunny Xiao2023-07-041-1/+9
| | | | | | | | | To record which command is slow, this PR adds a debug log for slow git operations. --------- Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: delvh <dev.lh@web.de>
* some less naked returns (#25682)65432023-07-042-20/+22
| | | fix upcoming lint issues
* Prevent duplicate image loading (#25675)delvh2023-07-041-1/+2
| | | Regression of #25672.
* Add unit test for `HashAvatar` (#25662)Earl Warren2023-07-041-0/+26
| | | | | | | - Add 100% unit test for this function. --------- Co-authored-by: Gusted <postmaster@gusted.xyz>
* Fix the nil pointer when assigning issues to projects (#25665)Zettat1232023-07-042-6/+10
| | | | Fixes #25649 Caused by #25468
* Actions list enhancements (#25601)silverwind2023-07-049-35/+50
| | | | | | | | | | | | Various small enhancements to the actions list. Before and after: <img width="1264" alt="Screenshot 2023-06-30 at 00 11 40" src="https://github.com/go-gitea/gitea/assets/115237/bb4162ee-cdcf-4a73-b05e-f9521562edbb"> <img width="1264" alt="Screenshot 2023-06-30 at 00 09 51" src="https://github.com/go-gitea/gitea/assets/115237/52a70ea9-4bb3-406e-904b-0fdaafde9582"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix issues indexer document mapping (#25619)Jason Song2023-07-041-20/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression of #5363 (so long ago). The old code definded a document mapping for `issueIndexerDocType`, and assigned it to `BleveIndexerData` as its type. (`BleveIndexerData` has been renamed to `IndexerData` in #25174, but nothing more.) But the old code never used `BleveIndexerData`, it wrote the index with an anonymous struct type. Nonetheless, bleve would use the default auto-mapping for struct it didn't know, so the indexer still worked. This means the custom document mapping was always dead code. The custom document mapping is not useless, it can reduce index storage, this PR brings it back and disable default mapping to prevent it from happening again. Since `IndexerData`(`BleveIndexerData`) has JSON tags, and bleve uses them first, so we should use `repo_id` as the field name instead of `RepoID`. I did a test to compare the storage size before and after this, with about 3k real comments that were migrated from some public repos. Before: ```text [ 160] . ├── [ 42] index_meta.json ├── [ 13] rupture_meta.json └── [ 128] store ├── [6.9M] 00000000005d.zap └── [256K] root.bolt ``` After: ```text [ 160] . ├── [ 42] index_meta.json ├── [ 13] rupture_meta.json └── [ 128] store ├── [3.5M] 000000000065.zap └── [256K] root.bolt ``` It saves about half the storage space. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix show more for image on diff page (#25672)HesterG2023-07-041-0/+2
| | | | | | | | | | | | | | Right now when clicking on loadmore on files change page, if the loaded content is image, it will be always in load status: https://github.com/go-gitea/gitea/assets/17645053/39e449b6-067a-474c-9443-9dd98d5bbfe2 This PR fixes this by adding `initImageDiff ` to `onShowMoreFiles ` After: https://github.com/go-gitea/gitea/assets/17645053/87bbb13e-0064-4a6e-a7ad-0f0060eb8bff
* Prevent SVG shrinking (#25652)silverwind2023-07-043-10/+42
| | | | | | | | | | | This will prevent the most common cases of SVG shrinking because lack of space. I evaluated multiple options and this seems to be the one with the least impact in size and processing cost, so I went with it. Unfortunately, CSS can not dynamically convert `16` obtained from `attr()` to `16px`, or else a generic solution for all sizes would have been possible. But a solution is [in sight](https://developer.mozilla.org/en-US/docs/Web/CSS/attr#type-or-unit) with `attr(width px)` but no browser supports it currently.
* Log the real reason when authentication fails (but don't show the user) (#25414)Lunny Xiao2023-07-034-14/+68
|
* Add unit test for repository collaboration (#25640)Earl Warren2023-07-031-0/+88
| | | | | | | | | | | | Add a few extra test cases and test functions for the collaboration model to get everything covered by tests (except for error handling, as we cannot suddenly mock errors from the database). Co-authored-by: Gusted <postmaster@gusted.xyz> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/825 Co-authored-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix UI misalignment on user setting page (#25629)wxiaoguang2023-07-038-83/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #25628 Diff with ignoring space: https://github.com/go-gitea/gitea/pull/25629/files?diff=unified&w=1 The "modal" shouldn't appear between "ui attached segment", otherwise these segments lose margin-top. After the fix: <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/ac15e73d-4ca8-416a-950d-ffc912c6ab61) ![image](https://github.com/go-gitea/gitea/assets/2114189/eb431336-4d21-4e44-8beb-8919595a83c8) ![image](https://github.com/go-gitea/gitea/assets/2114189/dffaed88-5ba2-419d-a241-24cb200f757c) ![image](https://github.com/go-gitea/gitea/assets/2114189/e8c5a03e-e16a-4c94-a1a5-7845d4e1a824) </details>
* [skip ci] Updated translations via CrowdinGiteaBot2023-07-0314-43/+91
|
* Correct translation wrong format (#25643)Lunny Xiao2023-07-031-1/+1
| | | | | | | partially fix #25291 --------- Co-authored-by: Lauris BH <lauris@nix.lv>
* Add direct serving of package content (#25543)KN4CK3R2023-07-0326-235/+195
| | | | | | | Fixes #24723 Direct serving of content aka HTTP redirect is not mentioned in any of the package registry specs but lots of official registries do that so it should be supported by the usual clients.
* Fix bug when change user name (#25637)Lunny Xiao2023-07-031-0/+4
| | | | | Fix #25621 Co-authored-by: Giteabot <teabot@gitea.io>
* Make "cancel" buttons have proper type in modal forms (#25618)wxiaoguang2023-07-034-1/+52
| | | | | | | | | | | Replace #25446, fix #25438 All "cancel" buttons which do not have "type" should not submit the form, should not be triggered by "Enter". This is a complete fix for all modal dialogs. The major change is "modules/aria/modal.js", "devtest" related code is for demo/test purpose.
* Make FindBranches have stable result (#25631)wxiaoguang2023-07-031-6/+2
| | | See the comment
* Display branch commit status (#25608)Lunny Xiao2023-07-033-0/+67
| | | | | | | | | Fix #10388 This PR adds a status icon for every branch which has a status check for the latest commit on branch list page. <img width="1313" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/727cd540-d03a-40c6-a7dd-e87c118af0ac">
* use css on labels (#25626)derelm2023-07-031-1/+1
| | | | Changes html to use CSS label class similar to `templates/shared/actions/runner_list.tmpl`
* Get latest commit statuses from database instead of git data on dashboard ↵Lunny Xiao2023-07-032-6/+25
| | | | | for repositories (#25605) related #24638
* Add log line anchor for action logs (#25532)HesterG2023-07-031-7/+38
| | | | | | | | | | | | | | | | | | | | | Close #24593 Some behavior: - If log step line in hash exists, expand the step and scroll to the log line. - If step exists but line not exists, the step will be expanded. - If step not exists, stays on the job's page. Some Notes: - Changed mounted to async because need to await for first `loadJob` so `currentJobStepsStates` can be initialized and used in `hashChangeListener `. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Support displaying diff stats in PR tab bar (#25387)hiifong2023-07-034-5/+94
| | | | | | | Fix #25326 --------- Co-authored-by: silverwind <me@silverwind.io>
* [skip ci] Updated licenses and gitignoresGiteaBot2023-07-039-0/+259
|
* Move some files under repo/setting (#25585)Lunny Xiao2023-07-0212-478/+560
| | | | | | There are too many files under `routers/web/repo` and the file `routers/web/repo/setting.go` is too big. This PR move all setting related routers' body functions under `routers/web/repo/setting` and also split `routers/web/repo/setting.go`
* Following-up improvments for various PRs (#25620)wxiaoguang2023-07-013-6/+14
| | | | | | | | For: * #22743 * #25408 * #25412 * #25588
* Set SSH_AUTHORIZED_KEYS_BACKUP to false (#25412)techknowlogick2023-07-011-1/+1
| | | | | | | | | | | This prevents the disk from overflowing with auth keys file Fixes #17117 ## ⚠️ BREAKING This changes the default option for creating a backup of the authorized key file when an update is made to default to false.
* Fix bug of branches API with tests (#25578)Lunny Xiao2023-07-0126-4/+258
| | | | | | | Fix #25558 Extract from #22743 This PR added a repository's check when creating/deleting branches via API. Mirror repository and archive repository cannot do that.
* [skip ci] Updated translations via CrowdinGiteaBot2023-07-011-0/+58
|
* Application as a maintainer (#25614)Denys Konovalov2023-07-011-0/+1
| | | | | | | | Hi everyone, as discussed in `#develop` I would like to apply as a maintainer. I don't have that much in-depth knowledge of the codebase, but I would like to help to review at least smaller PRs for the beginning. Here is my PR list: https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3Adenyskon+is%3Amerged