summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Changelog v1.19.1 (#24079)v1.19.165432023-04-131-1/+90
|
* Backport locales to 1.19 (#24083)wxiaoguang2023-04-124-65/+197
| | | | | Backport locales Generated by `go run build/backport-locales.go release/v1.19`
* Improve LFS error logs (#24072) (#24082)Giteabot2023-04-121-2/+3
| | | | | | | | | Backport #24072 by @wxiaoguang The error logs were not clear. Help (but not fix) #24053 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update the value of the `diffEnd` when click `Show More` btn in the ↵Giteabot2023-04-121-0/+2
| | | | | | | | | | | | | | | | | | | | DiffFileTree (#24069) (#24078) Backport #24069 by @sillyguodong In the component `DiffFileTree`,if don't update the value of the `diffEnd` in the callback of ajax request, click `Show More` btn will always return the same response, duplicate files are appended to the file list. Before: https://user-images.githubusercontent.com/33891828/231371188-82d169af-10bb-47e2-8aca-83ced2597f2d.mov After: https://user-images.githubusercontent.com/33891828/231369805-39a5a4d0-662c-4f08-bc5a-7d31e8782453.mov Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
* Fix custom mailer template on Windows (#24081)wxiaoguang2023-04-121-0/+2
| | | | | | | | | | | | | Fix #24075 Fix #23873 From the log: ``` 2023/04/02 19:41:46 .../templates/mailer.go:68:1() [T] Adding mailer template for \issue\default from "C:\gitea\custom\templates\mail\issue\default.tmpl" ``` That `assetName ` on Windows is wrong. Gitea only uses slash `/`.
* Make label templates have consistent behavior and priority (#23749) (#24071)wxiaoguang2023-04-1211-87/+133
| | | | | | | Backport #23749 Fix https://github.com/go-gitea/gitea/issues/23715 Backported manually and tested manually.
* Add cardtype to org/user level project on creation, edit and view (#24043) ↵Hester Gong2023-04-123-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#24066) Backport #24043 Part of #23318 The way to fix the missing cardtype for user/org level projects in this PR is to port the cardtype related part from #22112 to org/user level projects' template and router functions. Before: <img width="1135" alt="截屏2023-04-11 13 55 49" src="https://user-images.githubusercontent.com/17645053/231069068-ba897129-ae90-4aa0-9b0f-468bf5c65375.png"> <img width="1131" alt="截屏2023-04-11 13 55 59" src="https://user-images.githubusercontent.com/17645053/231069084-279f6681-5a10-42da-b5a8-2b0ba47c7078.png"> After: Create <img width="835" alt="截屏2023-04-11 13 27 16" src="https://user-images.githubusercontent.com/17645053/231064445-0d6e12bd-5725-48db-a102-80e7472757c2.png"> Edit <img width="852" alt="截屏2023-04-11 13 27 05" src="https://user-images.githubusercontent.com/17645053/231064503-c70525cd-1038-43ec-8d93-8b8d95d183d4.png"> View <img width="1329" alt="截屏2023-04-11 13 26 56" src="https://user-images.githubusercontent.com/17645053/231064529-26023c85-698b-4b2e-af02-45f9820c77ec.png"> --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix accidental overwriting of LDAP team memberships (#24050) (#24065)Giteabot2023-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #24050 by @sillyguodong In the `for` loop, the value of `membershipsToAdd[org]` and `membershipsToRemove[org]` is a slice that should be appended instead of overwritten. Due to the current overwrite, the LDAP group sync only matches the last group at the moment. ## Example reproduction - an LDAP user is both a member of `cn=admin_staff,ou=people,dc=planetexpress,dc=com` and `cn=ship_crew,ou=people,dc=planetexpress,dc=com`. - configuration of `Map LDAP groups to Organization teams ` in `Authentication Sources`: ```json { "cn=admin_staff,ou=people,dc=planetexpress,dc=com":{ "test_organization":[ "admin_staff", "test_add" ] }, "cn=ship_crew,ou=people,dc=planetexpress,dc=com":{ "test_organization":[ "ship_crew" ] } ``` - start `Synchronize external user data` task in the `Dashboard`. - the user was only added for the team `test_organization.ship_crew` Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
* Refactor commit status for Actions jobs (#23786) (#24060)Denys Konovalov2023-04-117-70/+73
| | | | | | | | | | | | | | | | | | Backport #23786 Refactor commit status for Actions jobs (#23786) Highlights: - Treat `StatusSkipped` as `CommitStatusSuccess` instead of `CommitStatusFailure`, so it fixed #23599. - Use the bot user `gitea-actions` instead of the trigger as the creator of commit status. - New format `<run_name> / <job_name> / (<event>)` for the context of commit status to avoid conflicts. - Add descriptions for commit status. - Add the missing calls to `CreateCommitStatus`. - Refactor `CreateCommitStatus` to make it easier to use. Co-authored-by: Jason Song <i@wolfogre.com>
* Fix branch protection priority (#24045) (#24061)Giteabot2023-04-112-7/+79
| | | | | | | Backport #24045 by @lunny Fix #24044 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update documentation to explain which projects allow Gitea to host static ↵Giteabot2023-04-114-3/+26
| | | | | | | | | | | | | pages (#23993) (#24058) Backport #23993 by @6543 close #23521 Signed-off-by: 6543 <6543@obermui.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: a1012112796 <1012112796@qq.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use actions job link as commit status URL instead of run link (#24023) (#24032)Jason Song2023-04-101-1/+20
| | | | | Backport #24023. A commit status is bound to a job, not a run.
* Add actions support to package auth verification (#23729) (#24028)Giteabot2023-04-102-37/+22
| | | | | | | | | | | | | | | Backport #23729 by @yp05327 Partly fixes https://github.com/go-gitea/gitea/issues/23642 Error info: ![image](https://user-images.githubusercontent.com/18380374/227827027-4280a368-ec9e-49e0-bb93-6b496ada7cd9.png) ActionsUser (userID -2) is used to login in to docker in action jobs. Due to we have no permission policy settings of ActionsUser now, ActionsUser can only access public registry by this quick fix. Co-authored-by: yp05327 <576951401@qq.com>
* Fix protected branch for API (#24013) (#24027)Giteabot2023-04-101-4/+8
| | | | | | | Backport #24013 by @lunny Fix #23998 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Show errors for KaTeX and mermaid on the preview tab (#24009) (#24019)Giteabot2023-04-091-0/+1
| | | | | | | | | | | | Backport #24009 by @silverwind There is a conflicting fomantic rule that hid the error messages inside the markdown preview tab for things like mermaid or katex. Overruled it to always show these errors. <img width="774" alt="image" src="https://user-images.githubusercontent.com/115237/230738528-322814c1-8994-495e-b901-bbb79b924ccb.png"> Co-authored-by: silverwind <me@silverwind.io>
* Show protected branch rule names again (#23907) (#24018)Giteabot2023-04-091-3/+4
| | | | | | | | | | | | | | | | | | | Backport #23907 by @HesterG `!important`s for one of the primary label selectors are removed by #23774, so the repository branch protection settings ui will not have the demanding css. This PR modifies `.ui.primary.label` to fix it. Before: <img width="1408" alt="飞书20230404-115410" src="https://user-images.githubusercontent.com/17645053/229683221-ef9c7d5c-68a8-42b0-ba19-ef2d5dfce5f9.png"> After: <img width="1419" alt="截屏2023-04-04 11 56 32" src="https://user-images.githubusercontent.com/17645053/229683469-70cfc92d-d7ef-4323-a7f5-2247810fabce.png"> Co-authored-by: Hester Gong <hestergong@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* fix: do not escape space between PyPI repository url and package name… ↵Giteabot2023-04-081-1/+1
| | | | | | | | | | | | | | (#23981) (#24008) Backport #23981 by @Gunzinger …; add trailing slash to PyPI repository URL (in accordance to PEP-503) This should solve Issue #23980, by moving the space in front of the package name and the package name out of the `gitea-origin-url` block. It also adds a trailing slash to the PyPI repository URL in accordance to [Python PEP-503](https://peps.python.org/pep-0503/). Co-authored-by: Daniel Gunzinger <daniel.gunzinger@gmail.com>
* Adjust sticky pr header to cover background (#23956) (#23999)Giteabot2023-04-081-4/+4
| | | | | | | | | | | | | | | | | Backport #23956 by @silverwind Very minor CSS tweak: Adjust sticky PR header to cover the box-shadow of selected files. Before: <img width="1250" alt="Screenshot 2023-04-06 at 22 54 59" src="https://user-images.githubusercontent.com/115237/230492218-4d71da48-a362-4c52-a7f7-01daf4ffa458.png"> After: <img width="1255" alt="Screenshot 2023-04-06 at 22 54 46" src="https://user-images.githubusercontent.com/115237/230492227-c7142210-e535-4da8-b610-37d33dcbb549.png"> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Set `ref` to fully-formed of the tag when trigger event is `release` ↵Giteabot2023-04-083-6/+7
| | | | | | | | | | | (#23944) (#23989) Backport #23944 by @sillyguodong Fix #23943 When trigger event is `release`, ref should be like `refs/tags/<tag_name>` instead of `CommitID` Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
* Fix redirect bug when creating issue from a project (#23971) (#23997)Giteabot2023-04-081-2/+2
| | | | | | | Backport #23971 by @lunny Fix #23966 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Remove `Repository.getFilesChanged` to fix Actions `paths` and ↵Giteabot2023-04-082-9/+1
| | | | | | | | | | | | | | | | | | | `paths-ignore` filter (#23920) (#23969) Backport #23920 by @ChristopherHX Remove the misbehaving function and call Repository.GetFilesChangedBetween instead. Fixes #23919 --- ~~_TODO_ test this~~ `Repository.getFilesChanged` seems to be only used by Gitea Actions, but a similar function already exists **Update** I tested this change and the issue is gone. Co-authored-by: ChristopherHX <christopher.homberger@web.de>
* Discolor pull request tab labels (#23950) (#23987)Giteabot2023-04-071-3/+3
| | | | | | | | | | | | | | | | | | | Backport #23950 by @silverwind https://github.com/go-gitea/gitea/pull/22687 has discolored the repo tab labels. This does the same for PR tabs for consistency. Value `0` is still rendered like before. Before: <img width="502" alt="Screenshot 2023-04-06 at 19 35 24" src="https://user-images.githubusercontent.com/115237/230454329-db6244ff-7d7e-4a2f-9240-f618a1c57f8c.png"> After: <img width="497" alt="Screenshot 2023-04-06 at 19 35 07" src="https://user-images.githubusercontent.com/115237/230454321-a0be6551-8c31-45e4-a1fb-ffc0d85d87bf.png"> <img width="497" alt="Screenshot 2023-04-06 at 19 38 37" src="https://user-images.githubusercontent.com/115237/230454570-2fe2aa67-dfa7-4b2e-8c04-8dd40e6e99fc.png"> Co-authored-by: silverwind <me@silverwind.io>
* Treat PRs with agit flow as fork PRs when triggering actions. (#23884) (#23967)Jason Song2023-04-071-1/+16
| | | | | | | | Backport #23884. There is no fork concept in agit flow, anyone with read permission can push `refs/for/<target-branch>/<topic-branch>` to the repo. So we should treat it as a fork pull request because it may be from an untrusted user.
* Use Get/Set instead of Rename when Regenerate session id (#23975) (#23983)Giteabot2023-04-071-4/+9
| | | | | | | | | | Backport #23975 by @wxiaoguang Do not use Rename here, because the old sid and new sid may be in different redis cluster slot. Fix #23869 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Do not crash when parsing an invalid workflow file (#23972) (#23976)Giteabot2023-04-073-3/+13
| | | | | | | | | Backport #23972 by @wolfogre Fix #23658. Related to https://gitea.com/gitea/act/pulls/39 Co-authored-by: Jason Song <i@wolfogre.com>
* Ensure RSS icon is present on all repo tabs (#23904) (#23973)Giteabot2023-04-072-3/+5
| | | | | | | | | | | | | | | | | | | Backport #23904 by @silverwind Previously, not all repo tabs had shown the RSS icon in the repo header because the context data was not being set. Added this context data in a new function. Before: <img width="806" alt="image" src="https://user-images.githubusercontent.com/115237/229639615-9cc00e75-3a26-4ff4-a6f2-316c1fccc596.png"> After: <img width="815" alt="Screenshot 2023-04-04 at 00 16 17" src="https://user-images.githubusercontent.com/115237/229639201-2e1c015b-1f13-46d4-aa14-e7a82fab3982.png"> Co-authored-by: silverwind <me@silverwind.io>
* Hardcode path to docker images (#23955) (#23968)Giteabot2023-04-072-4/+4
| | | | | | | | | | Backport #23955 by @techknowlogick Fix #23954 This allows for building on platforms that don't have docker hub as the default container registry. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Title can be empty when creating tag only (#23917) (#23961)Giteabot2023-04-074-2/+9
| | | | | | | | | | | | Backport #23917 by @Zettat123 Fixes #23809 Make the title not required. If the title is empty when creating release (not tag), an error message will be displayed. ![image](https://user-images.githubusercontent.com/15528715/229761056-c52e338b-5f25-4d7d-bb44-2cb0304abcee.png) Co-authored-by: Zettat123 <zettat123@gmail.com>
* Support "." char as user name for User/Orgs in RSS/ATOM/GPG/KEYS path ... ↵65432023-04-077-15/+107
| | | | | (#23874) (#23878) Backport #23874
* Merge `push to create`, `open PR from push`, and `push options` docs ↵Lunny Xiao2023-04-075-66/+140
| | | | | articles into one (#23744) (#23959) backport #23744
* Backport locales to 1.19 (#23960)wxiaoguang2023-04-0718-85/+121
| | | | | | | | This time the backport is done by `backport-locales.go` automatically, no manual fix. However, there are some new broken translations in 1.20 (main branch), so we must fix our ini package next time, then the broken could be resolved fundmentally.
* Delete deleted release attachments immediately from storage (#23913) (#23958)Giteabot2023-04-061-1/+1
| | | | | | | | | | | | Backport #23913 by @lunny Previously, deleted release attachments were kept forever on the external storage. Note: It may be very slow now if there are many attachments to be deleted on this release. Fix #23728 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Left-align review comments (#23937)silverwind2023-04-061-2/+1
| | | | | | | | | | | | Small extract from https://github.com/go-gitea/gitea/pull/23553 for 1.19: Before: <img width="1190" alt="Screenshot 2023-04-05 at 21 47 55" src="https://user-images.githubusercontent.com/115237/230190330-3cee8904-8558-43ea-b9d3-424d807d0b73.png"> After: <img width="1181" alt="Screenshot 2023-04-05 at 21 47 38" src="https://user-images.githubusercontent.com/115237/230190315-c1c3cae5-1bc3-4c2d-bd3d-c119fa01be82.png">
* Fix image border-radius (#23886) (#23930)Giteabot2023-04-051-9/+1
| | | | | | | | | | | | | | | | | | Backport #23886 by @wxiaoguang 1. Instead of polluting the `border-radius` style globally, each "img" usage should declare their own styles. 2. There were some bugs in code, I believe the `.img` selector was done by mistake. After: ![image](https://user-images.githubusercontent.com/2114189/229415742-161b018f-14c3-471d-bcf7-34f83e5c2d89.png) ![image](https://user-images.githubusercontent.com/2114189/229415789-829d364a-76da-47a5-8c61-398cc990873c.png) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Scroll collapsed file into view (#23702) (#23929)Giteabot2023-04-053-2/+12
| | | | | | | | | | | | | | | | Backport #23702 by @jpraet Fixes #23701, #23515. Alternate approach to #23604 using CSS scroll-margin-top, which is also taken into account for direct links to files in a diff: * On the PR diff, this currently shows the previous file first: https://try.gitea.io/jpraet/test/pulls/13/files#diff-b94d08b409f9d05fb65b6cccaf7b3e4ecc7cc333 * On the commit diff, the first line of the linked file is currently under the sticky header: https://try.gitea.io/jpraet/test/commit/1a19e6b14e31d295b7372f3346580c3e85690ff5#diff-b94d08b409f9d05fb65b6cccaf7b3e4ecc7cc333 Co-authored-by: Jimmy Praet <jimmy.praet@ksz-bcss.fgov.be>
* docs: make the required backticks in email password more explicit (#23923) ↵Giteabot2023-04-041-1/+1
| | | | | | | | | | (#23926) Backport #23923 by @teauxfu updated the example config to make the needed backticks around the password more obvious Co-authored-by: alex <alexmw777@gmail.com>
* docs: fix typo (#23924) (#23925)Giteabot2023-04-041-1/+1
| | | | | | | Backport #23924 by @teauxfu fixes a minor typo in the email templates page Co-authored-by: alex <alexmw777@gmail.com>
* Update docs markdown file weight to make it clear (#23909) (#23921)Lunny Xiao2023-04-0488-97/+116
| | | backport #23909
* Fix code view (diff) broken layout (#23096) (#23918)Giteabot2023-04-047-38/+33
| | | | | | | | | | | | | | | | | | | | Backport #23096 by @wxiaoguang Close #22911 I think it's ready for review now, feel free to test it, welcome to help to improve. ### Before ![image](https://user-images.githubusercontent.com/2114189/220958734-06871615-b498-4143-8449-3d443f08ffaa.png) ### After ![image](https://user-images.githubusercontent.com/2114189/220958621-0dce2728-57b8-4a1f-ac5d-48c7c2d42f5c.png) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use ghost user if package creator does not exist (#23822) (#23915)Giteabot2023-04-041-1/+7
| | | | | | | Backport #23822 by @KN4CK3R Fixes #23818 Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Org pages style fixes (#23901) (#23914)Giteabot2023-04-046-32/+29
| | | | | | | | | | | | | | | | | | | | Backport #23901 by @silverwind Few fixes/enhancements around org pages: Use flexbox for member and repo lists and tweak rendering of tabs and list: <img width="765" alt="Screenshot 2023-04-03 at 22 54 24" src="https://user-images.githubusercontent.com/115237/229625716-92a834c3-9121-4729-8b9b-3a3973cf9a91.png"> <img width="771" alt="Screenshot 2023-04-03 at 22 55 15" src="https://user-images.githubusercontent.com/115237/229625719-acc08ce8-4489-44a6-a9b9-e36755c55b1d.png"> Vertically center remove/leave buttons, add link to avatar: <img width="1223" alt="Screenshot 2023-04-03 at 21 51 20" src="https://user-images.githubusercontent.com/115237/229612616-b662b795-e754-41a1-a77a-381c267e6104.png"> Co-authored-by: silverwind <me@silverwind.io>
* User/Org Feed render description as per web (#23887) (#23906)Giteabot2023-04-042-2/+15
| | | | | | | | | | Backport #23887 by @6543 User descriptions should be rendered so that links and other markup appear correct in RSS feeds. test will be added by #23874 Co-authored-by: 6543 <6543@obermui.de>
* Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) ↵Giteabot2023-04-037-30/+58
| | | | | | | | | | | | | | (#23905) Backport #23823 by @wxiaoguang Thanks to @trwnh Close #23802 The ActivityPub id is an HTTPS URI that should remain constant, even if the user changes their name. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add git dashes separator to some "log" and "diff" commands (#23606) (#23720)Giteabot2023-04-031-3/+7
| | | | | | | | | | | | | | | | | | | | | Backport #23606 by @wxiaoguang Reference: https://github.com/go-gitea/gitea/issues/22578#issuecomment-1444180053 Credits to @tdesveaux , thank you very much for catching the problem. If you'd like to open a PR, feel free to replace this one. Git reports fatal errors for ambiguous arguments: ``` fatal: ambiguous argument 'refs/a...refs/b': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' ``` So the `--` separator is necessary in some cases. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix `cases.Title` crash for concurrency (#23885) (#23903)Giteabot2023-04-041-8/+5
| | | | | | | | | | | | Backport #23885 by @wxiaoguang Regression of #19676 and #21814 Fix #23872 `cases.Title` is not thread-safe, it has internal state, so it can't be used as a global shared variable. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix user profile description rendering (#23882) (#23902)Giteabot2023-04-031-6/+6
| | | | | | | | | | | | | | | | | | | | Backport #23882 by @wxiaoguang Found an UI problem when testing #23874 The `ul li` styles were polluted. Before: ![image](https://user-images.githubusercontent.com/2114189/229409756-22438268-ee36-4e4a-a20b-04ee8ee4a79d.png) After: ![image](https://user-images.githubusercontent.com/2114189/229409809-25cea715-b6f1-4346-9bb4-3fbb58fcca65.png) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Convert .Source.SkipVerify to $cfg.SkipVerify (#23839) (#23899)Giteabot2023-04-031-1/+1
| | | | | | | Backport #23839 by @yp05327 `Source` doesn't have `SkipVerify`, it is defined in `cfg` Co-authored-by: yp05327 <576951401@qq.com>
* Fix review box viewport overflow issue (#23800) (#23898)Giteabot2023-04-031-22/+4
| | | | | | | | | | | | | | | | | | | | Backport #23800 by @silverwind Fix regression that came likely from https://github.com/go-gitea/gitea/pull/23271: Long lines of text currently cause the review box's CodeMirror element to resize which apparently is not recognized by [popper's resize detection](https://popper.js.org/docs/v2/modifiers/event-listeners/) and which causes the element to go partially out of viewport until a reflow happens: ![wrap](https://user-images.githubusercontent.com/115237/228673260-f8ffe89e-5724-4fb9-b93f-30b146c4c436.gif) Fix this by setting the element to a static width derived from viewport width and remove the previously clumsy media queries. Co-authored-by: silverwind <me@silverwind.io>
* Rename actions unit to `repo.actions` and add docs for it (#23733) (#23881)Giteabot2023-04-034-5/+6
| | | | | | | | | | | | | | Backport #23733 by @wolfogre I neglected that the `NameKey` of `Unit` is not only for translation, but also configuration. So it should be `repo.actions` to maintain consistency. ## :warning: BREAKING :warning: If users already use `actions.actions` in `DISABLED_REPO_UNITS` or `DEFAULT_REPO_UNITS`, it will be treated as an invalid unit key. Co-authored-by: Jason Song <i@wolfogre.com>
* Backport some locales to 1.19 (#23880)wxiaoguang2023-04-033-12/+15
| | | There are still broken locales (eg: #23866), so this backport is still done manually.