aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Support storage base path as prefix (#27827)Lunny Xiao2023-11-012-3/+67
| | | | | | This PR adds a prefix path for all minio storage and override base path will override the path. The previous behavior is undefined officially, so it will be marked as breaking.
* Clean up template locale usage (#27856)wxiaoguang2023-10-3110-65/+33
| | | | | | | | | | | | | | | | | After many refactoring PRs for the "locale" and "template context function", now the ".locale" is not needed for web templates any more. This PR does a clean up for: 1. Remove `ctx.Data["locale"]` for web context. 2. Use `ctx.Locale` in `500.tmpl`, for consistency. 3. Add a test check for `500 page` locale usage. 4. Remove the `Str2html` and `DotEscape` from mail template context data, they are copy&paste errors introduced by #19169 and #16200 . These functions are template functions (provided by the common renderer), but not template data variables. 5. Make email `SendAsync` function mockable (I was planning to add more tests but it would make this PR much too complex, so the tests could be done in another PR)
* Fix package webhook (#27839)Lunny Xiao2023-10-3114-1/+97
| | | | | | | Fix #23742 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Add user secrets API integration tests (#27832)Jean-Baptiste Gomond2023-10-311-0/+98
| | | | Adds the missing user secrets API integration tests so #27829 does not happen again
* Fix wrong relative path on obtain token from command line (#27850)Lunny Xiao2023-10-302-1/+3
| | | Caused by #27845
* doc: actions/act-runner: document obtaining a runner registration token from ↵nodiscc2023-10-301-0/+6
| | | | gitea CLI (#27845)
* Fix/upload artifact error windows (#27802)FuXiaoHei2023-10-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From issue https://github.com/go-gitea/gitea/issues/27314 When act_runner in `host` mode on Windows. `upload_artifact@v3` actions use `path.join` to generate `itemPath` params when uploading artifact chunk. `itemPath` is encoded as `${artifact_name}\${artifact_path}`. <del>It's twice query escaped from ${artifact_name}/${artifact_path} that joined by Windows slash \.</del> **So we need convert Windows slash to linux**. In https://github.com/go-gitea/gitea/issues/27314, runner shows logs from `upload_artifact@v3` like with `%255C`: ``` [artifact-cases/test-artifact-cases] | ::error::Unexpected response. Unable to upload chunk to http://192.168.31.230:3000/api/actions_pipeline/_apis/pipelines/workflows/6/artifacts/34d628a422db9367c869d3fb36be81f5/upload?itemPath=more-files%255Css.json ``` But in gitea server at the same time, But shows `%5C` ``` 2023/10/27 19:29:51 ...eb/routing/logger.go:102:func1() [I] router: completed PUT /api/actions_pipeline/_apis/pipelines/workflows/6/artifacts/34d628a422db9367c869d3fb36be81f5/upload?itemPath=more-files%5Css.json for 192.168.31.230:55340, 400 Bad Request in 17.6ms @ <autogenerated>:1(actions.artifactRoutes.uploadArtifact-fm) ``` I found `%255C` is escaped by `https://github.com/actions/upload-artifact/blob/main/dist/index.js#L2329`. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Always use whole user name as link (#27815)Denys Konovalov2023-10-301-5/+1
| | | | | | | | | | | | | Starting from #25790 this shared template only linked the username of the user if both display name and username were shown. I experienced myself always trying to click on the display name - I think it is annoying for others too. After: ![grafik](https://github.com/go-gitea/gitea/assets/47871822/a0e82127-b773-4ca4-890f-d18422a7bef2) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/79efcf93-2f50-4fc4-ba15-afc6174be48c)
* Fix display member unit in the menu bar if there are no hidden members in ↵yp053272023-10-301-6/+6
| | | | | | | | | | | | | | | | | public org (#27795) Follow #26363. I missed that org templates also using `templates/user/overview/header.tmpl`. You can confirm this problem in https://gitea.com/gitea/-/projects with anonymous access. Before: (no login) ![image](https://github.com/go-gitea/gitea/assets/18380374/e285565c-ca65-4b18-9ff7-434c6367c13a) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/81e7532a-c458-4552-8d75-6896538e42cb)
* Add Index to pull_auto_merge.doer_id (#27811)JakobDev2023-10-303-1/+19
| | | | | | | | Reported at https://codeberg.org/forgejo/forgejo/issues/1677 This column is used by [deleteUser](https://github.com/go-gitea/gitea/blob/f089be91da44ee3e85fbe326a204c7c8a5df3d31/services/user/delete.go#L90). Note: This PR contains a Migration, so we can't backport it to 1.21.
* Bump workflows in github actions (#27836)Chongyi Zheng2023-10-308-45/+45
| | | | All major version upgrades are related to using Node v20 as default runtime
* Allow pull requests Manually Merged option to be used by non-admins (#27780)Brecht Van Lommel2023-10-302-6/+8
| | | | | | | | | | | | Currently this feature is only available to admins, but there is no clear reason why. If a user can actually merge pull requests, then this seems fine as well. This is useful in situations where direct pushes to the repository are commonly done by developers. --------- Co-authored-by: delvh <dev.lh@web.de>
* List all Debian package versions in `Packages` (#27786)KN4CK3R2023-10-295-42/+70
| | | | | | Closes #27783 This PR lists all and not only the latest package versions in the `Packages` index.
* Fix merge base commit for fast-forwarded GitLab PRs (#27825)Sebastian Brückner2023-10-291-1/+9
| | | | | | | | | | | | | | | | | | | | | | | Due to a bug in the GitLab API, the diff_refs field is populated in the response when fetching an individual merge request, but not when fetching a list of them. That field is used to populate the merge base commit SHA. While there is detection for the merge base even when not populated by the downloader, that detection is not flawless. Specifically, when a GitLab merge request has a single commit, and gets merged with the squash strategy, the base branch will be fast-forwarded instead of a separate squash or merge commit being created. The merge base detection attempts to find the last commit on the base branch that is also on the PR branch, but in the fast-forward case that is the PR's only commit. Assuming the head commit is also the merge base results in the import of a PR with 0 commits and no diff. This PR uses the individual merge request endpoint to fetch merge request data with the diff_refs field. With its data, the base merge commit can be properly set, which—by not relying on the detection mentioned above—correctly imports PRs that were "merged" by fast-forwarding the base branch. ref: https://gitlab.com/gitlab-org/gitlab/-/issues/29620
* Fix bad method call when deleting user secrets via API (#27829)Jean-Baptiste Gomond2023-10-291-1/+1
| | | | | Fixed a little mistake when you deleting user secrets via the API. Found it when working on #27725. It should be backported to 1.21 I think.
* Change katex limits (#27823)KN4CK3R2023-10-291-2/+12
| | | | | | | Fixes #27812 Use higher defaults again but limit the input size. ![grafik](https://github.com/go-gitea/gitea/assets/1666336/23cdf572-de30-4799-b9cf-ef386b1623b9)
* Dockerfile small refactor (#27757)Patryk Krawaczyński2023-10-293-24/+54
| | | | - Size and layer optimization, - Maintaining consistency in definitions (comments, apk etc.),
* Use GitLab's squash_commit_sha when available (#27824)Sebastian Brückner2023-10-291-1/+6
| | | | | | | | | | Before this PR, the PR migration code populates Gitea's MergedCommitID field by using GitLab's merge_commit_sha field. However, that field is only populated when the PR was merged using a merge strategy. When a squash strategy is used, squash_commit_sha is populated instead. Given that Gitea does not keep track of merge and squash commits separately, this PR simply populates Gitea's MergedCommitID by using whichever field is present in the GitLab API response.
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-281-11/+11
|
* Upgrade xorm to 1.3.4 (#27807)Nanguan Lin2023-10-273-4/+4
| | | | | | | Noticeable change: Remove the `OrderBy("1") ` [patch](https://github.com/go-gitea/gitea/pull/27673#issuecomment-1768570142) for mssql since xorm has [fixed it](https://gitea.com/xorm/xorm/commit/0f085408afd85707635eadb2294ab52be04f3c0f).
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-2713-4/+182
|
* Package repository/documentation link unification (#27804)Danila Fominykh2023-10-2720-63/+8
| | | | | | | | | Some translations are duplicated for the same package fields; it should be possible to use the same approach. Checked packages to use the same forms in templates. 1. Removed repeated translations for the same fields 2. Linked template files to the same translation fields 3. Added repository site link for nuget packages
* Chroma v2.10.0 (#27803)bt902023-10-262-3/+3
| | | | | | | Bump the chroma version to v2.10.0: https://github.com/alecthomas/chroma/releases/tag/v2.10.0 This release includes a better Java lexer https://github.com/alecthomas/chroma/pull/873
* Add link to members and repositories at teams page (#27744)8532023-10-261-1/+1
| | | | | | | | ![image](https://github.com/go-gitea/gitea/assets/8389962/123e4ca7-dd10-44e7-9702-4b8e9e0882a7) The members and repositories text now can be click. like Org home page: https://github.com/go-gitea/gitea/blob/cab7b7f59c008eea8b3b484a8818eaaf48daa805/templates/org/home.tmpl#L81-L82
* Add dedicated class for empty placeholders (#27788)silverwind2023-10-253-6/+8
| | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/27784 <img width="1033" alt="Screenshot 2023-10-25 at 19 07 15" src="https://github.com/go-gitea/gitea/assets/115237/1a363851-1a86-48cb-99ec-0a573371bb6e"> <img width="1051" alt="Screenshot 2023-10-25 at 19 07 41" src="https://github.com/go-gitea/gitea/assets/115237/add4b606-2264-430a-af35-249ef005817f"> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Close all hashed buffers (#27787)KN4CK3R2023-10-254-1/+19
| | | | Add missing `.Close()` calls. The current code does not delete the temporary files if the data grows over 32mb.
* Fix typo when updating email address (#27789)Joel Wetzell2023-10-251-1/+1
| | | - correct text that is shown when attempting to change an email address
* Improve pull request command line instructions (#27778)Brecht Van Lommel2023-10-254-18/+47
| | | | | | | | | | | | | * Show checkout instructions also when there is no permission to push, for anyone who wants to locally test the changes. * First checkout the branch exactly as is, without immediately having to solve merge conflicts. Leave this to the merge step, since it's often convenient to test a change without worrying about this. * Use `git fetch -u`, so an existing local branch is updated when re-testing the same pull request. But not the more risky `git fetch -f` in to handle force pushes, as we don't want to accidentally overwrite important local changes. * Show different merge command depending on the chosen merge style, interactively updated.
* Fix issue not showing on default board and add test (#27720)Nanguan Lin2023-10-252-1/+7
| | | | | | | | | | | | See https://github.com/go-gitea/gitea/pull/27718#issuecomment-1773743014 . Add a test to ensure its behavior. Why this test uses `ProjectBoardID=0`? Because in `SearchOptions`, `ProjectBoardID=0` means what it is. But in `IssueOptions`, `ProjectBoardID=0` means there is no condition, and `ProjectBoardID=db.NoConditionID` means the board ID = 0. It's really confusing. Probably it's better to separate the db search engine and the other issue search code. It's really two different systems. As far as I can see, `IssueOptions` is not necessary for most of the code, which has very simple issue search conditions.
* Show placeholder email in privacy popup (#27770)Gerd Katzenbeisser2023-10-252-2/+2
| | | | | | | | | | | | This PR will show the _noreply_ address in the privacy popup _keep_email_private_popup_. I had to look into the source code to figure out which E-Mail Adress I had to use on gitea.com to hide it from public access. According to the contribution guidelines I only updated the en-US translation file. Co-authored-by: Hakito <hakito@git.example.com>
* Add word-break to organization name and description (#26624)yp053272023-10-256-3/+6
| | | | | | | | | | | | | | | | | | | | | Fix #24318 Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/38282e5e-0b4d-4568-a853-59352798e826) ![image](https://github.com/go-gitea/gitea/assets/18380374/79d89ee6-61f6-45a7-af0b-d1c23fead25a) ![image](https://github.com/go-gitea/gitea/assets/18380374/39b45fae-52e2-4697-b83a-7cd10f76ac43) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/09e8cfcf-0150-494e-9f63-0868f529da65) ![image](https://github.com/go-gitea/gitea/assets/18380374/d2c348d3-fe03-466a-a5f4-878b7a93a318) ![image](https://github.com/go-gitea/gitea/assets/18380374/7f75b807-300c-42d5-b2c3-bae9e45e3c08) ![image](https://github.com/go-gitea/gitea/assets/18380374/06eca901-f5cf-4100-bb65-92457ad106e3)
* Add border to file tree 'sub-items' and add padding to 'item-file' (#27593)Nanguan Lin2023-10-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | ## Add border to file tree 'sub-items' close #24766 view in `gitea-light` <img width="275" alt="image" src="https://github.com/go-gitea/gitea/assets/70063547/f1bf8736-2db3-454f-86f5-d050a2fae3eb"> view in `gitea-dark` <img width="296" alt="image" src="https://github.com/go-gitea/gitea/assets/70063547/053e2e6e-28f7-41d2-a139-1dae4df45929"> ## Change the 'item-file' padding Before that the 'item-file' only have padding when they in 'item-directory', which is too compact when 'item-file' after 'item-directory' <details> ![)RW`SDJ_UQL@$}0 PL(3DS7](https://github.com/go-gitea/gitea/assets/70063547/5fa523a4-44c3-4cb9-a882-a3ea6d944673) --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix the missing repo count in new team page and edit team page (#27743)8532023-10-251-0/+8
| | | | | | | | | | | | | | | | | Follow #26942 Before: ![image](https://github.com/go-gitea/gitea/assets/8389962/ffe3e914-c71c-493f-965b-369f27c70b4b) ![image](https://github.com/go-gitea/gitea/assets/8389962/eaad4f07-b8ce-4564-b883-97938de5ed79) After: ![image](https://github.com/go-gitea/gitea/assets/8389962/353aeabe-caf4-4449-8330-d3a29f9bd326) ![image](https://github.com/go-gitea/gitea/assets/8389962/baf59bb6-2c74-4a56-a28c-1519bc3d2594)
* Only show diff file tree when more than one file changed (#27775)silverwind2023-10-251-4/+9
| | | | | | | | | | When 0 or 1 files changed in a diff, we don't need to show a file tree. This behaviour matches GitHub. Single-file diff after this change, note absence of button: <img width="1234" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/3618438b-e655-42a3-989f-f299267b2b8b"> Co-authored-by: Giteabot <teabot@gitea.io>
* Add gap between diff boxes (#27776)silverwind2023-10-251-0/+3
| | | | | | | | | Before (almost no gap between files): <img width="1240" alt="Screenshot 2023-10-24 at 19 43 32" src="https://github.com/go-gitea/gitea/assets/115237/30cdbdbc-d102-479c-89ce-3f68837ae0cd"> After (with 8px gap): <img width="1241" alt="Screenshot 2023-10-24 at 19 43 22" src="https://github.com/go-gitea/gitea/assets/115237/72b26a30-8730-4a36-8de9-be143b684b98">
* Do not force creation of _cargo-index repo on publish (#27266)merlleu2023-10-243-7/+13
| | | | | | | | | | | | | | | | | | | | | | Hello there, Cargo Index over HTTP is now prefered over git for package updates: we should not force users who do not need the GIT repo to have the repo created/updated on each publish (it can still be created in the packages settings). The current behavior when publishing is to check if the repo exist and create it on the fly if not, then update it's content. Cargo HTTP Index does not rely on the repo itself so this will be useless for everyone not using the git protocol for cargo registry. This PR only disable the creation on the fly of the repo when publishing a crate. This is linked to #26844 (error 500 when trying to publish a crate if user is missing write access to the repo) because it's now optional. --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Upgrade to golangci-lint@v1.55.0 (#27756)silverwind2023-10-2418-119/+105
| | | https://github.com/golangci/golangci-lint/releases/tag/v1.55.0
* Fix incorrect "tab" parameter for repo search sub-template (#27755)wxiaoguang2023-10-241-2/+2
| | | | | | ![image](https://github.com/go-gitea/gitea/assets/2114189/c546824e-4824-4f4d-bd33-e558c6ddf0ef) ![image](https://github.com/go-gitea/gitea/assets/2114189/713eb72c-22fb-412b-a867-9cccbf7548ec)
* Fix label render containing invalid HTML (#27752)Earl Warren2023-10-231-1/+1
| | | | | | | | | - The label HTML contained a quote that wasn't being closed. Refs: https://codeberg.org/forgejo/forgejo/pulls/1651 (cherry picked from commit e2bc2c9a1fff482c49dbeb3a51e4e1c698bf506c) Co-authored-by: Gusted <postmaster@gusted.xyz>
* Fix duplicate project board when hitting `enter` key (#27746)Nanguan Lin2023-10-231-14/+0
| | | | | | | | When hitting the `enter` key to create a new project column, the request is sent twice because the `submit` event and `key up` event are both triggered. Probably a better solution is to rewrite these parts of the code to avoid using native jQuery but reuse the `form-fetch-action` class. But it's beyond my ability.
* Fix `link-action` redirect network error (#27734)Nanguan Lin2023-10-232-6/+8
| | | | | | | | <img width="823" alt="image" src="https://github.com/go-gitea/gitea/assets/70063547/99da3d5a-c28a-4fd0-8ae0-88461a9142e2"> --------- Co-authored-by: 6543 <6543@obermui.de>
* Fix incorrect ctx usage in defer function (#27740)wxiaoguang2023-10-221-4/+2
|
* Enable followCursor for language stats bar (#27713)silverwind2023-10-222-2/+4
| | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/27600 ![](https://github.com/go-gitea/gitea/assets/115237/96743d90-0712-4f13-84ec-66f84e6ed2d7) Also tested together with https://github.com/go-gitea/gitea/pull/27704, works well.
* teams: new View button (#27685)tomholford2023-10-222-0/+2
| | | | | | | | | | | | | | | | | | | | | | Per the discussion on #22054, the flow for adding a new team member to an org is not intuitive for new Gitea users. The ideal solution would be to add a new button on the Org > Members index view (see the screenshot mockup in the issue description). However, this would require a refactor of the UX for the flow. The current flow has an implicit context of which team within the org the new member is being added to ('Owners' by default). From the Members index, there is no implicit context; the flow would have to add a picker for which team the new member should be added to. So, as a stopgap, this change simply adds a button to the Teams index page that performs the same action as clicking on the title of the team (a behavior that is currently too obscure as indicated in the comments on the issue). This should reduce support burden and serve as a decent temporary measure until the Add Member flow is refactored. --------- Co-authored-by: tomholford <tomholford@users.noreply.github.com>
* fix issues in translation file (#27699)Denys Konovalov2023-10-221-11/+9
| | | | | - use correct comment sign for INI (`;`) - remove duplicated `repo.branch.search` key - remove duplicated spaces & similar
* Fix an indentation in the Chinese documentation of Act Runner (#27730)HoshinoRei2023-10-221-6/+6
| | | | | | In the [English document](https://docs.gitea.com/1.21/usage/actions/act-runner#configuring-cache-when-starting-a-runner-using-docker-image), there is indentation here, but there is no indentation in the Chinese document.
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-221-3/+251
|
* Fix org team endpoint (#27721)Nanguan Lin2023-10-221-4/+4
| | | Fix #27711
* Improve diff tree spacing (#27714)silverwind2023-10-212-5/+16
| | | | | | | | | | | | | | | 1. Un-indent top-level items, matching GitHub rendering 2. Increase item padding and add 1px gap between items Before and After: <img width="247" alt="Screenshot 2023-10-20 at 18 37 32" src="https://github.com/go-gitea/gitea/assets/115237/43c1ce86-1814-4a8a-9dd2-0c4a82a2be7c"> <img width="241" alt="Screenshot 2023-10-20 at 18 40 46" src="https://github.com/go-gitea/gitea/assets/115237/b541b85b-c428-4903-becd-773ae5807495"> --------- Co-authored-by: 6543 <m.huber@kithara.com>
* refactor: make db iterate context aware (#27710)65432023-10-212-29/+39
| | | | | | | | | the iteration will run until finished atm. this changes it by checking if if the context got canceled before each run of a loop sequence is executed [View this pull with now whitespace](https://github.com/go-gitea/gitea/pull/27710/files?diff=unified&w=1)