summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add comment for ContainsRedirectURI about the exact match (#30457)wxiaoguang2024-04-131-0/+5
| | | | Close #26897 Replace #30336
* Update JS and PY deps, lock eslint and related plugins (#30452)silverwind2024-04-134-261/+248
| | | | | | | | Update all JS dependencies and lock eslint and flat-only plugins. There is at least the blocker https://github.com/SonarSource/eslint-plugin-sonarjs/issues/454 preventing us from upgrading to eslint 9. Tested API spec, charts and absolute dates.
* Refactor cache and disable go-chi cache (#30417)wxiaoguang2024-04-1315-209/+198
| | | use built-in cache package to wrap external go-chi cache package
* Fix admin notice view-detail (#30450)silverwind2024-04-132-8/+5
| | | | | | | | | | | | | Fix https://github.com/go-gitea/gitea/issues/30434, regression from https://github.com/go-gitea/gitea/pull/30115. I also removed the date insertion into the modal which was also broken since that date was switched to `absolute-date` because I see no real purpose to putting that date into the modal. Result: <img width="1038" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/aa2eb8b4-73dc-4d98-9b80-3f276f89d9e5">
* Fix mirror error when mirror repo is empty (#30432)yp053272024-04-131-17/+23
| | | | | Fix #30424 Co-authored-by: Giteabot <teabot@gitea.io>
* Add `/public/assets/img/webpack` to ignore files again (#30451)silverwind2024-04-132-0/+6
| | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30442 It's inconvenient to have new untracked files show up in git when switching to older branches that had generated them. Introduce a list of such files and folders to gitignore and dockerignore.
* Lock a few tool dependencies to major versions (#30439)silverwind2024-04-121-4/+4
| | | | | | | | | | | It's better having to update these less often, so unlock a few dependencies that I trust enough to not break to their latest major versions. This excludes any tool still at major version 0 and golangci-lint can't really be unlocked either because new versions almost always break there. For the v0 packages, I've opened https://github.com/golangci/misspell/issues/14 and https://github.com/mvdan/gofumpt/issues/303.
* Fix commit status cache which missed target_url (#30426)Lunny Xiao2024-04-121-11/+41
| | | | | | | Fix #30421 --------- Co-authored-by: Jason Song <i@wolfogre.com>
* Remove jQuery from the commit graph (except Fomantic) (#30395)Yarden Shoham2024-04-121-61/+77
| | | | | | | | | | | | | | | - Switched to plain JavaScript - Tested the commit graph and it works as before # Demo using JavaScript without jQuery ![demo](https://github.com/go-gitea/gitea/assets/20454870/d0755ed6-bb5c-4601-a2b7-ebccaf4abce4) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix rename branch 500 when the target branch is deleted but exist in ↵Lunny Xiao2024-04-123-12/+107
| | | | | database (#30430) Fix #30428
* Limit the max line length when parsing git grep output (#30418)wxiaoguang2024-04-122-4/+26
|
* Change the default maxPerPage for gitbucket (#30392)Kazushi (Jam) Marukawa2024-04-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This patch improves the migration from gitbucket to gitea. The gitbucket uses it's own internal perPage value (= 25) for paging and ignore per_page arguments in the requested URL. This cause gitea to migrate only 25 issues and 25 PRs from gitbucket repository. This may not happens on old gitbucket. But recent gitbucket 4.40 or 4.38.4 has this problem. This patch change to use this internally hardcoded perPage of gitbucket as gitea's maxPerPage numer when migrating from gitbucket. There are several perPage values in gitbucket like 25 for Isseus/PRs and 10 for Releases. Some of those API doesn't support paging yet. It sounds difficult to implement, but using the minimum number among them worked out very well. So, I use 10 in this patch. Brief descriptions of problems and this patch are also available in https://github.com/go-gitea/gitea/issues/30316. In addition, I'm not sure what kind of test cases are possible to write here. It's a test for migration, so it requires testing gitbucket server and gitea server, I guess. Please let me know if it is possible to write such test cases here. Thanks!
* Fix the spacing issue in the Project view (#30415)HEREYUA2024-04-125-18/+9
| | | | | | | | | | | **fix**: [#30388](https://github.com/go-gitea/gitea/issues/30388) **before** ![image](https://github.com/go-gitea/gitea/assets/37935145/52ca7311-dca4-4430-9a37-3c45b08fe3dd) **after** ![image](https://github.com/go-gitea/gitea/assets/37935145/6b75ce69-4423-4ea4-99a1-d7234287c5c0)
* Add commit status summary table to reduce query from commit status table ↵Lunny Xiao2024-04-127-31/+170
| | | | | | | | | | | | (#30223) This PR adds a new table named commit status summary to reduce queries from the commit status table. After this change, commit status summary table will be used for the final result, commit status table will be for details. --------- Co-authored-by: Jason Song <i@wolfogre.com>
* Split `issue edit` code from `repo-legacy.js` into its own file (#30419)wxiaoguang2024-04-122-204/+209
| | | | | Follow Split `index.js` to separate files (#17315) It's time to move some code away from the messy "legacy" file.
* Check the token's owner and repository when registering a runner (#30406)Zettat1232024-04-114-0/+19
| | | Fix #30378
* Avoid user does not exist error when detecting schedule actions when the ↵yp053272024-04-112-6/+6
| | | | | | | | | | | | | | | | commit author is an external user (#30357) ![image](https://github.com/go-gitea/gitea/assets/18380374/ddf6ee84-2242-49b9-b066-bd8429ba4d76) When repo is a mirror, and commit author is an external user, then `GetUserByEmail` will return error. reproduce/test: - mirror Gitea to your instance - disable action and enable it again, this will trigger `DetectAndHandleSchedules` ps: also follow #24706, it only fixed normal runs, not scheduled runs.
* Update actions variables documents (#30394)Lunny Xiao2024-04-114-60/+80
| | | | | | | | Fix #30393 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Zettat123 <zettat123@gmail.com>
* Fix author name alignment in commits table (#30396)silverwind2024-04-111-10/+12
| | | | | | | | | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30129 by introducing a wrapper div with flexbox that collapses any inter-tag whitespace within. View diff with whitespace hidden. Author names aligned: <img width="172" alt="Screenshot 2024-04-10 at 19 41 27" src="https://github.com/go-gitea/gitea/assets/115237/d761e8f2-0e67-4f84-8d37-9ed73850470a"> Vertically centered on expand: <img width="466" alt="Screenshot 2024-04-10 at 19 43 02" src="https://github.com/go-gitea/gitea/assets/115237/decd68b3-19b5-4cfa-a505-b358e4a0715b"> Ellipsis works: <img width="344" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/6f8624a2-f8b6-4f3e-ac98-c44dd0cdfca5">
* Upgrade golangci-lint to v1.57.2 (#30401)silverwind2024-04-112-5/+2
| | | | Update and adapt to one setting [deprecation](https://github.com/golangci/golangci-lint/pull/4509).
* Replace MSSQL driver with a better maintained version (#30390)Lunny Xiao2024-04-114-19/+32
| | | | | | | | As the latest tag of `github.com/denisenkom/go-mssqldb` is in 2022, but as a fork of it, `github.com/microsoft/go-mssqldb` has more activities than the original repository. We can convert the driver to the fork. Since the interface of Go database driver are the same, it should have no any affect for the end users.
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-111-1/+1
|
* Minor color tweaks (#30397)silverwind2024-04-102-73/+73
| | | | | | | | | | New approach to color shades: Stem all colors off the body color `#1b1f23` using [this](https://pinetools.com/darken-color) and [this](https://pinetools.com/lighten-color) tool. The differences are very subtle, but it will give a more consistent color scheme until https://github.com/go-gitea/gitea/issues/30160. <img width="1342" alt="Screenshot 2024-04-10 at 20 44 16" src="https://github.com/go-gitea/gitea/assets/115237/75b65797-2521-46ea-91d8-d76f77b591b1">
* Use raw Wiki links for non-renderable Wiki files (#30273)Rafael2024-04-1012-23/+65
| | | | | | | | | | | | | | | | | | | In Wiki pages, short-links created to local Wiki files were always expanded as regular Wiki Links. In particular, if a link wanted to point to a file that Gitea doesn't know how to render (e.g, a .zip file), a user following the link would be silently redirected to the Wiki's home page. This change makes short-links* in Wiki pages be expanded to raw wiki links, so these local wiki files may be accessed without manually accessing their URL. * only short-links ending in a file extension that isn't renderable are affected. Closes #27121. Signed-off-by: Rafael Girão <rafael.s.girao@tecnico.ulisboa.pt> Co-authored-by: silverwind <me@silverwind.io>
* Various improvements for long file and commit names (#30374)silverwind2024-04-108-78/+107
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/29438 This contains numerous enhancements for how large commit messages and large filenames render. Another notable change is that the file path is no longer cut off by backend at 30 chars, but rendered in full with wrapping. <img width="1329" alt="Screenshot 2024-04-09 at 21 53 57" src="https://github.com/go-gitea/gitea/assets/115237/5ccbb3d6-643a-4f60-ba79-3572b36d5182"> <hr> <img width="711" alt="Screenshot 2024-04-09 at 21 44 24" src="https://github.com/go-gitea/gitea/assets/115237/6ffe8fbb-407c-4aa7-b591-3d80daea7d57"> <hr> <img width="439" alt="Screenshot 2024-04-09 at 21 19 03" src="https://github.com/go-gitea/gitea/assets/115237/1ec7f6e9-2fd8-4841-87eb-6ca02ab9cd61"> <hr> <img width="444" alt="Screenshot 2024-04-09 at 21 18 52" src="https://github.com/go-gitea/gitea/assets/115237/70931b9e-5841-477e-b3bc-98f8d2662964"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix line height on inline code preview (#30372)silverwind2024-04-101-0/+1
| | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30353. I don't know what causes `code-inner` to not inherit `line-height` from its direct parent `.lines-code` but instead from grandparent `.markup` even thought MDN tells me it's [inherited](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#formal_definition). This causes no negative impact on other code views, so I think it's the best solution.
* Refactor more filterslice (#30370)Lunny Xiao2024-04-103-23/+13
|
* Fix ambiguous id when fetch Actions tasks (#30382)Jason Song2024-04-101-1/+1
| | | | | | | Fix regression of #30331. ```txt time="2024-04-10T02:23:49Z" level=error msg="failed to fetch task" func="[fetchTask]" file="[poller.go:91]" error="unknown: rpc error: code = Internal desc = pick task: CreateTaskForRunner: Error 1052 (23000): Column 'id' in field list is ambiguous" ```
* Fix floated list items (#30377)silverwind2024-04-101-0/+6
| | | | Fixes https://github.com/go-gitea/gitea/issues/30365, regression from https://github.com/go-gitea/gitea/pull/30281
* Fix actions design about default actions download url (#30360)Lunny Xiao2024-04-092-2/+3
| | | Fix #30359
* Add container.FilterSlice function (#30339)oliverpool2024-04-0916-184/+150
| | | | | | | | | | | | | | | | | | | | | | | | | Many places have the following logic: ```go func (jobs ActionJobList) GetRunIDs() []int64 { ids := make(container.Set[int64], len(jobs)) for _, j := range jobs { if j.RunID == 0 { continue } ids.Add(j.RunID) } return ids.Values() } ``` this introduces a `container.FilterMapUnique` function, which reduces the code above to: ```go func (jobs ActionJobList) GetRunIDs() []int64 { return container.FilterMapUnique(jobs, func(j *ActionRunJob) (int64, bool) { return j.RunID, j.RunID != 0 }) } ```
* Fix label-list rendering in timeline, decrease gap (#30342)silverwind2024-04-091-2/+2
| | | | | | | | | | | | | | | Not sure exactly when this regressed, but has been a while I think. Before: <img width="895" alt="Screenshot 2024-04-08 at 22 46 50" src="https://github.com/go-gitea/gitea/assets/115237/9b1788f8-017e-4fe1-8ab9-938e0d76fb41"> After: <img width="689" alt="Screenshot 2024-04-08 at 23 00 58" src="https://github.com/go-gitea/gitea/assets/115237/90193df9-5c24-4a1a-96fe-3d4e8392063c"> Co-authored-by: Giteabot <teabot@gitea.io>
* Performance optimization for git push (#30104)Lunny Xiao2024-04-095-73/+109
| | | | | Agit returned result should be from `ProcReceive` hook but not `PostReceive` hook. Then for all non-agit pull requests, it will not check the pull requests for every pushing `refs/pull/%d/head`.
* Reduce checkbox size to 15px (#30346)silverwind2024-04-092-2/+2
| | | | | | 16 seems to big, 14 too small. Let's do 15. Alignment: <img width="181" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/f2988611-dee2-492e-a18f-dc5ab3a1cd6c">
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-091-3/+44
|
* Fix missed doer (#30231)Lunny Xiao2024-04-0811-55/+55
| | | | | Fix #29879 Co-authored-by: Giteabot <teabot@gitea.io>
* Add optional doctor storage init (#30330)Michael Kriese2024-04-081-0/+11
| | | Add optional storage init to doctor
* Avoid running action when action unit is disabled after workflows detected ↵yp053272024-04-081-1/+4
| | | | | | | | | | | | | (#30331) Fix #30243 We only checking unit disabled when detecting workflows, but not in runner `FetchTask`. So if a workflow was detected when action unit is enabled, but disabled later, `FetchTask` will still return these detected actions. Global setting: repo.ENABLED and repository.`DISABLED_REPO_UNITS` will not effect this.
* Avoid showing `Failed to change the default wiki branch` if repo has no wiki ↵yp053272024-04-082-0/+10
| | | | when saving repo settings (#30329)
* Fix oauth2 builtin application logic (#30304)wxiaoguang2024-04-086-17/+107
| | | | | | Fix #29074 (allow to disable all builtin apps) and don't make the doctor command remove the builtin apps. By the way, rename refobject and joincond to camel case.
* [skip ci] Updated licenses and gitignoresGiteaBot2024-04-0811-63/+64
|
* Some NuGet package enhancements (#30280)KN4CK3R2024-04-073-32/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #30265 1. Read second type of dependencies 2. Render `Description` and `ReleaseNotes` old: ![grafik](https://github.com/go-gitea/gitea/assets/1666336/abac057c-11cd-4d25-b196-01ff899d948e) new: ![grafik](https://github.com/go-gitea/gitea/assets/1666336/35302273-740c-481a-a031-1f80d2d7d336) The NuGet spec does not specify what kind of text can be stored in the description but we can best guess markdown. The official NuGet registry just [converts the newlines to html lines](https://www.nuget.org/packages/rb.Firefox#readme-body-tab). 3. Extract and render the readme. This is the new and better place to store larger text than in the description. The content is markdown. ![grafik](https://github.com/go-gitea/gitea/assets/1666336/f442264e-3735-4b55-92c4-3b89a8ebafb0) --------- Co-authored-by: Benjamin Heemann <benjamin.heemann@raith.de>
* Fix and rewrite contrast color calculation, fix project-related bugs (#30237)silverwind2024-04-0714-191/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The previous color contrast calculation function was incorrect at least for the `#84b6eb` where it output low-contrast white instead of black. I've rewritten these functions now to accept hex colors and to match GitHub's calculation and to output pure white/black for maximum contrast. Before and after: <img width="94" alt="Screenshot 2024-04-02 at 01 53 46" src="https://github.com/go-gitea/gitea/assets/115237/00b39e15-a377-4458-95cf-ceec74b78228"><img width="90" alt="Screenshot 2024-04-02 at 01 51 30" src="https://github.com/go-gitea/gitea/assets/115237/1677067a-8d8f-47eb-82c0-76330deeb775"> 2. Fix project-related issues: - Expose the new `ContrastColor` function as template helper and use it for project cards, replacing the previous JS solution which eliminates a flash of wrong color on page load. - Fix a bug where if editing a project title, the counter would get lost. - Move `rgbToHex` function to color utils. @HesterG fyi --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Add `--page-spacing` variable, fix admin dashboard notice (#30302)silverwind2024-04-073-6/+11
| | | | | | | | | | | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30293 and introduce the `--page-spacing` variable which holds the spacing between the elements on the page. This is working vertically for all pages, including ones that have fomantic grid, and horizontally for all that use `flex-container`. The `.page-content > :first-child:not(.secondary-nav)` selector uses margin which in some cases enables to adjacent margins to overlap, which is nice. <img width="1320" alt="Screenshot 2024-04-06 at 01 35 19" src="https://github.com/go-gitea/gitea/assets/115237/3e81e707-e9ff-4b7f-a211-3d98f4f85353"> --- <img width="1327" alt="Screenshot 2024-04-06 at 01 35 45" src="https://github.com/go-gitea/gitea/assets/115237/aad196c0-9e21-4c06-ae59-7e33a76c61e1"> --- <img width="1321" alt="Screenshot 2024-04-06 at 01 35 31" src="https://github.com/go-gitea/gitea/assets/115237/785f6c5d-08b6-4e66-aa16-aeca7cfed3ad">
* Action view mobile improvements and fixes (#30309)silverwind2024-04-074-14/+30
| | | | | | | | | | | | | | | Fix the action issue in https://github.com/go-gitea/gitea/issues/30303, specifically: - Use opaque step header hover background to avoid transparency issue - Un-sticky the `action-view-left` on mobile, it would otherwise overlap into right view - Improve commit summary, let it wrap - Fix and comment z-indexes - Tweak width for run-list-item-right so it wastes less space on desktop - Synced latest changes to console colors from dark to light theme <img width="467" alt="Screenshot 2024-04-06 at 18 58 15" src="https://github.com/go-gitea/gitea/assets/115237/8ad26b72-6cd9-4522-8ad1-6fd86b2d0d53">
* Fix checkboxes on mobile view, remove some dead css (#30308)silverwind2024-04-071-26/+4
| | | | | | | | | | | | | | | | Fix the checkbox issues in https://github.com/go-gitea/gitea/issues/30303 which were existing problems with these selectors, but made visible with https://github.com/go-gitea/gitea/pull/30162. There is a lot of dead/useless CSS in `form.css`, I only fixed the two problems and remove CSS that was definitely not in use or needed. <img width="369" alt="Screenshot 2024-04-06 at 18 00 08" src="https://github.com/go-gitea/gitea/assets/115237/720f178b-1b22-48d4-8704-becb8ce66129"> <img width="405" alt="Screenshot 2024-04-06 at 18 00 28" src="https://github.com/go-gitea/gitea/assets/115237/61c0f8ec-34af-46c5-a3fa-7c5c4d30c7d2"> Co-authored-by: Giteabot <teabot@gitea.io>
* Clean up log messages (#30313)wxiaoguang2024-04-0717-47/+31
| | | | | | `log.Xxx("%v")` is not ideal, this PR adds necessary context messages. Remove some unnecessary logs. Co-authored-by: Giteabot <teabot@gitea.io>
* Fix right-aligned input icons (#30301)silverwind2024-04-071-3/+8
| | | | | | | | | | | | | | | | | | | Fix regression from https://github.com/go-gitea/gitea/pull/30194 where right-aligned items would not display correctly. Before and After: <img width="285" alt="Screenshot 2024-04-06 at 01 12 11" src="https://github.com/go-gitea/gitea/assets/115237/f9168db5-0f69-4b5d-ba17-b60145ac4a09"> <img width="285" alt="Screenshot 2024-04-06 at 01 11 49" src="https://github.com/go-gitea/gitea/assets/115237/639ab6ed-d018-4e3a-9980-1f079e4ebe9d"> Frontpage search tweaked to accommodate (which was the reason for the changes that broken above): <img width="445" alt="Screenshot 2024-04-06 at 01 11 34" src="https://github.com/go-gitea/gitea/assets/115237/1919220b-390e-463a-8e3d-33a3556bf111"> <img width="438" alt="Screenshot 2024-04-06 at 01 11 39" src="https://github.com/go-gitea/gitea/assets/115237/fd94f8e4-1d56-4b04-99e3-1cd240bd7ab4">
* Refactor startup deprecation messages (#30305)wxiaoguang2024-04-0711-28/+30
| | | | | | | It doesn't change logic, it only does: 1. Rename the variable and function names 2. Use more consistent format when mentioning config section&key 3. Improve some messages
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-071-10/+10
|