summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix sticky diff header background (#27697) (#27712)Giteabot2023-10-201-1/+2
| | | | | | | | | | | | | | Backport #27697 by @silverwind 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"> Co-authored-by: silverwind <me@silverwind.io>
* Adapt `.changelog.yml` to new labeling system (#27701) (#27702)Giteabot2023-10-201-16/+12
| | | | | | | Backport #27701 by @delvh Otherwise, it is not possible anymore to generate changelogs. Co-authored-by: delvh <dev.lh@web.de>
* cleanup repo details icons/labels (#27644) (#27654)v1.21.0-rc2Giteabot2023-10-195-60/+28
| | | | | | | | | | | Backport #27644 by @denyskon 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. Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
* Fix required checkboxes in issue forms (#27592) (#27692)Giteabot2023-10-191-4/+7
| | | | | | | | | | | | | | | | | Backport #27592 by @JakobDev 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) Co-authored-by: JakobDev <jakobdev@gmx.de>
* Upgrade xorm (#27673) (#27691)Giteabot2023-10-194-5/+13
| | | | | | | Backport #27673 by @lng2020 Related to https://gitea.com/xorm/xorm/pulls/2341 Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
* Always delete existing scheduled action tasks (#27662) (#27688)Giteabot2023-10-191-11/+8
| | | | | | | Backport #27662 by @KN4CK3R Fixes #27650 Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Clipboard copy enhancements (#27669) (#27681)Giteabot2023-10-192-7/+19
| | | | | | | | | | | | | | | | | | | | | Backport #27669 by @silverwind 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: silverwind <me@silverwind.io>
* Support allowed hosts for webhook to work with proxy (#27655) (#27675)Giteabot2023-10-183-21/+73
| | | | | | | | | | | | | | | | | | | | | Backport #27655 by @wolfogre 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. Co-authored-by: Jason Song <i@wolfogre.com>
* Fix poster is not loaded in get default merge message (#27657) (#27666)Giteabot2023-10-171-0/+3
| | | | | Backport #27657 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Hide archived labels by default from the suggestions when assigning labels ↵Giteabot2023-10-176-10/+35
| | | | | | | | | | | | | | | | | | | | | | | | | for an issue (#27451) (#27661) Backport #27451 by @puni9869 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: puni9869 <80308335+puni9869@users.noreply.github.com> Co-authored-by: silverwind <me@silverwind.io>
* Improve dropdown button alignment and fix hover bug (#27632) (#27637)Giteabot2023-10-163-1/+12
| | | | | | | | Backport #27632 by @wxiaoguang 1. fix #27631 , and add samples to devtest page 2. fix incorrect color for "ui dropdown button" when hover Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve retrying index issues (#27554) (#27634)Giteabot2023-10-165-40/+52
| | | | | | | Backport #27554 by @wolfogre Fix #27540 Co-authored-by: Jason Song <i@wolfogre.com>
* Fix 404 when deleting Docker package with an internal version (#27615) (#27630)Giteabot2023-10-151-1/+1
| | | | | | | | Backport #27615 by @lng2020 close #27601 The Docker registry has an internal version, which leads to 404 Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
* Change the default branch in the agit docs (#27621) (#27623)Giteabot2023-10-152-6/+6
| | | | | | | | Backport #27621 by @lng2020 It's main now. relevant #27579 Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
* Backport manually for a tmpl issue in v1.21 (#27612)Nanguan Lin2023-10-141-1/+1
| | | | backport #27514 close #27607
* Fix build errors on BSD (in BSDMakefile) (#27594) (#27608)Giteabot2023-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Backport #27594 by @sryze 1. `make build` fails because `||` and `&&` have the same precedence in sh/bash, so the `false` command always evaluated (leading to an error). ``` + which gmake /usr/local/bin/gmake + false *** Failed target: .BEGIN *** Failed command: which "gmake" || printf "Error: GNU Make is required!\n\n" 1>&2 && false *** Error code 1 ``` 2. When `GPREFIX` is set to an empty string with quotation marks, `gmake` mistakenly thinks that it's a file name: ``` gmake: *** empty string invalid as file name. Stop. ``` Co-authored-by: Sergey Zolotarev <sryze@protonmail.com>
* Upgrade go dependencies (#27599) (#27609)Chongyi Zheng2023-10-132-62/+77
| | | | | | | | | | Backport #27599 Upgrade all dependencies in `go.mod` `golang.org/x/net` v0.17.0 also fixes [CVE-2023-39325](https://github.com/advisories/GHSA-4374-p667-p6c8) Co-authored-by: delvh <dev.lh@web.de>
* Keep filter when showing unfiltered results on explore page (#27192) (#27589)Giteabot2023-10-121-1/+1
| | | | | | | | Backport #27192 by @JakobDev Fixes https://codeberg.org/Codeberg/Community/issues/1302 Co-authored-by: JakobDev <jakobdev@gmx.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Don't show Link to TOTP if not set up (#27585) (#27588)Giteabot2023-10-112-3/+13
| | | | | | | | | | | Backport #27585 by @JakobDev Fixes https://codeberg.org/forgejo/forgejo/issues/1592 When login in with WebAuth, the page has a link to use TOTP instead. This link is always displayed, no matter if the User has set up TOTP or not, which do of cause not work for those who have not. Co-authored-by: JakobDev <jakobdev@gmx.de>
* Fix data-race bug when accessing task.LastRun (#27584) (#27586)Giteabot2023-10-111-2/+1
| | | | | Backport #27584 by @wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Replace ajax with fetch, improve image diff (#27267) (#27583)Giteabot2023-10-119-81/+95
| | | | | | | | | | | Backport #27267 by @silverwind 1. Dropzone attachment removal, pretty simple replacement 2. Image diff: The previous code fetched every image twice, once via `img[src]` and once via `$.ajax`. Now it's only fetched once and a second time only when necessary. The image diff code was partially rewritten. Co-authored-by: silverwind <me@silverwind.io>
* fully replace drone with actions (#27556) (#27575)Giteabot2023-10-115-431/+267
| | | | | | | Backport #27556 by @techknowlogick this builds binaries and docker images for tags Co-authored-by: techknowlogick <techknowlogick@gitea.com>
* show manual cron run's last time (#27544) (#27577)Giteabot2023-10-113-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #27544 by @earl-warren - Currently in the cron tasks, the 'Previous Time' only displays the previous time of when the cron library executes the function, but not any of the manual executions of the task. - Store the last run's time in memory in the Task struct and use that, when that time is later than time that the cron library has executed this task. - This ensures that if an instance admin manually starts a task, there's feedback that this task is/has been run, because the task might be run that quick, that the status icon already has been changed to an checkmark, - Tasks that are executed at startup now reflect this as well, as the time of the execution of that task on startup is now being shown as 'Previous Time'. - Added integration tests for the API part, which is easier to test because querying the HTML table of cron tasks is non-trivial. - Resolves https://codeberg.org/forgejo/forgejo/issues/949 (cherry picked from commit fd34fdac1408ece6b7d9fe6a76501ed9a45d06fa) Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: silverwind <me@silverwind.io>
* Revert "Fix pr template (#27436)" (#27567)Nanguan Lin2023-10-111-1/+1
| | | | Reverts backport go-gitea/gitea#27440 Fix #27564
* Fix attachment download bug (#27486) (#27571)Giteabot2023-10-116-21/+21
| | | | | | | | | | | Backport #27486 by @lunny Fix #27204 This PR allows `/<username>/<reponame>/attachments/<uuid>` access with personal access token and also changed attachments API download url to it so it can be download correctly. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Increase queue length (#27555) (#27562)Giteabot2023-10-105-5/+5
| | | | | | | | | | | | | | | Backport #27555 by @wolfogre It should be OK to increase the default queue length since the default type is "level". IMO, the old default length (100) is a little too small. See https://github.com/go-gitea/gitea/issues/27540#issuecomment-1754269491 IIRC, a larger length could lead to more memory usage only when the type is "channel," but it's an obscure case. Otherwise, it's just a limit (for "level" or "redis"). Co-authored-by: Jason Song <i@wolfogre.com>
* Respect SSH.KeygenPath option when calculating ssh key fingerprints (#27536) ↵Giteabot2023-10-101-1/+1
| | | | | | | | | (#27551) Backport #27536 by @picsel2 Fixes #27535 Co-authored-by: Sebastian Grabowski <sebastian@grabel.de>
* Avoid run change title process when the title is same (#27467) (#27558)yp053272023-10-101-0/+4
| | | Backport #27467 manually.
* Remove max-width and add hide text overflow (#27359) (#27550)Giteabot2023-10-092-25/+12
| | | | | | | Backport #27359 by @kdumontnu Closes https://github.com/go-gitea/gitea/issues/27358 Co-authored-by: Kyle D <kdumontnu@gmail.com>
* use hosted runners for nightly actions (#27485) (#27488)Giteabot2023-10-093-3/+40
| | | | | | | | | | | Backport #27485 by @techknowlogick I'm temporarily unable to properly evaluate actuated runners, and so I'm switching back to hosted runners until I am able to focus on that again. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-authored-by: silverwind <me@silverwind.io>
* switch to using official AWS step in release nightly (#27532) (#27547)Giteabot2023-10-091-8/+8
| | | | | | | | Backport #27532 by @techknowlogick `jakejarvis/s3-sync-action@master` is out of date, and using official actions is always recommended Co-authored-by: techknowlogick <techknowlogick@gitea.com>
* Fix `environment-to-ini` inherited key bug (#27543) (#27546)Giteabot2023-10-092-1/+28
| | | | | | | | | | | Backport #27543 by @wxiaoguang Fix #27541 The INI package has a quirk: by default, the keys are inherited. When maintaining the keys, the newly added sub key should not be affected by the parent key. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* api: GetPullRequestCommits: return file list (#27483) (#27539)Giteabot2023-10-095-2/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #27483 by @msantos Fixes https://github.com/go-gitea/gitea/issues/27481 --- Patch tested: ```json [ { "url": "http://100.115.92.198:9292/api/v1/repos/msantos/test/git/commits/7664dcb44167e0f9efd994e4ca6a9164694adc27", "sha": "7664dcb44167e0f9efd994e4ca6a9164694adc27", "created": "2023-10-06T09:57:08-04:00", "html_url": "http://100.115.92.198:9292/msantos/test/commit/7664dcb44167e0f9efd994e4ca6a9164694adc27", ... "files": [ { "filename": "README.md", "status": "modified" } ], "stats": { "total": 2, "additions": 2, "deletions": 0 } } ] ``` Co-authored-by: Michael Santos <michael.santos@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve dropdown's behavior when there is a search input in menu (#27526) ↵Giteabot2023-10-092-3/+9
| | | | | | | | | | | | (#27534) Backport #27526 by @wxiaoguang Follow #27225 The change in #27225 is not ideal, this should be the complete fix: support the layout which Fomantic doesn't support. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Restore warning commit status (#27504) (#27529)Giteabot2023-10-098-7/+26
| | | | | | | | | | | | | Backport #27504 by @silverwind Partial revert of https://github.com/go-gitea/gitea/pull/25839. This commit status is used by a number of external integrations, so I think we should not remove it (See https://github.com/go-gitea/gitea/pull/25839#issuecomment-1729002077). This is a rare case where an existing migration needed to be alterted to avoid data loss. Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
* Update JS and PY dependencies (#27501) (#27518)silverwind2023-10-086-456/+457
| | | | | | | | | | | | | | | | Backport https://github.com/go-gitea/gitea/pull/27501 to 1.21 - Update all JS and PY dependencies - Enable eslint `prefer-object-has-own` and autofix issue - Fix styling on citation buttons - Tested citation, mermaid, monaco, swagger, katex Citation button issue was that these buttons were not filled: <img width="136" alt="Screenshot 2023-10-07 at 14 05 08" src="https://github.com/go-gitea/gitea/assets/115237/435f0c91-28ac-46b3-bae4-dad768b29c05"> Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Add hover background to wiki list page (#27507) (#27521)Giteabot2023-10-081-1/+5
| | | | | | | | | | | | | | | | | Backport #27507 by @BLumia This patch adds a hover background for the wiki row in wiki list page, which make its behavior more close to repo's file list page. This patch also make the wiki-git-entry visible on the row is hovered instead of the cel, so users won't be confused since the 'grid' is not visible from the web page. After the patch: (when the wiki named 'Home' is hovered) ![image](https://github.com/go-gitea/gitea/assets/10095765/f6c67c41-ad54-4ce4-a3b1-8c7551396ce0) Co-authored-by: Gary Wang <git@blumia.net>
* Fix mermaid flowchart margin issue (#27503) (#27516)silverwind2023-10-081-1/+3
| | | | | | | | | | Backport https://github.com/go-gitea/gitea/pull/27503 to 1.21 Fixes: https://github.com/go-gitea/gitea/issues/27435 Related: https://github.com/mermaid-js/mermaid/issues/4907 <img width="924" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/494a1d2e-4c56-48d0-9843-82a5e5aa977e">
* bump go-deps (#27489) (#27493)Giteabot2023-10-083-157/+144
| | | | | | | | Backport #27489 by @techknowlogick --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-authored-by: silverwind <me@silverwind.io>
* Enable markdownlint `no-duplicate-header` (#27500) (#27506)Giteabot2023-10-075-10/+9
| | | | | | | | | | | | | | | | | | | | | Backport #27500 by @silverwind Duplicate headers in a single Markdown document are problemlematic because the auto-generated links won't be stable. Enable this rule with no exceptions which is also the default of `markdownlint`. For example: ```md # A ## Example # B ## Example ``` Docasaurus will generated `example` and `example-1` links for this. If the first heading is altered, the link `example` will unexpectedly move to the second example heading. Ref: https://github.com/go-gitea/gitea/pull/27461#discussion_r1347987659 Co-authored-by: silverwind <me@silverwind.io>
* Fix panic in storageHandler (#27446) (#27479)v1.21.0-rc1Giteabot2023-10-061-51/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #27446 by @sryze storageHandler() is written as a middleware but is used as an endpoint handler, and thus `next` is actually `nil`, which causes a null pointer dereference when a request URL does not match the pattern (where it calls `next.ServerHTTP()`). Example CURL command to trigger the panic: ``` curl -I "http://yourhost/gitea//avatars/a" ``` Fixes #27409 --- Note: the diff looks big but it's actually a small change - all I did was to remove the outer closure (and one level of indentation) ~and removed the HTTP method and pattern checks as they seem redundant because go-chi already does those checks~. You might want to check "Hide whitespace" when reviewing it. Alternative solution (a bit simpler): append `, misc.DummyOK` to the route declarations that utilize `storageHandler()` - this makes it return an empty response when the URL is invalid. I've tested this one and it works too. Or maybe it would be better to return a 400 error in that case (?) Co-authored-by: Sergey Zolotarev <sryze@outlook.com>
* Revert #27426 (#27474)delvh2023-10-061-1/+1
| | | | | | Apparently, we didn't backport one of the refactoring PRs which caused the fixup we backported to fail. Fixes: https://github.com/go-gitea/gitea/issues/27473
* Don't let API add 2 exclusive labels from same scope (#27433) (#27460)Giteabot2023-10-063-1/+40
| | | | | | | Backport #27433 by @JakobDev Fixes #27380 Co-authored-by: JakobDev <jakobdev@gmx.de>
* Refactor system setting (#27000) (#27452)Giteabot2023-10-0521-507/+411
| | | | | | | | | | | | | | | | Backport #27000 by @wxiaoguang This PR reduces the complexity of the system setting system. It only needs one line to introduce a new option, and the option can be used anywhere out-of-box. It is still high-performant (and more performant) because the config values are cached in the config system. ![image](https://github.com/go-gitea/gitea/assets/2114189/f8cdd743-1145-41ab-9f8f-3996aa97d440) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* When comparing with an non-exist repository, return 404 but 500 (#27437) ↵Giteabot2023-10-041-1/+3
| | | | | | | (#27442) Backport #27437 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix pr template (#27436) (#27440)Giteabot2023-10-041-1/+1
| | | | | | | Backport #27436 by @lunny Fix #27431 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix missing `ctx` in new_form.tmpl (#27434) (#27438)Giteabot2023-10-041-2/+2
| | | | | | | | Backport #27434 by @CaiCandong Fix #27432 Regression of #27265 Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
* Fix yet another `ctx` template bug (#27417) (#27426)Giteabot2023-10-041-1/+1
| | | | | | | Backport #27417 by @delvh Fixes #27416 Co-authored-by: delvh <dev.lh@web.de>
* Use flex-container for repo and org settings (#27418) (#27430)Giteabot2023-10-044-6/+6
| | | | | | | | | | | | | Backport #27418 by @silverwind Same as https://github.com/go-gitea/gitea/pull/26046 but for repo and org settings pages, reducing the margins between the boxes: <img width="1247" alt="Screenshot 2023-10-03 at 23 25 19" src="https://github.com/go-gitea/gitea/assets/115237/4e68ad5e-5fdc-4466-aefb-ec71bf411d45"> <img width="1255" alt="Screenshot 2023-10-03 at 23 27 12" src="https://github.com/go-gitea/gitea/assets/115237/9068369b-a75d-401e-8b8d-3bd4bbe097dc"> Co-authored-by: silverwind <me@silverwind.io>
* Add Index to `action.user_id` (#27403) (#27425)Giteabot2023-10-043-1/+19
| | | | | | | | Backport #27403 by @JakobDev Another Column that needs a Index. Found at https://codeberg.org/forgejo/discussions/issues/61#issuecomment-1258744. Co-authored-by: JakobDev <jakobdev@gmx.de>