summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Fix checks for `needs` in Actions (#23789) (#23831)Jason Song2023-04-034-18/+20
| | | | | | | | | | | | | | | | | | | | Backport #23789. Fix: - https://gitea.com/gitea/act_runner/issues/77 - https://gitea.com/gitea/act_runner/issues/81 Before: <img width="1489" alt="image" src="https://user-images.githubusercontent.com/9418365/228501567-f752cf87-a7ed-42c6-8f3d-ba741795c1fe.png"> Highlights: - Upgrade act to make things doable, related to - https://gitea.com/gitea/act/pulls/32 - https://gitea.com/gitea/act/pulls/33 - https://gitea.com/gitea/act/pulls/35 - Make `needs` works - Sort jobs in the original order in the workflow files
* Prefill input values in oauth settings as intended (#23829) (#23871)Giteabot2023-04-031-7/+7
| | | | | Backport #23829 by @yp05327 Co-authored-by: yp05327 <576951401@qq.com>
* Check `IsActionsToken` for LFS authentication (#23841) (#23875)Giteabot2023-04-021-1/+19
| | | | | | | | | | Backport #23841 by @Zettat123 Close #23824 Actions cannot fetch LFS objects from private repos because we don't check if the user is the `ActionUser`. Co-authored-by: Zettat123 <zettat123@gmail.com>
* Remove assertion debug code for show/hide refactoring (#23576) (#23868)Giteabot2023-04-021-26/+0
| | | | | | | | | | | | | | | | | | Backport #23576 by @wxiaoguang When doing the refactoring: * #22950 I added some debug mode code (assertShown) to help to catch bugs, it did catch some bugs like: * #23074 If it has been proved that there is no more bugs, this assertion could be removed easily and clearly. Feel free to decide when to remove it (feel free to convert it from Draft to Ready for Review).
* Fix JS error when changing PR's target branch (#23862) (#23864)Giteabot2023-04-011-2/+0
| | | | | | | | | | | | | | | | | | Backport #23862 by @wxiaoguang Caught by @justusbunsi An old bug from #6488 In `pullrequest_targetbranch_change`, the `data` might be empty, because `UpdatePullRequestTarget` may respond `http.StatusNoContent`. And the old code's `$branchTarget.text(data.base_branch);` doesn't make sense, because in the end, the page will be always reloaded. So, just remove the `$branchTarget.text(data.base_branch);`, everything should be fine. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix 500 error if there is a name conflict when edit authentication source ↵Giteabot2023-03-312-3/+12
| | | | | | | (#23832) (#23852) Backport #23832 by @yp05327 Co-authored-by: yp05327 <576951401@qq.com>
* CSS color tweaks (#23828) (#23842)Giteabot2023-03-313-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #23828 by @silverwind Change grey shades in arc-green to match the theme more: <img width="661" alt="Screenshot 2023-03-30 at 21 42 34" src="https://user-images.githubusercontent.com/115237/228957952-8e099e56-6923-4aa6-8ce9-3c1cd898b73e.png"> Adjusted grey shade in light theme: <img width="652" alt="image" src="https://user-images.githubusercontent.com/115237/228963876-3bde6181-8397-4dc2-be72-33982e6c7acb.png"> Increase contrast in arc-green, change background to slightly darker shade, change forgeground to slightly brighter colors: <img width="283" alt="Screenshot 2023-03-30 at 22 33 20" src="https://user-images.githubusercontent.com/115237/228957957-272c24a5-dd0b-427a-b6b7-e62836bdd73c.png"> Increase contrast of grey text in light theme as well by making them darker: <img width="273" alt="Screenshot 2023-03-30 at 22 33 35" src="https://user-images.githubusercontent.com/115237/228957959-283139c7-6fa7-4b68-9fdd-16c668ad1301.png"> Add color rule for border multiple select items: <img width="183" alt="Screenshot 2023-03-30 at 22 29 31" src="https://user-images.githubusercontent.com/115237/228957954-6b5a752d-bbb0-4519-ab35-d02c0804d955.png"> <img width="181" alt="Screenshot 2023-03-30 at 22 29 46" src="https://user-images.githubusercontent.com/115237/228957956-fca9790a-d6c9-4f31-8d1b-d183ab3ac669.png"> Added color rule for red `*` on required form fields: <img width="97" alt="image" src="https://user-images.githubusercontent.com/115237/228958760-517ad9ef-565d-4349-b734-9b559ab42429.png"> Co-authored-by: silverwind <me@silverwind.io>
* Fix incorrect visibility dropdown list in add/edit user page (#23804) (#23833)Giteabot2023-03-311-0/+2
| | | | | | | | Backport #23804 by @yp05327 Visibility dropdown list will not work in add/edit user page when error occurred Co-authored-by: yp05327 <576951401@qq.com>
* [Patch] Fix closed PR also triggers Webhooks and actions (#23782) (#23834)Giteabot2023-03-311-0/+4
| | | | | | | | | | Backport #23782 by @sillyguodong Fix #23707 Cause by #23189 This PR is a quick fix that, when pushing commits to closed PR, webhook and actions also be triggered. Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
* Fix "Updating branch by merge" bug in "update_branch_by_merge.tmpl" (#23790) ↵wxiaoguang2023-03-312-13/+11
| | | | | | | | | | | (#23825) Backport #23790 Fix regression of #22683 Pass all variables into sub-template. Close #23787
* Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more ↵wxiaoguang2023-03-305-6/+26
| | | | | | | | | | | | | | | | | strict (#23766) (#23791) Follow #21962 After I eat my own dogfood, I would say that ONLY_SHOW_RELEVANT_REPOS=false is necessary for many private/enterprise instances, because many private repositories do not have "description/topic", users just want to search by their names. This PR also adds `PageIsExploreRepositories` check, to make code more strict, because the `search` template is shared for different purpose. And during the test, I found a bug that the "Search" button didn't respect the "relevant" parameter, so this PR fixes the bug by the way together.
* Fix cancel button in the page of project edit not work (#23655) (#23813)sillyguodong2023-03-304-2/+5
| | | | | | | | | | | | | | | | | | | | | Backport #23655 Before, in project edit page, the cancel button is not work. https://user-images.githubusercontent.com/33891828/227182731-6478e29f-0e52-48c4-beb0-6a7d1dda6a1d.mov 1. The wrong classname `cancel` was added to the `<a>` tag. That classname caused the default click event of `<a>` tag to be cancelled. Because we have the following settings in the global. So I remove the classname `cancel`. https://github.com/go-gitea/gitea/blob/9be90a58754061171bbd5025d85d2b891364efd3/web_src/js/features/common-global.js#L325-L327 2. Another change is that page will redirect to the previous page. https://user-images.githubusercontent.com/33891828/227187326-c653c6d6-9715-440f-a732-ba0a6f012c81.mov
* Backport locales (with manual fix) (#23808)wxiaoguang2023-03-3017-139/+277
| | | Backport locales (with manual fix)
* Add missing translation for ↵Jason Song2023-03-291-0/+1
| | | | | | | | | | `actions.runners.reset_registration_token_success` (#23732) (#23781) Backport #23732. Used at https://github.com/go-gitea/gitea/blob/4011821c946e8db032be86266dd9364ccb204118/routers/web/shared/actions/runners.go#L157
* Don't apply the group filter when listing LDAP group membership if it is ↵Giteabot2023-03-291-1/+1
| | | | | | | | | | | | | empty (#23745) (#23788) Backport #23745 by @zeripath When running listLdapGroupMemberships check if the groupFilter is empty before using it to list memberships. Fix #23615 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Add CSS rules for basic colored labels (#23774) (#23777)Giteabot2023-03-291-3/+101
| | | | | | | | | | | | | | | | | Backport #23774 by @silverwind Before: <img width="164" alt="Screenshot 2023-03-28 at 23 35 46" src="https://user-images.githubusercontent.com/115237/228372437-663111b9-7285-4fa2-9125-fb5e1cad21d7.png"> After: <img width="166" alt="Screenshot 2023-03-28 at 23 35 54" src="https://user-images.githubusercontent.com/115237/228372441-49430517-6b2d-4389-b11c-c30a724f6de7.png"> Also I removed the `!important` on the primary label as it's very likely unnecessary with the amount of specificity the selector already has. Co-authored-by: silverwind <me@silverwind.io>
* Fix project card preview select and template select (#23684) (#23731)Zettat1232023-03-291-1/+1
| | | | | | | | | | | | | | Backport #23684 Now user cannot set Card Previews when creating a new project. Before: https://user-images.githubusercontent.com/15528715/227488883-29bbd636-8b98-45b3-b2f8-de5206b045dc.mp4 After: https://user-images.githubusercontent.com/15528715/227488976-3447f252-805a-4f18-ae0e-1cddd921dcc3.mp4
* Add creation time in tag list page (#23693) (#23773)Giteabot2023-03-281-0/+3
| | | | | | | Backport #23693 by @balki Fixes #21699 Co-authored-by: Balki <189196+balki@users.noreply.github.com>
* Make minio package support legacy MD5 checksum (#23768) (#23770)wxiaoguang2023-03-297-22/+72
| | | | | | | | | | | | | | Backport #23768 (no source code conflict, only some unrelated docs/test-ini conflicts) Some storages like: * https://developers.cloudflare.com/r2/api/s3/api/ * https://www.backblaze.com/b2/docs/s3_compatible_api.html They do not support "x-amz-checksum-algorithm" header But minio recently uses that header with CRC32C by default. So we have to tell minio to use legacy MD5 checksum.
* fix br display for packages curls (#23737) (#23764)Giteabot2023-03-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Backport #23737 by @HesterG Before: <img width="1403" alt="截屏2023-03-27 15 48 23" src="https://user-images.githubusercontent.com/17645053/227875392-399debf7-db75-4d9a-9436-409f75447c65.png"> This happens because the `<br>` matches this [rule](https://github.com/go-gitea/gitea/blob/e6e602fd8d35471f1e2f4a42669a1f17e76e0176/web_src/css/markup/content.css#L428), which is not necessary here (This is introduced by #22861, did a quick check, and this is the only place used `<br>` inside `<code>` from the PR): ```css .markup code br, .markup tt br { display: none; } ``` After: <img width="1398" alt="截屏2023-03-27 15 46 50" src="https://user-images.githubusercontent.com/17645053/227875244-b7fba432-b32c-42f7-9517-4e05bb2e64ea.png"> Co-authored-by: Hester Gong <hestergong@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix issue due date edit toggle bug (#23723) (#23758)Giteabot2023-03-271-1/+1
| | | | | | | | | | | | | Backport #23723 by @wxiaoguang Use `toggleElem` instead of jQuery's `fadeToggle`, which can't be caught by eslint jquery plugin. Hopefully this could be the last bug for the jQuery show/hide refactoring. Need to backport. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix profile page email display, respect settings (#23747) (#23756)Giteabot2023-03-282-20/+31
| | | | | | | | | | | | | | | | | Backport #23747 by @wxiaoguang Always respect the `setting.UI.ShowUserEmail` and `KeepEmailPrivate` setting. * It doesn't make sense to show user's own E-mail to themself. * Always hide the E-mail if KeepEmailPrivate=true, then the user could know how their profile page looks like for others. * Revert the `setting.UI.ShowUserEmail` change from #4981 . This setting is used to control the E-mail display, not only for the user list page. ps: the incorrect `<div .../>` tag on the profile page has been fixed by #23748 together, so this PR becomes simpler. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve commit graph page UI alignment (#23751) (#23754)zeripath2023-03-271-6/+6
| | | | | | | | | | | | | | | | | Backport #23751 Fix the UI alignment by the way (adding some `gt-mr-xx`) Before: ![image](https://user-images.githubusercontent.com/2114189/228034794-7a6ac8d6-01fa-4dd2-97d4-0df0368f8ee0.png) After: ![image](https://user-images.githubusercontent.com/2114189/228034938-64edeadf-7c99-4e74-b658-0ca62b72d596.png) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use GitHub Actions compatible globbing for `branches`, `tag`, `path` filter ↵Giteabot2023-03-271-35/+107
| | | | | | | | | | | | | | | | | | | | | | | (#22804) (#23740) Backport #22804 by @ChristopherHX Replaces the current globbing library with a https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet compatible one. This adds support for - `paths-ignore`, `tags-ignore` and `branches-ignore` filters. - negative patterns in `paths`, `tags` and `branches` filters - using both `tags` and `paths` filter on the push event Original PR https://gitea.com/gitea/act/pulls/13. nektos/act PR https://github.com/nektos/act/pull/1618 for the workflowpattern package (It can take some months for it to appear in https://gitea.com/gitea/act) Related to https://github.com/go-gitea/gitea/issues/13539 Co-authored-by: ChristopherHX <christopher.homberger@web.de>
* Redirect to project again after editing it (#23326) (#23739)Giteabot2023-03-276-4/+16
| | | | | | | | | | | Backport #23326 by @yp05327 A part of https://github.com/go-gitea/gitea/pull/22865 We have edit buttons in projects list page and project view page. But after user edit a project, it will always redirect to the projects list page. Co-authored-by: yp05327 <576951401@qq.com>
* Check LFS/Packages settings in dump and doctor command (#23631) (#23730)Zettat1232023-03-272-0/+13
| | | | | | | | | Backport #23631 Close #23622 As described in the issue, disabling the LFS/Package settings will cause errors when running `gitea dump` or `gitea doctor`. We need to check the settings and the related operations should be skipped if the settings are disabled.
* Describe Gitea's purpose more accurately (#23698) (#23710)Giteabot2023-03-261-2/+2
|
* Remove row clicking from notification table (#22695) (#23706)Giteabot2023-03-263-37/+17
| | | | | | | | | Backport #22695 by @jolheiser Resolves #22692 Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix incorrect `HookEventType` of pull request review comments (#23650) (#23678)Giteabot2023-03-244-5/+5
| | | | | | | | | Backport #23650 by @Zettat123 `HookEventType` of pull request review comments should be `HookEventPullRequestReviewComment` but some event types are `HookEventPullRequestComment` now. Co-authored-by: Zettat123 <zettat123@gmail.com>
* Create commit status when event is `pull_request_sync` (#23683) (#23691)Giteabot2023-03-242-2/+2
| | | | | | | | | | | | | | | Backport #23683 by @sillyguodong Fix: #23674 If the type of `hook_event` is `pull_request_sync`, also need to insert a record of `commit_status` into DB. Because `pull_request` event and `pull_request_sync` event have the same payload, so the code is reusable. Screenshot: ![image](https://user-images.githubusercontent.com/33891828/227465436-1b436807-d0b2-4a2b-8890-09d96c7f666d.png) Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
* Drop migration for ForeignReference (#23605) (#23666)Giteabot2023-03-241-15/+2
| | | | | | | | | | Backport #23605 by @wolfogre Fix https://github.com/go-gitea/gitea/issues/21086#issuecomment-1476560381 Related to #21721 Co-authored-by: Jason Song <i@wolfogre.com>
* Fix incorrect `show-modal` and `show-panel` class (#23660) (#23663)wxiaoguang2023-03-246-8/+8
| | | | | | | | | | Backport #23660 That's incorrect code caused by Copy&Paste. `show-modal` / `show-panel` are used by JS to show something, but these links have `href`, they should navigate to new page. Close #23657
* Fix incorrect package doc link (#23679) (#23689)Giteabot2023-03-241-1/+1
| | | | | | | | Backport #23679 by @yp05327 package doc link is changed in https://github.com/go-gitea/gitea/pull/23629 Co-authored-by: yp05327 <576951401@qq.com>
* Backport locales to 1.19 (#23634)wxiaoguang2023-03-2427-5278/+4157
| | | Generated by #23633
* Fix codeblocks in the cheat sheet (#23664) (#23669)Giteabot2023-03-231-10/+10
| | | | | | | | Backport #23664 by @SuperSandro2000 Conflicts fixed by Andrew Thornton <art27@cantab.net> Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Rename develop -> development, contribute -> contributing, administer -> ↵Lunny Xiao2023-03-23121-342/+257
| | | | | | | | administration (#23662) backport #23629 To make versioned documentation less surprising, 1.19 should have the same technology.
* Improve workflow event triggers (#23613) (#23648)Giteabot2023-03-233-13/+155
|
* Fix diff tree height and adjust target file style (#23616)silverwind2023-03-222-14/+26
| | | | | | | Extract from https://github.com/go-gitea/gitea/pull/23553, just the parts that fix the diff tree height and the change to the file `:target` style. Fixes: https://github.com/go-gitea/gitea/issues/23593