summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Always pass 6-digit hex color to monaco (#25780)silverwind2023-07-097-55/+33
| | | | | | | | | | | | Monaco can not deal with color formats other than 6-digit hex, so we convert the colors for it via new [`tinycolor2`](https://github.com/bgrins/TinyColor) dependency (5kB minzipped). Also, with the addition of the module, we can replace the existing `hexToRGBColor` usage, I verified it is compatible with the current tests before removing the function. Fixes: https://github.com/go-gitea/gitea/issues/25770
* Fix the wrong default branch name displayed by checkout (#25777)hiifong2023-07-091-1/+1
| | | | | | | | | | | Related: #22743 Before: ![image](https://github.com/go-gitea/gitea/assets/89133723/3cec886c-589c-41a8-86af-a08b62b8adef) After: ![image](https://github.com/go-gitea/gitea/assets/89133723/74ee8adf-fca7-42a0-a67a-ecaa0ba91b4a)
* Tweak repo topics bar (#25769)silverwind2023-07-082-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Minor tweaks to repo topics: - Use gap instead of margin to align "Manage Topics" when no topics present - Add margin to description instead Before: <img width="1232" alt="Screenshot 2023-07-08 at 13 08 15" src="https://github.com/go-gitea/gitea/assets/115237/a5d3586c-6cbf-4b74-8137-11d91f2cbb45"> <img width="1233" alt="Screenshot 2023-07-08 at 13 08 05" src="https://github.com/go-gitea/gitea/assets/115237/59b18d93-e4cb-4f2b-9bc2-d6aa63f93827"> After: <img width="1232" alt="Screenshot 2023-07-08 at 13 08 42" src="https://github.com/go-gitea/gitea/assets/115237/470d42ad-3f7e-40f9-b0a1-203b4af77eb9"> <img width="1231" alt="Screenshot 2023-07-08 at 13 08 32" src="https://github.com/go-gitea/gitea/assets/115237/42d18048-748c-4a3f-ab89-3403866cef34"> ---------
* docs: rootless docker ssh's default port is 2222 (#25771)leavesster2023-07-081-1/+1
|
* Repository Archived text title center align (#25767)puni98692023-07-086-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Archive text title center align <details> <summary>Screen shots</summary> Before ![image](https://github.com/go-gitea/gitea/assets/80308335/90182367-4d06-4fc8-b7aa-21c21225d2bd) After ![image](https://github.com/go-gitea/gitea/assets/80308335/3dcc0d0d-75f4-415d-afbf-03921075b4db) ![image](https://github.com/go-gitea/gitea/assets/80308335/317d74f8-0ae9-4dc7-9508-1833d2d4f327) BTW On github ![image](https://github.com/go-gitea/gitea/assets/80308335/1801fd2d-1803-4ee6-8856-ef2f623df2b4) </details> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Update JS dependencies, misc tweaks (#25768)silverwind2023-07-084-303/+690
| | | | | | - Update all JS dependencies minus stylelint because of https://github.com/elirasza/stylelint-stylistic/issues/12 - Misc tweaks to eslint and stylelint configs - Tested Monaco and Mermaid
* Clarify "text-align" CSS helpers, fix clone button padding (#25763)wxiaoguang2023-07-0811-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: * Rename gt-tl/gt-tc/gt-tr to gt-text-left/gt-text-center/gt-text-right * The gt-ab and gt-br-0 are removed because they are not needed anymore * Fix the clone dropdown button padding by ":not(.icon)" Before: <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/eb030633-622c-4ca7-8e88-ce010d9f51a6) </details> After: <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/64c09403-bf21-439c-88f1-780b34ccab6b) </details> Fixes #25758 Co-authored-by: Giteabot <teabot@gitea.io>
* Switch to `vite-string-plugin` (#25762)silverwind2023-07-083-39/+12
| | | | | | Switch to [`vite-string-plugin`](https://github.com/silverwind/vite-string-plugin) to load SVGs as string during tests. The plugin will also be useful once we switch to vite.
* Newly pushed branches hints on repository home page (#25715)Lunny Xiao2023-07-087-2/+61
| | | | | | | | | | | | | This PR will display a pull request creation hint on the repository home page when there are newly created branches with no pull request. Only the recent 6 hours and 2 updated branches will be displayed. Inspired by #14003 Replace #14003 Resolves #311 Resolves #13196 Resolves #23743 co-authored by @kolaente
* Translate untranslated string in issues list (#25759)Maxim Slipenko2023-07-081-1/+1
|
* Fix `ref` for workflows triggered by `pull_request_target` (#25743)Zettat1232023-07-074-11/+16
| | | | | | | | | | Follow #25229 At present, when the trigger event is `pull_request_target`, the `ref` and `sha` of `ActionRun` are set according to the base branch of the pull request. This makes it impossible for us to find the head branch of the `ActionRun` directly. In this PR, the `ref` and `sha` will always be set to the head branch and they will be changed to the base branch when generating the task context.
* Minify CSS with Lightning CSS (#25754)silverwind2023-07-073-1/+214
| | | | | | | | | | | | | | Replace esbuild's rudimentary CSS minifier with [Lightning CSS](https://github.com/parcel-bundler/lightningcss), which results in around 4% smaller CSS bundle size, index.css goes from 608K to 584K. The module is quite new but has active use in the Parcel bundler, and as of yesterday is also under experimental support in Vite, so I trust it that bugs will be sorted out quickly. Before: `assets by path css/*.css 959 KiB` After: `assets by path css/*.css 933 KiB` I did give this a cursory test and everything seems to be in order.
* Reformat some templates (#25756)wxiaoguang2023-07-076-426/+425
| | | Only: indent/dedent/newline
* Add open/closed field support for issue index (#25708)techknowlogick2023-07-0712-36/+51
| | | | | | A couple of notes: * Future changes should refactor arguments into a struct * This filtering only is supported by meilisearch right now * Issue index number is bumped which will cause a re-index
* Fix activity type match in `matchPullRequestEvent` (#25746)Zettat1232023-07-072-33/+55
| | | | | | | | | | | | | | | | | | Fix #25736 Caused by #24048 Right now we only check the activity type for `pull_request` event when `types` is specified or there are no `types` and filter. If a workflow only specifies filters but no `types` like this: ``` on: pull_request: branches: [main] ``` the workflow will be triggered even if the activity type is not one of `[opened, reopened, sync]`. We need to check the activity type in this case. Co-authored-by: Giteabot <teabot@gitea.io>
* Following up fixes for "Fix inconsistent user profile layout across tabs" ↵wxiaoguang2023-07-075-28/+19
| | | | | | | | | | | | | | | | | | | | | | | | | (#25739) Follow https://github.com/go-gitea/gitea/pull/25625#issuecomment-1621577816 1. Fix the incorrect "project view" layout 2. Fix the "follow/unfollow" link on "packages" and "projects" tab Before: ![image](https://github.com/go-gitea/gitea/assets/2114189/3b071235-c186-4097-8a19-dd90dcb2a344) After: ![image](https://github.com/go-gitea/gitea/assets/2114189/d1d23cd7-28d8-43e3-9f68-03e8a34a9b97) --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Hide `add file` button for pull mirrors (#25748)hiifong2023-07-071-1/+1
| | | | | | | | | | | I think hiding the add file button for mirror repositories that can keep the ui clean. Before: ![image](https://github.com/go-gitea/gitea/assets/89133723/84ecf1a5-1a92-4bb1-b472-b4988a4441a9) After: ![image](https://github.com/go-gitea/gitea/assets/89133723/95382e73-286b-4114-9997-456ed77e07ca)
* Apply to became a maintainer. (#25745)puni98692023-07-071-0/+1
| | | | | | | | | | Hi Gitea Team, 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 PRs for the beginning in my free time and contribute in frontend, backend tasks and new proposals. Here is my PR list:- https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3Apuni9869+is%3Amerged+
* Fix broken translations for package documantion (#25742)wxiaoguang2023-07-0724-44/+24
| | | | | | | | | | | | | | | | | | | | | | | The code was just copied&pasted, it causes problems now. There are a lot (for every package) broken translations. eg: ``` # en-US conda.documentation = For more information on the Conda registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. # fr-FR (and many languages) conda.documentation=Pour plus d'informations sur le registre Conda, voir <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/fr-fr/packages/conda/">la documentation</a>. ``` To resolve the problem fundamentally, use a general string, and trigger the re-translating on Crowdin side. And, it should really really really avoid introducing too much copied&pasted code .......
* 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-051-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-044-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>