aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* feat(api): implement branch/commit comparison API (#30349)Bo-Yi Wu2024-04-168-14/+250
| | | | | | | | | | | | | | | | | | | | | | | | | - Add new `Compare` struct to represent comparison between two commits - Introduce new API endpoint `/compare/*` to get commit comparison information - Create new file `repo_compare.go` with the `Compare` struct definition - Add new file `compare.go` in `routers/api/v1/repo` to handle comparison logic - Add new file `compare.go` in `routers/common` to define `CompareInfo` struct - Refactor `ParseCompareInfo` function to use `common.CompareInfo` struct - Update Swagger documentation to include the new API endpoint for commit comparison - Remove duplicate `CompareInfo` struct from `routers/web/repo/compare.go` - Adjust base path in Swagger template to be relative (`/api/v1`) GitHub API https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#compare-two-commits --------- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-161-0/+20
|
* Fix various overflows on actions view (#30344)silverwind2024-04-153-13/+43
| | | | | | | | | | | | | | | Fix a number of text overflow issues in actions view and run list. Also improve mobile view of run list. Fixes: https://github.com/go-gitea/gitea/issues/30328 <img width="782" alt="Screenshot 2024-04-08 at 23 10 16" src="https://github.com/go-gitea/gitea/assets/115237/3d9f9f88-3eab-44a0-8144-30c2b58b24cb"> <img width="935" alt="Screenshot 2024-04-08 at 23 17 46" src="https://github.com/go-gitea/gitea/assets/115237/581d73ea-a31d-416b-be3a-47313b879b12"> <img width="1008" alt="Screenshot 2024-04-08 at 23 49 05" src="https://github.com/go-gitea/gitea/assets/115237/c5d10565-f285-477f-8659-1caf94797647"> <img width="397" alt="Screenshot 2024-04-08 at 23 55 30" src="https://github.com/go-gitea/gitea/assets/115237/368aaa75-1903-4058-9d75-d1fe91c564d6">
* Convert max file name length to 255 (#30489)yp053272024-04-152-2/+2
| | | | | | | | | | | | | | | | Quick/Partly fix #29907 In Linux and MacOS, by default the max file name length is 255. In windows, it depends on the version and settings, and has no file name length limitation, but has path length limitation. By default it is 260, considering path length is longer than filename, so I think it is ok to do this. For Windows, see https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation?tabs=registry For Linux, see https://github.com/torvalds/linux/blob/master/include/uapi/linux/limits.h#L12-L13 For MacOS, see https://discussions.apple.com/thread/254788848?sortBy=best
* Remove active border on pointing menu (#30486)silverwind2024-04-151-1/+0
| | | It looks better when these menus don't flash a border-bottom on click.
* Fix button color on red and green buttons (#30500)silverwind2024-04-151-0/+2
| | | | | | Previously these colors were provided by fomantic css. I missed them. Fixes: https://github.com/go-gitea/gitea/issues/30499 Regressed by: https://github.com/go-gitea/gitea/pull/30475
* Fix code owners will not be mentioned when a pull request comes from a ↵Lunny Xiao2024-04-153-5/+38
| | | | | | forked repository (#30476) Fix #30277 Caused by #29783
* Fix overflow on issue dependency (#30484)silverwind2024-04-151-0/+6
| | | | | | | | | Small tweak here to prevent this and likely other events from overflowing in the timeline: <img width="895" alt="Screenshot 2024-04-14 at 22 53 17" src="https://github.com/go-gitea/gitea/assets/115237/001b4f6b-f649-44ff-b2f0-c8e0dedeb384"> Co-authored-by: Giteabot <teabot@gitea.io>
* Kill all gitea processes before air build (#30477)silverwind2024-04-151-1/+2
| | | | | | | | | | | | | | | | So it happened to me multiple times that air leaves zombie processes after termination. I think ultimately it's some kind of bug in air, but we can work around. The change in the delay is unrelated to the zombie processes but seems to help a bit with duplicate changes resulting in duplicate `make generate` as seen here: <img width="424" alt="Screenshot 2024-04-14 at 17 05 47" src="https://github.com/go-gitea/gitea/assets/115237/6dd1d787-6be3-4fb2-8b0b-cd711c281793"> --------- Co-authored-by: delvh <dev.lh@web.de>
* [skip ci] Updated licenses and gitignoresGiteaBot2024-04-153-0/+47
|
* Revert 100% label max-width (#30481)silverwind2024-04-152-2/+1
| | | | | | | | | | Partial revert of https://github.com/go-gitea/gitea/pull/30479 It's causing problems at least here: https://github.com/go-gitea/gitea/pull/30344#discussion_r1564895591 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve flex ellipsis (#30479)wxiaoguang2024-04-143-0/+32
| | | | | | | ![image](https://github.com/go-gitea/gitea/assets/2114189/857794d8-2170-42be-a5bf-47ebacbafebd) --------- Co-authored-by: silverwind <me@silverwind.io>
* Remove fomantic button module (#30475)silverwind2024-04-1421-2991/+253
| | | | | | | | | | CSS-only module. Button colors are reduced to this: <img width="639" alt="Screenshot 2024-04-14 at 15 36 07" src="https://github.com/go-gitea/gitea/assets/115237/882d6c02-d1de-44f2-b707-db02a9f5070d"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve "must-change-password" logic and document (#30472)wxiaoguang2024-04-144-30/+31
| | | | | Unify the behaviors of "user create" and "user change-password". Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix commitstatus summary (#30431)Lunny Xiao2024-04-143-14/+36
| | | | | | | | | | The target_url is necessary for the UI, but missed in commit_status_summary table. This PR fix it. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove fomantic menu module (#30325)silverwind2024-04-146-2201/+804
| | | | | A lot of variants are in use, so the diff stat isn't so great. Co-authored-by: Giteabot <teabot@gitea.io>
* Use `flex-container` for dashboard layout (#30214)silverwind2024-04-143-9/+15
| | | | | | | | | | | | | | | | | | | Added new class `flex-container-sidebar` to cover the dashboard sidebar. Previously this was 37.5% with more padding. Now there is less empty space between the two columns and this matches other pages like repo or admin settings page. Desktop: <img width="1345" alt="Screenshot 2024-03-31 at 15 11 36" src="https://github.com/go-gitea/gitea/assets/115237/717389d9-d42c-466e-a8fe-e968f79447fd"> Mobile: <img width="444" alt="Screenshot 2024-03-31 at 15 11 44" src="https://github.com/go-gitea/gitea/assets/115237/7faa840b-513a-411b-bf2d-26d52b9b71a0"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Rewrite and restyle reaction selector and enable no-sizzle eslint rule (#30453)silverwind2024-04-1417-178/+133
| | | | | | | | | | | Enable `no-sizzle` lint rule, there was only one use in `initCompReactionSelector` and: - Remove all jQuery except the necessary fomantic dropdown init - Remove the recursion, instead bind event listeners to common parent container nodes --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Pulse page improvements (#30149)silverwind2024-04-146-16/+33
| | | | | | | | | | 1. add border-radius and spacing to bars 2. use tailwind background classes 3. Add more space around activity list headers <img width="983" alt="Screenshot 2024-03-27 at 23 40 54" src="https://github.com/go-gitea/gitea/assets/115237/70f72c30-e69f-4ecb-882f-32b8bc94d638"> <img width="1020" alt="Screenshot 2024-03-27 at 23 41 02" src="https://github.com/go-gitea/gitea/assets/115237/a35dbbda-515c-40b0-938a-d759f9686b8e">
* Fix JS error when opening to expanded code comment (#30463)silverwind2024-04-141-5/+3
| | | | | | | | | | | | Fix regression from https://github.com/go-gitea/gitea/commit/e0b018706fa7703ef1759d9a75a1399383715808 where opening to a code comment via hash link would give this error: <img width="1247" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/f9aaeded-8492-4416-9a73-afa0c56220a7"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* fix: Fix to delete cookie when AppSubURL is non-empty (#30375)Jonathan Tran2024-04-143-6/+36
| | | | | | | | Cookies may exist on "/subpath" and "/subpath/" for some legacy reasons (eg: changed CookiePath behavior in code). The legacy cookie should be removed correctly. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Kyle D <kdumontnu@gmail.com>
* Add `interface{}` to `any` replacement to `make fmt`, exclude `*.pb.go` (#30461)silverwind2024-04-135-15/+7
| | | | | | | Since https://github.com/go-gitea/gitea/pull/25686, a few `interface{}` have sneaked into the codebase. Add this replacement to `make fmt` to prevent this from happening again. Ideally a linter would do this, but I haven't found any suitable.
* Fix network error when open/close organization/individual projects and ↵yp053272024-04-132-11/+6
| | | | | | | | | | | redirect to project page (#30387) Follow #27734 ![image](https://github.com/go-gitea/gitea/assets/18380374/02ed6b9a-cbb6-4f49-a54a-ca76a0d052a9) Updated: Redirect to project page instead of project list page.
* Avoid losing token when updating mirror settings (#30429)Jason Song2024-04-133-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #30416. Before (it shows as "Unset" while there's a token): <img width="980" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/d7148e3e-62c9-4d2e-942d-3d795b79515a"> After: <img width="977" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/24aaa1db-5baa-4204-9081-470b15ea72b5"> The username shows as "oauth2" because of https://github.com/go-gitea/gitea/blob/f9fdac9809335729b2ac3227b2a5f71a62fc64ad/services/migrations/dump.go#L99 I have checked that all usage of `MirrorRemoteAddress` has been updated. <img width="1806" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/2f042501-2824-4511-9203-c84a6731a02d"> However, it needs to be checked again when backporting. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix label rendering (#30456)wxiaoguang2024-04-133-15/+38
| | | | | | 1. Check whether the label is for an issue or a pull request. 2. Don't use space to layout 3. Make sure the test strings have trailing spaces explicitly, to avoid some IDE removing the trailing spaces automatically.
* 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>