aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use action user as the trigger user of schedules (#30581)yp053272024-04-201-2/+7
| | | | | | | | | | | | | | | | | Follow https://github.com/go-gitea/gitea/pull/30357 When user push to default branch, the schedule trigger user will be the user. When disable then enable action units in settings, the schedule trigger user will be action user. When repo is a mirror, the schedule trigger user will be action user. ( before it will return error, fixed by #30357) As scheduled job is a cron, the trigger user should be action user from Gitea, not a real user. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix commit file status parser (#30602)wxiaoguang2024-04-191-1/+1
| | | Try to fix #30492
* Fix HEAD method for robots.txt (#30603)wxiaoguang2024-04-191-1/+1
| | | Fix #30601
* Fix project description rendering for org (#30587)wxiaoguang2024-04-191-2/+2
| | | | | | | | Fix #30263 ![image](https://github.com/go-gitea/gitea/assets/2114189/41cabe6c-f94a-4874-a26f-d01bb89bb28c) Co-authored-by: Giteabot <teabot@gitea.io>
* Fix changelog (main) (#30582)wxiaoguang2024-04-192-5216/+5365
| | | | | 1. The 1.21.11 changelog is missing 2. Split the old content to CHANGELOG-archived.md, to reduce the size of CHANGELOG.md
* Avoid importing `modules/web/middleware` in `modules/session` (#30584)Jason Song2024-04-192-10/+18
| | | | | | | | | | | | Related to #30375. It doesn't make sense to import `modules/web/middleware` and `modules/setting` in `modules/web/session` since the last one is more low-level. And it looks like a workaround to call `DeleteLegacySiteCookie` in `RegenerateSession`, so maybe we could reverse the importing by registering hook functions.
* Enable npm cache on `setup-node` action (#30577)silverwind2024-04-195-0/+16
| | | | | Enable npm dependency cache in [setup-node](https://github.com/actions/setup-node). This should work reliably and across branches as well.
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-194-0/+165
|
* Mock queue backoff duration (#30553)wxiaoguang2024-04-182-1/+10
| | | | During testing, the backoff duration shouldn't be longer than other durations
* Improve "Reference in new issue" modal (#30547)silverwind2024-04-182-18/+23
| | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/29994 Also some misc enhancements done to the form in the modal. <img width="840" alt="Screenshot 2024-04-17 at 23 02 55" src="https://github.com/go-gitea/gitea/assets/115237/e71fba55-55cd-4e48-a497-6b1025c36a43">
* Add a few root files to lint-spell (#30530)silverwind2024-04-182-38/+38
| | | Files in root were not linted, add them. No new violations.
* Refactor and fix archive link bug (#30535)wxiaoguang2024-04-192-32/+26
| | | | | | | | Regression of #29920 Fixes: #30569 Also this is a rewriting to eliminate the remaining jQuery usages from code. Co-authored-by: Giteabot <teabot@gitea.io>
* Fixup app.example.ini for task section, which is now queue.task (#30555)Jerry Jacobs2024-04-183-33/+0
| | | | | | | Config section `[task]` has been deprecated in favor of `[queue.task]` --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Some following up changes for routes (#30550)wxiaoguang2024-04-181-5/+3
| | | | 1. Switch back to the old order for `reqRepoAdmin, context.RepoRef()` 2. Add a routing function info for global NotFound
* Add form field id generation, remove duplicated ids (#30546)silverwind2024-04-185-23/+40
| | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30384 On repo settings page, there id `repo_name` was used 5 times on the same page, some in modal and such. I think we are better off just auto-generating these IDs in the future so that labels link up with their form element. Ideally this id generation would be done in backend in a subtemplate, but seeing that we already have similar JS patches for checkboxes, I took the easy path for now. I also checked that these `#repo_name` were not in use in JS and the only case where this id appears in JS is on the migration page where it's still there. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix border-radius on view, blame and code search (#30545)silverwind2024-04-184-5/+5
| | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30540 1. Fix all these boxes by adding `bottom attached` and removing a problematic CSS rule: <img width="1319" alt="Screenshot 2024-04-17 at 22 25 31" src="https://github.com/go-gitea/gitea/assets/115237/346445a4-4944-4003-a1ef-6f5b0eda624e"> <img width="643" alt="Screenshot 2024-04-17 at 22 21 18" src="https://github.com/go-gitea/gitea/assets/115237/10f17ed3-9ad6-48de-92fa-bac6621815b9"> 2. Change the "last commit" box to `ui segment` which has correct border-radius. Also included is a tiny tweak to make author name ellipse instead of wrap. <img width="1331" alt="Screenshot 2024-04-17 at 22 23 23" src="https://github.com/go-gitea/gitea/assets/115237/285fbd45-ced0-4d33-abe3-7384ffa03188"> Co-authored-by: Giteabot <teabot@gitea.io>
* Disable enter key for accepting code completion in Monaco (#30548)silverwind2024-04-181-0/+4
| | | | | | Fixes https://github.com/go-gitea/gitea/issues/28114 and behaviour matches vscode on desktop as well. Co-authored-by: Giteabot <teabot@gitea.io>
* Add an api test for updating user (#30539)Lunny Xiao2024-04-181-0/+25
| | | Fix #30518
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-1825-88/+0
|
* Expose fuzzy search for issues/pulls (#29701)65432024-04-185-26/+38
| | | | | | | | close #29685 --------- Signed-off-by: 6543 <6543@obermui.de> Co-authored-by: silverwind <me@silverwind.io>
* Allow everyone to read or write a wiki by a repo unit setting (#30495)wxiaoguang2024-04-1724-128/+319
| | | | | Replace #6312 Help #5833 Wiki solution for #639
* Support nuspec manifest download for nuget packages (#28921)Michael Kriese2024-04-173-35/+95
| | | | | | | | | | | | | | | | Support downloading nuget nuspec manifest[^1]. This is useful for renovate because it uses this api to find the corresponding repository - Store nuspec along with nupkg on upload - allow downloading nuspec - add doctor command to add missing nuspec files [^1]: https://learn.microsoft.com/en-us/nuget/api/package-base-address-resource#download-package-manifest-nuspec --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix branch_protection api shows users/teams who has no readAccess (#30291)Edward Zhang2024-04-172-25/+39
| | | | | | | | | | | | Add some logic in `convert.ToBranchProtection` to return only the names associated with readAccess instead of returning all names. This will ensure consistency in behavior between the frontend and backend. Fixes: #27694 --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-authored-by: wenzhuo.zhang <wenzhuo.zhang@geely.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Correct locale string rendering (#30522)wxiaoguang2024-04-172-5/+5
| | | | | | | | Since #29165, the translations are rendered as HTML in templates, so: 1. if the translation does contain `<>`, use `TrString` 2. use `{dummy}` instead of `<dummy>` as much as possible Co-authored-by: Giteabot <teabot@gitea.io>
* Run `go generate` and `go vet` on all packages (#30529)silverwind2024-04-176-11/+9
| | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30512 I think this does mean those tools would run on a potential `vendor` directory, but I'm not sure we really support vendoring of dependencies anymore. `release` has a `vendor` prerequisite so likely the source tarballs contain vendor files?
* Fix and tweak pull request commit list (#30528)silverwind2024-04-172-27/+26
| | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30493, regression from https://github.com/go-gitea/gitea/pull/30374. Also did the flexbox convertion as suggested by the existing comment. <img width="850" alt="Screenshot 2024-04-16 at 22 28 48" src="https://github.com/go-gitea/gitea/assets/115237/e8905944-620a-4211-b5c5-53ed3b3ee23e"> Co-authored-by: Giteabot <teabot@gitea.io>
* Refactor web routes (#30519)wxiaoguang2024-04-1723-374/+391
| | | | | | | Re-organize the routes in web.go and use ctx constants instead of `context.UnitTypes()` --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix install page checkboxes and dropdown width (#30526)silverwind2024-04-171-1/+2
| | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30523 1. Fix checkbox rendering 2. Fix width of selection dropdowns (was too small) --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Reduce unnecessary database queries on actions table (#30509)Lunny Xiao2024-04-171-0/+6
|
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-171-0/+41
|
* Tweak and fix toggle checkboxes (#30527)silverwind2024-04-171-9/+10
| | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30524. Slightly restyled them so that the "knob" is contained inside the background. <img width="179" alt="Screenshot 2024-04-16 at 21 58 09" src="https://github.com/go-gitea/gitea/assets/115237/be94517b-9cb7-46e2-ae96-fcf6767ce4ba"> <img width="187" alt="Screenshot 2024-04-16 at 21 58 50" src="https://github.com/go-gitea/gitea/assets/115237/c13a1959-5c5a-4e88-9225-e5f6fb72e3e0">
* Tweak repo buttons on mobile and labeled button border-radius (#30503)silverwind2024-04-166-26/+40
| | | | | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30514 Fixes: https://github.com/go-gitea/gitea/pull/30288#issuecomment-2057466623 - Fix border-radius regression from https://github.com/go-gitea/gitea/pull/30475 - Fix and simplify hover state - Move the modal HTML so it does not interfere with the CSS - Make the star and unwatch text show on mobile. There is still plenty of space, below is iPhone 12 viewport size <img width="696" alt="Screenshot 2024-04-15 at 20 34 03" src="https://github.com/go-gitea/gitea/assets/115237/af90bb00-4671-4973-a255-8eb44ee6ba8d"> <img width="230" alt="Screenshot 2024-04-15 at 20 31 42" src="https://github.com/go-gitea/gitea/assets/115237/986ef533-7a01-4bb0-8dcd-fd19e4259e84"> <img width="233" alt="Screenshot 2024-04-15 at 20 31 47" src="https://github.com/go-gitea/gitea/assets/115237/5b825dd8-0ccc-4d56-9d8f-774abb935b68"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix long branch name overflows (#30345)silverwind2024-04-168-30/+29
| | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/27971 Fixes: https://github.com/go-gitea/gitea/pull/28010 <img width="689" alt="Screenshot 2024-04-09 at 00 19 57" src="https://github.com/go-gitea/gitea/assets/115237/7c895a47-274f-40a6-a126-290658f1982d"> Also fixes a similar issue in issue list where CSS was there but not active because of missing `display: block`. <img width="372" alt="Screenshot 2024-04-09 at 00 18 25" src="https://github.com/go-gitea/gitea/assets/115237/cfbee7cd-2e15-4ac7-96ce-020816f48798">
* Update API to return 'source_id' for users (#29718)Tobias Balle-Petersen2024-04-163-0/+9
| | | | | | | Using the API, a user's _source_id_ can be set in the _CreateUserOption_ model, but the field is not returned in the _User_ model. This PR updates the _User_ model to include the field _source_id_ (The ID of the Authentication Source).
* Allow `preferred_username` as username source for OIDC (#30454)SimonErm2024-04-164-4/+15
| | | | | | This PR adds the preferred_username claim as a possible username source for the oauth2_client. Closes #21518
* Fix empty field `login_name` in API response JSON when creating user (#30511)yp053272024-04-161-3/+3
| | | | | Fix #30508 ps: if `sourceID` is not set, `LoginName` will be ignored
* 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>