aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* For API attachments, use API URL (#25639)Lunny Xiao2023-07-1019-67/+108
| | | | | | | Fix #25257 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix WORK_DIR for docker (root) image (#25738)wxiaoguang2023-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #25726 #17846 chose an incorrect WORK_DIR path for docker root image. Gitea's work-path was already used as the base path for various paths (like AppDataPath), so, the work-path should be mounted to a volume in a docker image. Now, for docker root image, it's unavoidable to mix the WorkPath/CustomPath/AppDataPath in the same directory ("/data/gitea"), because some of them have already been mixed. Some directories in the screenshot are for "CustomPath" , while others are for "AppDataPath", due to the technical debts in old code: ``` CUSTOM_PATH="/data/gitea" APP_DATA_PATH = /data/gitea ``` <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/9f0648ac-f731-4a08-9f26-1af01a1824b1) </details> This PR is breaking but this is the only way at the moment to avoid users losing their data accidently Co-authored-by: Giteabot <teabot@gitea.io>
* Avoid amending the Rebase and Fast-forward merge if there is no message ↵wxiaoguang2023-07-102-1/+6
| | | | | | | | | | | | template (#25779) Related #22669. Close #25177 After the fix: ![image](https://github.com/go-gitea/gitea/assets/2114189/0e900927-ea72-4f8f-bde6-5ed927cb02f4) Co-authored-by: Giteabot <teabot@gitea.io>
* Show edit title button on commits tab of PR, too (#25791)sebastian-sauer2023-07-101-0/+3
| | | | | | | | | | | | | | | | | | | | | All 3 tabs of the PR (Conversation, Commits and Files changed) should show the edit title button. Before this commit the edit button was not shown on commits tab Screenshots: After: ![image](https://github.com/go-gitea/gitea/assets/1135157/d04c700c-dffc-4bcd-8108-cb64838af0c6) Before: ![image](https://github.com/go-gitea/gitea/assets/1135157/b6795ad3-c994-461c-98aa-a7331c3e3877) Just for reference the edit button in files changed tab: ![image](https://github.com/go-gitea/gitea/assets/1135157/5750640d-489f-4a71-8144-543ef42afb42) Co-authored-by: Giteabot <teabot@gitea.io>
* Make "install page" respect environment config (#25648)wxiaoguang2023-07-0913-72/+86
| | | | | | | | | | | | | | | | | | | | | | | | | Replace #25580 Fix #19453 The problem was: when users set "GITEA__XXX__YYY" , the "install page" doesn't respect it. So, to make the result consistent and avoid surprising end users, now the "install page" also writes the environment variables to the config file. And, to make things clear, there are enough messages on the UI to tell users what will happen. There are some necessary/related changes to `environment-to-ini.go`: * The "--clear" flag is removed and it was incorrectly written there. The "clear" operation should be done if INSTALL_LOCK=true * The "--prefix" flag is removed because it's never used, never documented and it only causes inconsistent behavior. ![image](https://github.com/go-gitea/gitea/assets/2114189/12778ee4-3fb5-4664-a73a-41ebbd77cd5b)
* Enable H014 and H023 djlint rules (#25786)silverwind2023-07-0910-23/+3
| | | | | | | | | | | | Enable these rules: - H014 | More than 2 blank lines. - H023 | Do not use entity references. There are more potential rules to enable but they are blocked by bugs in the linter: - https://github.com/Riverside-Healthcare/djLint/issues/711 - https://github.com/Riverside-Healthcare/djLint/issues/712
* Restructure issue list template, styles (#25750)Denys Konovalov2023-07-095-148/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR does various modifications on the issue list shared template: - restructure layout to achieve better responsiveness - fix various style issues - restructure styles (better result with less code :) - remove numerous `gt-*` patches and other unneeded classes -> use existing css classes <details> <summary>Before:</summary> ![Bildschirmfoto vom 2023-07-07 14-35-00](https://github.com/go-gitea/gitea/assets/47871822/5301fc80-d58b-41c2-8090-5867e2e8459c) ![Bildschirmfoto vom 2023-07-07 14-35-19](https://github.com/go-gitea/gitea/assets/47871822/d36ab691-7dc4-44bb-a8f6-a4105a2a6777) ![Bildschirmfoto vom 2023-07-07 14-35-43](https://github.com/go-gitea/gitea/assets/47871822/0762c852-eb40-4b00-8757-c5dbfd2ae569) </details> <details> <summary>After:</summary> ![Bildschirmfoto vom 2023-07-07 14-32-04](https://github.com/go-gitea/gitea/assets/47871822/0ac42d36-f98f-451a-b556-70c913d19df8) ![Bildschirmfoto vom 2023-07-07 14-31-32](https://github.com/go-gitea/gitea/assets/47871822/520fac9c-33e3-4290-bfe1-6e941f1100f8) ![Bildschirmfoto vom 2023-07-07 14-31-14](https://github.com/go-gitea/gitea/assets/47871822/05ad46bb-3c67-403d-85b8-d12d64f99c59) </details> --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix notification list bugs (#25781)wxiaoguang2023-07-094-4/+4
| | | | | | | | | Fix #25627 1. `ctx.Data["Link"]` should use relative URL but not AppURL 2. The `data-params` is incorrect because it doesn't contain "page". JS can simply use "window.location.search" to construct the AJAX URL 3. The `data-xxx` and `id` in notification_subscriptions.tmpl were copied&pasted, they don't have affect.
* Revert package access change from #23879 (#25707)KN4CK3R2023-07-098-28/+385
| | | | | | | | | | | | | | | | | | | | | Fixes (?) #25538 Fixes https://codeberg.org/forgejo/forgejo/issues/972 Regression #23879 #23879 introduced a change which prevents read access to packages if a user is not a member of an organization. That PR also contained a change which disallows package access if the team unit is configured with "no access" for packages. I don't think this change makes sense (at the moment). It may be relevant for private orgs. But for public or limited orgs that's useless because an unauthorized user would have more access rights than the team member. This PR restores the old behaviour "If a user has read access for an owner, they can read packages". --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Make route middleware/handler mockable (#25766)wxiaoguang2023-07-093-4/+145
| | | | | | | | | | | | | | | | | | To mock a handler: ```go web.RouteMock(web.MockAfterMiddlewares, func(ctx *context.Context) { // ... }) defer web.RouteMockReset() ``` It helps: * Test the middleware's behavior (assert the ctx.Data, etc) * Mock the middleware's behavior (prepare some context data for handler) * Mock the handler's response for some test cases, especially for some integration tests and e2e tests.
* Update tool dependencies, lock govulncheck and actionlint (#25655)silverwind2023-07-0926-141/+133
| | | | | | | | | | - Update all tool dependencies - Lock `govulncheck` and `actionlint` to their latest tags --------- Co-authored-by: 6543 <m.huber@kithara.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Test if container blob is accessible before mounting (#22759)KN4CK3R2023-07-093-8/+72
| | | | | | | | | | related #16865 This PR adds an accessibility check before mounting container blobs. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
* 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-071-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-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).