summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make Ctrl+Enter work for issue/comment edit (#30720)v1.22.0-rc1wxiaoguang2024-04-274-8/+13
| | | Fix #30710
* Rename migration package name for 1.22-rc1 (#30730)wxiaoguang2024-04-277-13/+14
| | | Ref: Propose to restart 1.22 release #30501
* Issue card improvements (#30687)silverwind2024-04-272-11/+16
| | | | | | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30682 and does a few improvements: - Use gap instead of margin/padding - Don't render empty image div - Remove `right floated` class that did nothing <img width="406" alt="Screenshot 2024-04-24 at 20 21 20" src="https://github.com/go-gitea/gitea/assets/115237/2fa88707-c2c4-40df-aee7-a684c3097ed0"> --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Don't show loading indicators when refreshing the system status (#30712)Yarden Shoham2024-04-271-1/+2
| | | | | Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Add some tests to clarify the "must-change-password" behavior (#30693)wxiaoguang2024-04-279-17/+81
| | | | | | | | | | Follow #30472: When a user is created by command line `./gitea admin user create`: Old behavior before #30472: the first user (admin or non-admin) doesn't need to change password. Revert to the old behavior before #30472
* Prevent allow/reject reviews on merged/closed PRs (#30686)Kemal Zebari2024-04-275-14/+119
| | | Resolves #30675.
* Update JS dependencies (#30713)silverwind2024-04-274-359/+349
| | | | | | | | - Update all JS dependencies - Remove [now-unnecessary](https://github.com/microsoft/monaco-editor/issues/4325) monaco workaround - Update stylelint config for new rule - Tested Monaco, Swagger UI, Mermaid
* Improve diff stats bar (#30669)silverwind2024-04-272-2/+2
| | | | | | | | | | | | | Minor tweaks: - Remove unnecessary `item` class which was causing unwanted padding to be added. - Add some padding and prevent wrapping so it looks better on mobile. - Increase width by 4px. <img width="116" alt="Screenshot 2024-04-24 at 00 15 07" src="https://github.com/go-gitea/gitea/assets/115237/1f1cf54c-8053-4297-b309-71d9c2ceb9ee"> <img width="441" alt="Screenshot 2024-04-24 at 00 14 57" src="https://github.com/go-gitea/gitea/assets/115237/2f3a33dc-edad-4b97-b64c-6812aae513cb">
* Remove unused parameter for some functions in `services/mirror` (#30724)Chongyi Zheng2024-04-272-5/+5
| | | Suggested by gopls `unusedparams`
* Update misspell to 0.5.1 and add `misspellings.csv` (#30573)silverwind2024-04-2734-82/+103
| | | | | | Misspell 0.5.0 supports passing a csv file to extend the list of misspellings, so I added some common ones from the codebase. There is at least one typo in a API response so we need to decided whether to revert that and then likely remove the dict entry.
* Suppress browserslist warning in webpack target (#30571)silverwind2024-04-271-2/+3
| | | | | | | | | | | | | | | | | 1. Set [`BROWSERSLIST_IGNORE_OLD_DATA`](https://github.com/browserslist/browserslist/blob/c6ddf7b3870a4585822d06ec77e8dd2401b8e1ed/node.js#L400) to avoid warning on outdated browserslist data which the end user can likely not do anything about and which is currently visible in the v1.21 branch. 2. Suppress all command echoing and add a "Running webpack..." message in place. Warning in question was this: ``` Browserslist: caniuse-lite is outdated. Please run: npx update-browserslist-db@latest Why you should do it regularly: https://github.com/browserslist/update-db#readme ```
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-271-0/+1
|
* Diff color enhancements, add line number background (#30670)silverwind2024-04-266-36/+56
| | | | | | | | | | | | | | | | | | | | | | 1. Bring back the background on line numbers. This feature was lost a long time ago. <img width="457" alt="Screenshot 2024-04-24 at 01 36 09" src="https://github.com/go-gitea/gitea/assets/115237/76a7f5a9-c22a-4c72-9f0a-ebf16a66513e"> <img width="473" alt="Screenshot 2024-04-24 at 01 22 47" src="https://github.com/go-gitea/gitea/assets/115237/eef06cf2-f1b9-40e3-947d-dd5852ec12a3"> <img width="457" alt="Screenshot 2024-04-24 at 02 13 18" src="https://github.com/go-gitea/gitea/assets/115237/59e317d4-76a7-468c-8a19-10d88c675cc3"> <img width="459" alt="Screenshot 2024-04-24 at 01 23 21" src="https://github.com/go-gitea/gitea/assets/115237/f1a46f8d-8846-4d78-a9d7-8b7dc18ac6e4"> 2. Expanded lines background is now full-line, including line numbers: <img width="1303" alt="Screenshot 2024-04-24 at 01 37 12" src="https://github.com/go-gitea/gitea/assets/115237/271eefe2-0869-424e-93fb-ccd8adc87806"> 3. Sort affected colors alphabetically in the CSS Fixes #14603
* feat(api): enhance Actions Secrets Management API for repository (#30656)Bo-Yi Wu2024-04-269-285/+410
| | | | | | | | | | | | | | | | | | | | | | | | | | - Add endpoint to list repository action secrets in API routes - Implement `ListActionsSecrets` function to retrieve action secrets from the database - Update Swagger documentation to include the new `/repos/{owner}/{repo}/actions/secrets` endpoint - Add `actions` package import and define new routes for actions, secrets, variables, and runners in `api.go`. - Refactor action-related API functions into `Action` struct methods in `org/action.go` and `repo/action.go`. - Remove `actionAPI` struct and related functions, replacing them with `NewAction()` calls. - Rename `variables.go` to `action.go` in `org` directory. - Delete `runners.go` and `secrets.go` in both `org` and `repo` directories, consolidating their content into `action.go`. - Update copyright year and add new imports in `org/action.go`. - Implement `API` interface in `services/actions/interface.go` for action-related methods. - Remove individual action-related functions and replace them with methods on the `Action` struct in `repo/action.go`. --------- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Signed-off-by: appleboy <appleboy.tw@gmail.com>
* Fix code search input for different views (#30678)wxiaoguang2024-04-264-14/+12
| | | | | | Now only show the "code search" on the repo home page, because it only does global search. So do not show it when viewing file or directory to avoid misleading users (it doesn't search in a directory)
* Fix incorrect object id hash function (#30708)wxiaoguang2024-04-263-15/+8
| | | | | | | | | | | | | Great thanks to @oliverpool for figuring out the problem and proposing a fix. Regression of #28138 Incorrect hash causes the user's LFS files get all deleted when running `doctor fix all` (by the way, remove unused/non-standard comments) Co-authored-by: Giteabot <teabot@gitea.io>
* Add route handler info for debugging purpose (#30705)wxiaoguang2024-04-262-1/+7
| | | Follow #30519
* Bump htmx version to 1.9.12 (#30711)Yarden Shoham2024-04-262-5/+5
| | | | | There are no breaking changes. I tested and everything works as before. Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Deduplicate lfs common code (#30704)wxiaoguang2024-04-263-48/+42
|
* Improve job commit description (#30579)yp053272024-04-265-18/+46
| | | | | | | | | | | | | | | | | | | | | Fix https://github.com/go-gitea/gitea/issues/30567 When job is a schedule: ![image](https://github.com/go-gitea/gitea/assets/18380374/b07e9d43-e8b7-4ee2-87b3-a7050c3a8ca5) When it is a normal one: ![image](https://github.com/go-gitea/gitea/assets/18380374/0d58dab9-74bb-421b-8952-0578cdf21a52) also add a 'space' behind `:` ![image](https://github.com/go-gitea/gitea/assets/18380374/4cebece0-bfe6-4ad9-b806-e5c49bb9be43) ![image](https://github.com/go-gitea/gitea/assets/18380374/02da7681-474b-4c0f-9dad-b6558f6cb484) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve test for TestPullCompare (#30699)Lunny Xiao2024-04-261-5/+10
|
* Allow to save empty comment (#30706)wxiaoguang2024-04-261-19/+22
| | | Fix #29986
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-261-8/+8
|
* Refactor imagediff and fix regression bug (#30694)wxiaoguang2024-04-251-102/+102
| | | Fix #30683
* Improve oauth2 client "preferred username field" logic and the error ↵wxiaoguang2024-04-2516-67/+172
| | | | | | | | | | | | | handling (#30622) Follow #30454 And fix #24957 When using "preferred_username", if no such field, `extractUserNameFromOAuth2` (old `getUserName`) shouldn't return an error. All other USERNAME options do not return such error. And fine tune some logic and error messages, make code more stable and more friendly to end users.
* Fix active item in tab menu (#30690)silverwind2024-04-251-1/+1
| | | | | | | | | | | Before, item would also resize on hover because of font weight: <img width="381" alt="Screenshot 2024-04-25 at 01 28 53" src="https://github.com/go-gitea/gitea/assets/115237/4f3291fc-90be-4d66-ae8b-3c2f763cb956"> After: <img width="381" alt="Screenshot 2024-04-25 at 01 28 40" src="https://github.com/go-gitea/gitea/assets/115237/06145bf2-1ddd-4171-9217-d92c100ea405"> Co-authored-by: Giteabot <teabot@gitea.io>
* If a repository return no commitstatus, then still cache it but not query it ↵Lunny Xiao2024-04-251-7/+15
| | | | | | | | | | | from database (#30700) The previous repository default branch commit status cache will only store if the commit status has value. So the repository which have no any commit status will always be fetched from database. This PR will store the empty state of commit status of a repository into cache because the cache will be updated once there is a commit status stored.
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-251-0/+2
|
* Fix view of readme file in the home code page. (#30564)Jiaxin Zhu2024-04-251-1/+1
| | | | | | | | Gitea attempts to display image file, pdf file, etc. named readme in the home code page (but it cannot). I think only the markdown and plain-text file should be displayed, which is also the behavior of GitHub. Co-authored-by: jxshin <zhujiaxinabc@gmail.com>
* Add test for #30674 (#30679)Lunny Xiao2024-04-241-0/+35
|
* Fix border-radius of header+segment boxes (#30667)silverwind2024-04-241-0/+5
| | | | | | | | | This is a very old bug with the bottom border-radiuses not being there and the `:has` selector now makes it possible to cleanly solve it. It affects all header+segment boxes, which there are many throughout the UI: <img width="1017" alt="Screenshot 2024-04-23 at 20 47 21" src="https://github.com/go-gitea/gitea/assets/115237/870fe352-cc38-4bd6-bfe6-9fe8c3066f92">
* Fix a panic bug when head repository deleting (#30674)Lunny Xiao2024-04-241-13/+13
| | | | When visiting a pull request files which head repository has been deleted, it will panic because headrepo is nil.
* Fix some bug on migrations (#30647)Lunny Xiao2024-04-242-6/+1
| | | Fix https://github.com/go-gitea/gitea/pull/23894#discussion_r1573718690
* Fix checkbox field markup (#30666)silverwind2024-04-232-6/+10
| | | | | | Fixes https://github.com/go-gitea/gitea/issues/30664. Previous use was not a supported way by fomantic and the misuse only became visible after the checkbox migration.
* Avoid doubled border for the PR info segment (#30663)wxiaoguang2024-04-231-1/+3
|
* Interpolate runs-on with variables when scheduling tasks (#30640)sillyguodong2024-04-233-7/+28
| | | | | | | | | | Follow #29468 1. Interpolate runs-on with variables when scheduling tasks. 2. The `GetVariablesOfRun` function will check if the `Repo` of the run is nil. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Initial support for colorblindness-friendly themes (#30625)wxiaoguang2024-04-2423-92/+154
| | | | | | | Initial support for #25680 This PR only adds some simple styles from GitHub, it is big enough and it focuses on adding the necessary framework-level supports. More styles could be fine-tuned later.
* Fix flash message for flex-container (#30657)wxiaoguang2024-04-233-10/+2
|
* Perform Newest sort type correctly when sorting issues (#30644)Kemal Zebari2024-04-231-2/+2
| | | | | | | | | | | | | Should resolve #30642. Before this commit, we were treating an empty `?sort=` query parameter as the correct sorting type (which is to sort issues in descending order by their created UNIX time). But when we perform `sort=latest`, we did not include this as a type so we would sort by the most recently updated when reaching the `default` switch statement block. This commit fixes this by considering the empty string, "latest", and just any other string that is not mentioned in the switch statement as sorting by newest.
* Fix project name wrapping, remove horizontal margin on header (#30631)silverwind2024-04-232-5/+5
| | | | | | | | | | | | | | | | | Enable wrapping of unbroken lines: <img width="1308" alt="Screenshot 2024-04-22 at 00 31 33" src="https://github.com/go-gitea/gitea/assets/115237/1a28ade1-d708-4260-96a3-cf508b6dcb79"> Remove extra margin added by nested `.ui.container` on certain viewports: Before: <img width="1305" alt="Screenshot 2024-04-22 at 00 40 23" src="https://github.com/go-gitea/gitea/assets/115237/d3d8c0d1-380c-4867-b95c-4d53d70d4a93"> After: <img width="1310" alt="Screenshot 2024-04-22 at 00 40 33" src="https://github.com/go-gitea/gitea/assets/115237/2ba7b9f2-db2f-4bcc-8cce-5c415625ddea">
* Add a db consistency check to remove runners that do not belong to a ↵Zettat1232024-04-232-2/+30
| | | | | repository (#30614) Follow #30406
* Fix wrong table name (#30557)Lunny Xiao2024-04-236-8/+18
| | | | | | The table name should be `oauth2_application` but `o_auth2_application` Caused by https://github.com/go-gitea/gitea/pull/21316/files#diff-9610efbc608a41f1f2eaff5790423f0a187906f6ff0beb23a5e8d18366cc2ccfR38
* Fix compare api swagger (#30648)Lunny Xiao2024-04-232-5/+3
| | | The swagger format on #30349 is not right. This PR will fix it.
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-2327-27/+0
|
* Fix queue test (#30646)wxiaoguang2024-04-223-19/+34
| | | | | | | | Fix #30643 The old test code is not stable due to the data-race described in the TODO added at that time. Make it stable, and remove a debug-only field from old test code.
* Enable jquery-related eslint rules that have no violations (#30632)silverwind2024-04-221-4/+4
| | | All these have no violations, so enable them.
* Enable more `revive` linter rules (#30608)silverwind2024-04-2276-188/+133
| | | | | | | | | | | Noteable additions: - `redefines-builtin-id` forbid variable names that shadow go builtins - `empty-lines` remove unnecessary empty lines that `gofumpt` does not remove for some reason - `superfluous-else` eliminate more superfluous `else` branches Rules are also sorted alphabetically and I cleaned up various parts of `.golangci.yml`.
* Remove obsolete CSS text classes (#30576)silverwind2024-04-229-27/+11
| | | | | | | | | | | - `.text-thin` and `.text-italic` are not present in CSS so were doing nothing and I removed them. - `.text.middle` was unused so I removed it. - `.text.italic` is replaced with `tw-italic`. - `.text.normal` had exactly one use and it wasn't even needed. - add a `muted` class to the link to `org_profile_avatar.tmpl`. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Hide diff stats on empty PRs (#30629)silverwind2024-04-221-0/+2
| | | | | | | When a PR is empty, e.g. has neither additions nor deletions, we don't need to show this: <img width="125" alt="Screenshot 2024-04-21 at 23 25 38" src="https://github.com/go-gitea/gitea/assets/115237/0b987eb5-66f5-4b9b-b5aa-7e9e267e9b52">
* [skip ci] Updated licenses and gitignoresGiteaBot2024-04-222-0/+42
|