summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Don't stack PR tab menu on small screens (#25789)sebastian-sauer2023-07-142-22/+32
| | | | | | | | | | | | | | | the stacking takes up screen space - display the tabs as the navigation bar. github uses the same layout. Screenshots (left before, right after): ![image](https://github.com/go-gitea/gitea/assets/1135157/d7e2aaec-c67b-403d-8d56-d4c824b04eed) ![image](https://github.com/go-gitea/gitea/assets/1135157/9e150881-c265-4074-afd7-407bb52e1934) Large screen: ![image](https://github.com/go-gitea/gitea/assets/1135157/d5cbdaa3-2962-4c4f-9595-5938981ff99e)
* Link to list of vulnerabilities (#25872)M Hickford2023-07-141-0/+2
|
* [skip ci] Updated translations via CrowdinGiteaBot2023-07-141-1/+21
|
* move issue filters to shared template (#25729)Denys Konovalov2023-07-136-347/+203
| | | | | | | | | | | | | | | | Issue filters are being used on repo list page and on milestone issues page, and the code is mostly duplicated. This PR does the following changes: - move issue filters into a shared template - allow filtering milestone issues by project, so no need to hide this filter on milestone issues page - remove some dead code (e. g. issue actions in milestone issues template) - fix label filter dropdown width --------- Co-authored-by: 6543 <6543@obermui.de>
* [skip ci] Updated translations via CrowdinGiteaBot2023-07-131-0/+90
|
* Remove `git.FileBlame` (#25841)Jason Song2023-07-121-6/+0
| | | | | | | | | | The `FileBlame` function looks strange, it has `revision` as argument but doesn't use it. Since the function never be used, I think we could just remove it. If anyone thinks it should be kept, please help fix `revision`. Co-authored-by: Giteabot <teabot@gitea.io>
* Fix empty project displayed in issue sidebar (#25802)yp053272023-07-125-11/+53
| | | | | | | | | | | | | | | | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/1ab476dc-2f9b-4c85-9e87-105fc73af1ee) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/786f984d-5c27-4eff-b3d9-159f68034ce4) This issue comes from the change in #25468. `LoadProject` will always return at least one record, so we use `ProjectID` to check whether an issue is linked to a project in the old code. As other `issue.LoadXXX` functions, we need to check the return value from `xorm.Session.Get`. In recent unit tests, we only test `issueList.LoadAttributes()` but don't test `issue.LoadAttributes()`. So I added a new test for `issue.LoadAttributes()` in this PR. --------- Co-authored-by: Denys Konovalov <privat@denyskon.de>
* Update blog links (#25843)HesterG2023-07-128-9/+9
| | | | | | | | As title. Permalinks for lastest version of blog has changed, update the blog links. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix margin on the `new/edit milestone` page (#25801)puni98692023-07-121-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is some distortion in desktop and mobile ui for new/edit milestone page. Fixing the new/edit milestone page for desktop and mobile ui Design background https://uxplanet.org/primary-secondary-action-buttons-c16df9b36150 https://balsamiq.com/learn/articles/button-design-best-practices/ <details> <summary>Screen shots</summary> Before: ![image](https://github.com/go-gitea/gitea/assets/80308335/c8627679-da2d-465f-bc8f-978d7b836919) ![image](https://github.com/go-gitea/gitea/assets/80308335/43b54599-2856-440a-a13c-08bb3cedf35c) After ![image](https://github.com/go-gitea/gitea/assets/80308335/85ca3d32-4842-41bc-8647-aa4222b9cc06) ![image](https://github.com/go-gitea/gitea/assets/80308335/c00e87c4-e64e-4b18-aa42-d26c3942a21b) </details> --------- Co-authored-by: Denys Konovalov <privat@denyskon.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Do not "guess" the file encoding/BOM when using API to upload files (#25828)wxiaoguang2023-07-121-102/+3
| | | | | | | | Related issue: #18368 It doesn't seem right to "guess" the file encoding/BOM when using API to upload files. The API should save the uploaded content as-is.
* [skip ci] Updated translations via CrowdinGiteaBot2023-07-121-17/+221
|
* Show correct SSL Mode on "install page" (#25818)wxiaoguang2023-07-112-3/+4
|
* Fix incorrect oldest sort in project list (#25806)yp053272023-07-115-15/+64
| | | | sort type `oldest` should be `Asc`. Added a test for this.
* Fix the error message when the token is incorrect (#25701)caicandong2023-07-113-24/+52
| | | | | | | | | | | | | | | we refactored `userIDFromToken` for the token parsing part into a new function `parseToken`. `parseToken` returns the string `token` from request, and a boolean `ok` representing whether the token exists or not. So we can distinguish between token non-existence and token inconsistency in the `verfity` function, thus solving the problem of no proper error message when the token is inconsistent. close #24439 related #22119 --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Exclude default branch from pushed branch hint (#25795)Lunny Xiao2023-07-102-2/+4
| | | | | | | | When pushing to default branch, no pushing hint should be prompt. Fix #25778 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* 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>