aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix owner team access mode value in team_unit table (#24224)yp053272023-04-221-3/+4
| | | | | Partly backport #23675 Co-authored-by: Giteabot <teabot@gitea.io>
* Fix access token issue on some public endpoints (#24194) (#24259)Giteabot2023-04-212-14/+20
| | | | | | | | | | Backport #24194 by @harryzcy - [x] Identify endpoints that should be public - [x] Update integration tests Fix #24159 Co-authored-by: harryzcy <harry@harryzheng.com>
* Show commit history for closed/merged PRs (#24238) (#24261)Giteabot2023-04-211-2/+4
| | | | | | | | | | | | | | | | | | | | | Backport #24238 by @wxiaoguang Close #24237 Before: <details> ![image](https://user-images.githubusercontent.com/2114189/233424875-a69c6dad-df4a-483e-b796-36c6459af2d6.png) </details> After: ![image](https://user-images.githubusercontent.com/2114189/233424712-60a296de-017b-49a8-89b2-5925ff452646.png) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix label color, fix divider in dropdown (#24215) (#24244)Giteabot2023-04-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport #24215 by @silverwind Two small CSS fixes: 1. Fix basic primary label hover: Before: <img width="172" alt="Screenshot 2023-04-19 at 20 00 32" src="https://user-images.githubusercontent.com/115237/233161903-eec2de54-1a58-44ac-a6ef-2d77157317f6.png"> After: <img width="179" alt="Screenshot 2023-04-19 at 20 05 29" src="https://user-images.githubusercontent.com/115237/233162028-995404ac-5852-4d03-821f-6eb4a918a9e3.png"> 2. Fix border color of divider in dropdown and remove margin so it looks better with hover effect, as discussed in https://github.com/go-gitea/gitea/pull/24143: <img width="205" alt="Screenshot 2023-04-19 at 20 03 24" src="https://user-images.githubusercontent.com/115237/233162102-3f4a4142-9634-4c95-acf0-be57072ce7eb.png"> <img width="311" alt="Screenshot 2023-04-19 at 20 03 55" src="https://user-images.githubusercontent.com/115237/233162109-faa616f6-02e4-43d3-95fa-66787a7f914c.png"> Co-authored-by: silverwind <me@silverwind.io>
* Fix issue attachment handling (#24202) (#24221)wxiaoguang2023-04-208-130/+132
| | | | | | | | | | | | | | Backport #24202 Close #24195 Fix the bug: 1. The old code doesn't handle `removedfile` event correctly 2. The old code doesn't provide attachments for type=CommentTypeReview --------- Co-authored-by: silverwind <me@silverwind.io>
* Add run status in action view page (#24223)yp053272023-04-202-1/+10
| | | Backport #23212
* Vertical widths of containers removed (#24184) (#24211)Giteabot2023-04-202-4/+2
| | | | | | | | | | | | Backport #24184 by @krzysztofjeziorny A vertical overflow appears in Firefox 112/MacOS 12.6 when the system setting for scrollbars is to "Always" show them. Here, the fixed 100vw container widths are removed, which removes the overflow. It is, however, only simulated in Developer Tools in latest Firefox and Chromium, so please test on a Gitea installation. Co-authored-by: Krzysztof Jeziorny <872730+krzysztofjeziorny@users.noreply.github.com>
* Don't list root repository on compare page if pulls not allowed (#24183) ↵Giteabot2023-04-191-1/+1
| | | | | | | | | (#24210) Backport #24183 by @lunny Fix #24165 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix template error in pull request with deleted head repo (#24192) (#24216)Giteabot2023-04-191-1/+1
| | | | | | | | Backport #24192 by @brechtvl Rendering of Allow Edits from Maintainers did not check if the head repo exists, while other parts of the page handle it gracefully. Co-authored-by: Brecht Van Lommel <brecht@blender.org>
* Fix incorrect CORS default values (#24206) (#24217)Giteabot2023-04-191-2/+3
| | | | | | | | | | | | Backport #24206 by @wxiaoguang Document: ``` ;ALLOW_DOMAIN = * ;METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS ``` Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use correct locale key for forks page (#24172) (#24175)Giteabot2023-04-171-1/+1
| | | | | | | | | | Backport #24172 by @jolheiser https://github.com/go-gitea/gitea/blob/4014200021a1997283c779a815fe9e5febf1fda1/options/locale/locale_en-US.ini#L873 https://github.com/go-gitea/gitea/blob/4014200021a1997283c779a815fe9e5febf1fda1/options/locale/locale_en-US.ini#L943 Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Fix Org edit page bugs: renaming detection, maxlength (#24161) (#24171)Giteabot2023-04-174-25/+17
| | | | | | | | | | | | | Backport #24161 by @wxiaoguang ## Before * The renaming detection is wrong (eg: pasting a new name into the input doesn't trigger the detection) * The renaming prompt layout is not good * Some MaxSize/maxlength rules is missing Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Support converting varchar to nvarchar for mssql database (#24105) (#24168)Giteabot2023-04-172-11/+43
| | | | | | | | | | | | | | | Backport #24105 by @lunny In #12269, all string fields of struct will generate a NVARCHAR column in database, but for those Gitea instances installed before that PR, users have to convert columns themselves. In this PR, we update the `./gitea admin convert` commands to support both MySQL and MSSQL database converting. Previously, it only supported converting `utf8 -> utf8mb4` for MySQL. Now, it will check the database types. If it's MSSQL, it will convert `VARCHAR -> NVARCHAR` as well. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Use 1.18's aria role for dropdown menus (#24144) (#24155)wxiaoguang2023-04-171-2/+2
| | | | | Backport #24144 Co-authored-by: silverwind <me@silverwind.io>
* Update redis library to support redis v7 (#24114) (#24156)Patrick Schratz2023-04-179-26/+38
| | | | | | | backports #24114 --------- Co-authored-by: techknowlogick <hello@techknowlogick.com>
* Sort repo topic labels by name (#24123) (#24153)wxiaoguang2023-04-173-10/+7
| | | | | | | | | Backport #24123 Close #24077 Manually backported and tested. <img width="330" alt="image" src="https://user-images.githubusercontent.com/2114189/232283645-92cc85dd-ba16-44a9-a7ef-5712b9d285e9.png">
* Set EasyMDE heading font-size to the same size as the resulting markdown ↵wxiaoguang2023-04-161-0/+26
| | | | | | | | | | (#24151) (#24152) Backport #24151 Fix #23816 <img width="519" alt="image" src="https://user-images.githubusercontent.com/2114189/232283304-21f56e82-d80e-4199-9b14-74699d80cd20.png">
* Fix 2-dot direct compare to use the right base commit (#24133) (#24150)Giteabot2023-04-161-1/+5
| | | | | | | | | | Backport #24133 by @jtran For 2-dot direct compare, we should use the base commit in the title and templates, as is used elsewhere, not the common ancestor which is used for 3-dot compare. I believe that this change should have been included in #22949. Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Highlight selected file in the PR file tree (#23947) (#24126)sillyguodong2023-04-142-11/+29
| | | | | | | | | | | | | backport #23947 by @yusifeng before ![before](https://user-images.githubusercontent.com/36984894/230327904-6e712ca2-f777-4cad-99f3-53bc20008180.gif) after ![after](https://user-images.githubusercontent.com/36984894/230327966-6e5dd971-f0df-427a-a80b-6a9b6db6065d.gif) Co-authored-by: yusifeng <36984894+yusifeng@users.noreply.github.com>
* Fix incorrect server error content in RunnersList (#24118) (#24121)Giteabot2023-04-141-2/+2
| | | | | Backport #24118 by @yp05327 Co-authored-by: yp05327 <576951401@qq.com>
* Fix mismatch between hook events and github event types (#24048) (#24091)Zettat1232023-04-132-25/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport https://github.com/go-gitea/gitea/pull/24048 Some workflow trigger events can have multiple activity types, such as `issues` and `pull_request`, and user can specify which types can trigger the workflow. See GitHub documentation: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows Now some hook events cannot match the workflow trigger events correctly because we don't check the activity types. For example, `pull_request_label` is an individual hook event. But there isn't a `pull_request_label` workflow trigger event, we can only use `pull_request` event's `label` activity type. If we don't check the activity types, the workflows without the `label` activity type may be triggered by the `pull_request_label` event by mistake. We need to improve the match logic. - [x] [`issues` ](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues) - [x] [`issue_comment`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment) - [x] [`pull_request`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request) - [x] [`pull_request_review`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_review) - [x] [`pull_request_review_comment`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_review_comment) - [x] [`release`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release) - [x] [`registry_package`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#registry_package)
* 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