aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* [FIX] resolve confusing colors in languages stats by insert a gap (#27704)MrDevil2023-10-201-0/+1
| | | | | | | | | | | | | | | | The current language stats are too obsessed with color matching. Similar colors are always next to each other. It is a bit troublesome to find the place where the color matching is generated, so just follow the example of github and add a gap. ## before <img width="883" alt="image" src="https://github.com/go-gitea/gitea/assets/12915306/cf54430c-616c-4b37-b561-5a37c20b2d94"> ## after <img width="877" alt="image" src="https://github.com/go-gitea/gitea/assets/12915306/e518ea36-2b8f-4f11-a867-a58dc393db85">
* Fix sticky diff header background (#27697)silverwind2023-10-201-1/+2
| | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/27604 Add negative margins so the header covers any shadow of active elements. No rendering change of the content of the header because the padding counteracts the effect. <img width="128" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/3d0f55b6-9351-4985-a290-da9a92d15b4e">
* Replace -1 with GhostUserID (#27703)Nanguan Lin2023-10-207-13/+18
|
* Clean some functions about project issue (#27705)Nanguan Lin2023-10-203-37/+14
| | | | | | | | | 1. remove unused function `MoveIssueAcrossProjectBoards` 2. extract the project board condition into a function 3. use db.NoCondition instead of -1. (BTW, the usage of db.NoCondition is too confusing. Is there any way to avoid that?) 4. remove the unnecessary comment since the ctx refactor is completed. 5. Change `b.ID != 0` to `b.ID > 0`. It's more intuitive but I think they're the same since board ID can't be negative.
* Adapt `.changelog.yml` to new labeling system (#27701)delvh2023-10-201-16/+12
| | | Otherwise, it is not possible anymore to generate changelogs.
* Update and add new eslint plugins (#27698)silverwind2023-10-193-289/+313
| | | | | | | | - Switch `eslint-plugin-import` to [`eslint-plugin-i`](https://github.com/un-es/eslint-plugin-i), a fork with better dependencies - Update `eslint-plugin-regexp` to 2.0.0 and add new rules - Add [`eslint-plugin-vitest`](https://github.com/veritem/eslint-plugin-vitest)
* Show total TrackedTime on issue/pull/milestone lists (#26672)65432023-10-198-36/+129
| | | | | | | | | | | | | | TODOs: - [x] write test for `GetIssueTotalTrackedTime` - [x] frontport kitharas template changes and make them mobile-friendly --- ![image](https://github.com/go-gitea/gitea/assets/24977596/6713da97-201f-4217-8588-4c4cec157171) ![image](https://github.com/go-gitea/gitea/assets/24977596/3a45aba8-26b5-4e6a-b97d-68bfc2bf9024) --- *Sponsored by Kithara Software GmbH*
* Add doctor dbconsistency fix to delete repos with no owner (#27290)65432023-10-192-6/+79
| | | | to address #27273 replace #24873
* Delete repos of org when purge delete user (#27273)JakobDev2023-10-198-41/+67
| | | | | | | Fixes https://codeberg.org/forgejo/forgejo/issues/1514 I had to remove `RenameOrganization` to avoid circular import. We should really add some foreign keys to the database.
* Fix required checkboxes in issue forms (#27592)JakobDev2023-10-191-4/+7
| | | | | | | | | | | | | If you set a checkbox as required in a issue form at the moment, the checkbox is checked and read only, what does not make much sense. With this PR, the Checkbox actually needs to be checked. The label supports now also Markdown. This matches GitHub's behaviour. And yes, I know the CSS is a ugly workaround. It looks like the given CSS code is part Fomantic and I don't know how to change that. The Maintainers are free to change that. ![grafik](https://github.com/go-gitea/gitea/assets/15185051/3f35be75-b0b4-42a7-9048-a4970384a035)
* Upgrade xorm (#27673)Nanguan Lin2023-10-194-5/+13
| | | Related to https://gitea.com/xorm/xorm/pulls/2341
* [docs] Add note that PROTOCOL config is case-sensitive (#25685)MiloCubed2023-10-192-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See [issue on gitea.com](https://gitea.com/gitea/gitea-docusaurus/issues/38), copied below for convenience: > Hello, may I first confirm that the app.ini PROTOCOL config is case sensitive (must be lowercase)? > > If so, I'd like to suggest for it to be highlighted in the [HTTPS Setup](https://docs.gitea.com/administration/https-setup#using-the-built-in-server) page. > Perhaps something like: > For the PROTOCOL=https field, make sure https is lowercase. Writing PROTOCOL=HTTPS may result in a SSL_ERROR_RX_RECORD_TOO_LONG error on Firefox or ERR_SSL_PROTOCOL_ERROR on Chrome and Edge. > > Background > At first I carelessly wrote PROTOCOL=HTTPS in my app.ini, and Firefox didn't allow me to connect because: > Secure Connection Failed > An error occurred during a connection to gitea.local.lan. SSL received a record that exceeded the maximum permissible length. > Error code: SSL_ERROR_RX_RECORD_TOO_LONG > I spent maybe half an hour troubleshooting my certs, ports, and other configs before backtracking to the start and realizing the capitalization difference there 😅. When I changed that config to lowercase, it worked. For this PR I added the note in the Config Cheat Sheet page and fixed the links to it from the HTTPS Setup page. Was originally thinking to put the note in the HTTPS Setup page itself, but since there are 2 sections referencing the PROTOCOL config, I was thinking it'd be neater and more concise to put it in the Config Cheat Sheet page instead. Especially since both sections already link to it, and I actually tried to check that link quite early on in my troubleshooting (but didn't pay much attention to it since the link was broken). ## Before/After screenshots as per [this repo's docs](https://github.com/go-gitea/gitea/tree/main/docs) Before - links ![image](https://github.com/go-gitea/gitea/assets/135522693/e0745077-f6a9-4178-aa78-2155ccb58fd6) Note: For this the links weren't broken, the links fix is because they were broken on gitea.com's docs (see below). After - links ![image](https://github.com/go-gitea/gitea/assets/135522693/748b3759-aa13-4ad0-9811-c6664b6cdd35) Before - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/4ff2e4e6-3528-4cea-a7a6-64a75854eb99) After - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/c8e07ab6-5a26-4582-a4d0-b83d1f11a30e) ## Before/After screenshots as per [gitea.com's docs](https://gitea.com/gitea/gitea-docusaurus) Before - links ![image](https://github.com/go-gitea/gitea/assets/135522693/4d26ea67-b987-4b91-810b-c53852a13078) After - links ![image](https://github.com/go-gitea/gitea/assets/135522693/24d02907-7f9e-4228-a190-7696623c00f7) Before - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/978eedfd-ce05-488d-ab54-9d7f3c9f233d) After - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/12d22566-a2b0-45ec-8302-a88eae9365d8)
* Remove network call on `make clean` (#27689)techknowlogick2023-10-191-1/+0
| | | | | fix #27653 credit to silverwind for finding issue
* Add unit tests for action runner token (#27670)Nanguan Lin2023-10-193-0/+93
| | | In case the behavior of the register token changes.
* Typos fixed in documentation files (#27687)SandeshPyakurel2023-10-192-4/+4
| | | Typos fixed in multiple docs files.
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-192-12/+385
|
* Add link for repositories README file (#27684)sebastian-sauer2023-10-181-2/+2
| | | | | | | | | | | | | | | this allows to deep link to the readme section of a repository. fixes #27641 Screenshots: No changes on initial display: ![image](https://github.com/go-gitea/gitea/assets/1135157/efbef50e-c24b-4cca-b19f-9092e70b5a5f) On hover the link is shown: ![image](https://github.com/go-gitea/gitea/assets/1135157/c8dff2b8-31dc-4b7b-96d0-27642318483d)
* Fix typo "GetLatestRunnerToken" (#27680)Jason Song2023-10-183-5/+5
|
* Clipboard copy enhancements (#27669)silverwind2023-10-182-7/+19
| | | | | | | | | | | | | | | | | | | | | 1. Do not show temporary tooltips that are triggered from within dropdowns. Previously this resulted in the tooltip being stuck to top-left of the page like seen on issue comment URL copy. I could not figure out any tippy options that prevent this, so I think it's better to just not show it. 1. Refactor `initGlobalCopyToClipboardListener` so that it does not run a often useless `document.querySelector` on every click, make `data-clipboard-text-type` work with `data-clipboard-target`. No use in current code base but still good to have. Finally some minor code cleanup in the function. Point 1 is for this copy button: <img width="229" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/81f34746-8ea5-43d9-8c6f-f6f417a9e4ad"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Remove unnecessary parameter (#27671)Lunny Xiao2023-10-188-25/+23
|
* Always delete existing scheduled action tasks (#27662)KN4CK3R2023-10-181-11/+8
| | | Fixes #27650
* Support allowed hosts for webhook to work with proxy (#27655)Jason Song2023-10-183-21/+73
| | | | | | | | | | | | | | | | | When `webhook.PROXY_URL` has been set, the old code will check if the proxy host is in `ALLOWED_HOST_LIST` or reject requests through the proxy. It requires users to add the proxy host to `ALLOWED_HOST_LIST`. However, it actually allows all requests to any port on the host, when the proxy host is probably an internal address. But things may be even worse. `ALLOWED_HOST_LIST` doesn't really work when requests are sent to the allowed proxy, and the proxy could forward them to any hosts. This PR fixes it by: - If the proxy has been set, always allow connectioins to the host and port. - Check `ALLOWED_HOST_LIST` before forwarding.
* Improve the list header in milestone page (#27302)yp053272023-10-188-261/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ui of list header in milestone page is not same as issue and pr list page. And they are using different template codes which can be merged into one. Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/29eb426c-2dd6-4cf2-96e0-82339fb631bb) ![image](https://github.com/go-gitea/gitea/assets/18380374/b36c4dff-469a-4395-8a02-a8c54e17ab21) ![image](https://github.com/go-gitea/gitea/assets/18380374/d882c74a-451b-431d-b58e-3635a15d9718) ![image](https://github.com/go-gitea/gitea/assets/18380374/292cd38d-1b50-47f1-b32c-9b5de90ce5fb) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/4529234e-67dc-4e17-9440-e638be4fbc41) ![image](https://github.com/go-gitea/gitea/assets/18380374/c15b4d86-0762-497b-b28d-72d09443d629) --------- Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
* Fix poster is not loaded in get default merge message (#27657)Lunny Xiao2023-10-171-0/+3
|
* Hide archived labels by default from the suggestions when assigning labels ↵puni98692023-10-176-10/+35
| | | | | | | | | | | | | | | | | | | | | | | | for an issue (#27451) Followup of #27115 Finally closes #25237 ## Screenshots ### Issue Sidebar <img width="513" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/9f7fda2f-5a03-4684-8619-fd3498a95b41"> ### PR sidebar <img width="367" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/53db9b64-faec-4a67-91d6-76945596a469"> ### PR sidebar with archived labels shown <img width="352" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/9dc5050f-4e69-4f76-bb83-582480a2281e"> --------- Signed-off-by: puni9869 <punitinani1@hotmail.com> Co-authored-by: silverwind <me@silverwind.io>
* actions/setup-go use go-version-file (#27651)Yevhen Pavlov2023-10-177-17/+20
| | | | These changes will allow not to specify the version of go in every pipeline.
* Update agit-support.en-us.md (#27652)Sandro Santilli2023-10-171-6/+9
| | | | | Clarify Agit PR creation documentation See https://github.com/go-gitea/gitea/issues/27579
* cleanup repo details icons/labels (#27644)Denys Konovalov2023-10-165-60/+28
| | | | | | | Fix #27596 Change confusing behavior when showing information about a repo via labels and icons. Implement changes proposed by @lng2020 in https://github.com/go-gitea/gitea/pull/27627#pullrequestreview-1678787673.
* Improve dropdown button alignment and fix hover bug (#27632)wxiaoguang2023-10-163-1/+12
| | | | 1. fix #27631 , and add samples to devtest page 2. fix incorrect color for "ui dropdown button" when hover
* [skip ci] Updated licenses and gitignoresGiteaBot2023-10-162-0/+58
|
* Improve retrying index issues (#27554)Jason Song2023-10-155-40/+52
| | | Fix #27540
* Replace more db.DefaultContext (#27628)Lunny Xiao2023-10-1533-85/+99
| | | Target #27065
* Fix 404 when there is an internal version of package (#27615)Nanguan Lin2023-10-151-1/+1
| | | | close #27601 The Docker registry has an internal version, which leads to 404
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-151-1/+1
|
* Add anchor to review types (#26894)Earl Warren2023-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | - The review type '22' is a general comment type that is attached to single codecomments, reviews with multiple comments or to simple approve and request changes comment. This comment can be used to create a link towards this action on an pull request. - Adds an anchor to the review comment type, so that when its getting linked to it, it actually jumps towards that event. - This also now fixes the behavior that after you created a review you will be redirected to that review and because this is an general comment type other mails will also be 'fixed' such as the approved or request changes. - Resolves https://codeberg.org/forgejo/forgejo/issues/1248 (cherry picked from commit 1741a5f1fe6adc68bb5f87bdd1c5bdc5bfaa45c7) --------- Co-authored-by: Gusted <postmaster@gusted.xyz> Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>