aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix wrong transfer hint (#30889)Lunny Xiao2024-05-081-2/+8
| | | Fix #30187
* Remove obsolete monaco workaround (#30893)silverwind2024-05-081-4/+0
| | | | | | This workaround is not neccessary any more since monaco 0.35.0. Ref: https://github.com/microsoft/monaco-editor/issues/2962 Ref: https://github.com/microsoft/vscode/pull/173688
* [skip ci] Updated translations via CrowdinGiteaBot2024-05-081-7/+11
|
* Apply to become a maintainer (#30884)Kemal Zebari2024-05-071-0/+1
| | | | | | | | | | | | | | | Hello! After contributing for some time I am interested in taking a more involved role as a maintainer. When time allows it, I plan to perform code reviews, continue resolving/triaging issues, and engage with the community to see if I can offer any useful insights. My current interests are in backend work, but I plan to study the web frontend architecture to see if I can contribute there as well. Thanks for this awesome project. I hope I can both learn and contribute to its continued success! PR list: https://github.com/go-gitea/gitea/pulls?q=is%3Apr+is%3Aclosed+author%3Akemzeb Discord: kemzeb
* Refactor AppURL usage (#30885)wxiaoguang2024-05-0713-39/+138
| | | | | | | | Fix #30883 Fix #29591 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Move database operations of merging a pull request to post receive hook and ↵Lunny Xiao2024-05-078-19/+150
| | | | | | | | | | | | | | | | | | | | add a transaction (#30805) Merging PR may fail because of various problems. The pull request may have a dirty state because there is no transaction when merging a pull request. ref https://github.com/go-gitea/gitea/pull/25741#issuecomment-2074126393 This PR moves all database update operations to post-receive handler for merging a pull request and having a database transaction. That means if database operations fail, then the git merging will fail, the git client will get a fail result. There are already many tests for pull request merging, so we don't need to add a new one. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix missing migrate actions artifacts (#30874)Lunny Xiao2024-05-071-8/+16
| | | | The actions artifacts should be able to be migrate to the new storage place.
* Make "sync branch" also sync object format and add tests (#30878)wxiaoguang2024-05-064-27/+45
|
* Make sure git version&feature are always prepared (#30877)wxiaoguang2024-05-0628-144/+114
| | | Otherwise there would be more similar issues like #29287
* Get repo list with OrderBy alpha should respect owner too (#30784)65432024-05-061-2/+2
| | | | | | | | | | | | | instead of: - zowner/gcode - awesome/nul - zowner/nul - zowner/zzz we will get: - awesome/nul - zowner/gcode - zowner/nul - zowner/zzz
* Fix some UI problems (dropdown/container) (#30849)wxiaoguang2024-05-0613-200/+241
| | | | | | Follow #30345 Follow #30547 `ellipsis` / `white-space` shouldn't be put on the general dropdown components.
* Fix some UI problems (install/checkbox) (#30854)wxiaoguang2024-05-064-158/+160
| | | Fix the space between the box and label for checkboxes, and fix incorrect usages in "repo-issue.js"
* Have time.js use UTC-related getters/setters (#30857)Kemal Zebari2024-05-064-17/+22
| | | | | | | | | | | | | | | | | | | | | Before this patch, we were using `Date` getter/setter methods that worked with local time to get a list of Sundays that are in the range of some start date and end date. The problem with this was that the Sundays are in Unix epoch time and when we changed the "startDate" argument that was passed to make sure it is on a Sunday, this change would be reflected when we convert it to Unix epoch time. More specifically, I observed that we may get different Unix epochs depending on your timezone when the returned list should rather be timezone-agnostic. This led to issues in US timezones that caused the contributor, code frequency, and recent commit charts to not show any chart data. This fix resolves this by using getter/setter methods that work with UTC since it isn't dependent on timezones. Fixes #30851. --------- Co-authored-by: Sam Fisher <fisher@3echelon.local>
* Do not show monaco JS errors (#30862)wxiaoguang2024-05-051-11/+20
| | | Fix #30861
* Fix issue/PR title edit (#30858)wxiaoguang2024-05-057-137/+139
| | | | | 1. "enter" doesn't work (I think it is the last enter support for #14843) 2. if a branch name contains something like `&`, then the branch selector doesn't update
* Add result check in TestAPIEditUser (#29674)yp053272024-05-051-2/+5
| | | | | | Fix #29514 There are too many usage of `NewRequestWithValues`, so there's no need to check all of them. Just one is enough I think.
* Update README.md (#30856)Neal Caffery2024-05-031-3/+3
| | | fix typo for the Docker README
* Fix markdown URL parsing for commit ID (#30812)wxiaoguang2024-05-044-74/+115
|
* Improve grep search (#30843)wxiaoguang2024-05-036-8/+95
| | | | Reduce the context line number to 1, make "git grep" search respect the include/exclude patter, and fix #30785
* Don't only list code-enabled repositories when using repository API (#30817)Kemal Zebari2024-05-032-3/+35
| | | | | We should be listing all repositories by default. Fixes #28483.
* Fix no edit history after editing issue's title and content (#30814)yp053272024-05-036-105/+56
| | | | | Fix #30807 reuse functions in services
* Ignore useless error message "broken pipe" (#30801)wxiaoguang2024-05-033-7/+4
| | | Fix #30792
* Fix JS error on pull request page (#30838)silverwind2024-05-031-0/+1
| | | | | | Fix this error seen on PR page, regression from https://github.com/go-gitea/gitea/pull/30803: Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix body margin shifting with modals, fix error on project column edit (#30831)silverwind2024-05-031-2/+5
| | | | | | | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/30816, regression from https://github.com/go-gitea/gitea/pull/30723. Fixes: https://github.com/go-gitea/gitea/pull/30815, regression from https://github.com/go-gitea/gitea/pull/30723. Fomantic [expects a callback](https://github.com/fomantic/Fomantic-UI/blob/59d9b409879ad9413ea0a3efa4ab2e51017ad9b9/src/definitions/modules/modal.js#L530-L534) to be called during `hide` which we did not do, so it could never remove the margin it added to `body`. I do observe the body content shifting to right by 1px when modal opens, but this is a bug that existed on v1.21 as well, so not a regression. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve repo button row layout (#30668)silverwind2024-05-024-19/+52
| | | | | | | | | | | | | | | | | | | Since there is now a second `<input>` in the repo buttons, we can make a better-looking layout with no empty space, except on mobile. Also I fixed one bug with focus border on clone panel. ## Large <img width="1163" alt="Screenshot 2024-04-23 at 22 25 22" src="https://github.com/go-gitea/gitea/assets/115237/8135a572-aa67-4672-ad49-b76b06890b52"> ## Medium <img width="870" alt="Screenshot 2024-04-23 at 22 25 34" src="https://github.com/go-gitea/gitea/assets/115237/9e93f61c-3315-4a78-8328-8cefad5b50fa"> ## Mobile <img width="416" alt="Screenshot 2024-04-23 at 22 25 52" src="https://github.com/go-gitea/gitea/assets/115237/859e341f-807a-48e6-8bcf-31715963216c">
* refactor: merge ListActionTasks func to action.go file (#30811)Bo-Yi Wu2024-05-022-80/+66
| | | | | Just merge actions.go file to action.go Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Prevent automatic OAuth grants for public clients (#30790)Archer2024-05-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | This commit forces the resource owner (user) to always approve OAuth 2.0 authorization requests if the client is public (e.g. native applications). As detailed in [RFC 6749 Section 10.2](https://www.rfc-editor.org/rfc/rfc6749.html#section-10.2), > The authorization server SHOULD NOT process repeated authorization requests automatically (without active resource owner interaction) without authenticating the client or relying on other measures to ensure that the repeated request comes from the original client and not an impersonator. With the implementation prior to this patch, attackers with access to the redirect URI (e.g., the loopback interface for `git-credential-oauth`) can get access to the user account without any user interaction if they can redirect the user to the `/login/oauth/authorize` endpoint somehow (e.g., with `xdg-open` on Linux). Fixes #25061. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Catch and handle unallowed file type errors in issue attachment API (#30791)Kemal Zebari2024-05-025-2/+78
| | | | | Before, we would just throw 500 if a user passes an attachment that is not an allowed type. This commit catches this error and throws a 422 instead since this should be considered a validation error.
* Fix incorrect message id for releaes email (#30825)wxiaoguang2024-05-023-8/+20
| | | | Make generateMessageIDForRelease outputs the same format as generateMessageIDForIssue (old `createReference`)
* Add hover outline to heatmap squares (#30828)silverwind2024-05-021-0/+4
| | | | | | | | | | Makes it easier to use because you see which square is currently hovered: <img width="314" alt="Screenshot 2024-05-02 at 15 38 20" src="https://github.com/go-gitea/gitea/assets/115237/3a15dad1-2259-4f28-9fae-5cf6ad3d8798"> I did try a `scoped` style for this, but that did not work for some reason.
* Remove external API calls in `TestPassword` (#30716)silverwind2024-05-023-76/+31
| | | | | | | | | | | The test had a dependency on `https://api.pwnedpasswords.com` which caused many failures on CI recently: ``` --- FAIL: TestPassword (2.37s) pwn_test.go:41: Get "https://api.pwnedpasswords.com/range/e6b6a": context deadline exceeded (Client.Timeout exceeded while awaiting headers) FAIL coverage: 82.9% of statements ```
* Upgrade chi-binding (#30826)Lunny Xiao2024-05-022-3/+3
| | | Front port #30742
* Improve context popup rendering (#30824)silverwind2024-05-022-8/+15
| | | | | | | | | | | | | | Before, lot of empty space when no labels or body: <img width="281" alt="Screenshot 2024-05-02 at 13 51 29" src="https://github.com/go-gitea/gitea/assets/115237/8a980ccd-d53c-43a3-a059-dc8c614621e1"> After, empty space collapsed: <img width="306" alt="Screenshot 2024-05-02 at 13 51 16" src="https://github.com/go-gitea/gitea/assets/115237/8d9c154d-5de1-43d0-8536-afd9194d99b3"> All `<p>` (unsuitable) and `<small>` (discouraged in favor of css) tags are removed.
* Fix activity heat map padding & locale (#30823)wxiaoguang2024-05-024-26/+31
| | | | | | | Fix #30808 --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix issue card layout (#30800)wxiaoguang2024-05-023-10/+19
| | | Fix #30788
* Fix branch selector UI (#30803)wxiaoguang2024-05-027-117/+96
| | | Fix #30802
* Fix rounded border for segment followed by pagination (#30809)silverwind2024-05-021-0/+1
| | | | Fixes https://github.com/go-gitea/gitea/issues/30673, specifically https://github.com/go-gitea/gitea/issues/30673#issuecomment-2085329812.
* Skip gzip for some well-known compressed file types (#30796)wxiaoguang2024-05-023-1/+42
| | | Co-authored-by: silverwind <me@silverwind.io>
* Fix markdown rendering when mentioning users (#30795)wxiaoguang2024-05-024-10/+14
|
* Fix bleve fuzziness (#30799)wxiaoguang2024-05-014-10/+16
| | | | Fix #30797 Fix #30317
* Don't have `redis-cluster` as possible cache/session adapter in docs (#30794)Kemal Zebari2024-05-012-12/+10
| | | | | | This is because it doesn't exist as an adapter. The `redis` adapter already handles Redis cluster configurations. Fixes #30534.
* Add API endpoints for getting action jobs status (#26673)Chester2024-05-016-0/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sample of response, it is similar to Github actions ref https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository ``` json { "workflow_runs": [ { "id": 3, "name": "Explore-Gitea-Actions", "head_branch": "main", "head_sha": "6d8d29a9f7a01ded8f8aeb64341cb31ee1ab5f19", "run_number": 3, "event": "push", "display_title": "More job", "status": "success", "workflow_id": "demo2.yaml", "url": "/chester/test/actions/runs/3", "created_at": "2023-08-22T13:41:33-04:00", "updated_at": "2023-08-22T13:41:37-04:00", "run_started_at": "2023-08-22T13:41:33-04:00" }, { "id": 2, "name": "Explore-Gitea-Actions", "head_branch": "main", "head_sha": "6d8d29a9f7a01ded8f8aeb64341cb31ee1ab5f19", "run_number": 2, "event": "push", "display_title": "More job", "status": "success", "workflow_id": "demo.yaml", "url": "/chester/test/actions/runs/2", "created_at": "2023-08-22T13:41:30-04:00", "updated_at": "2023-08-22T13:41:33-04:00", "run_started_at": "2023-08-22T13:41:30-04:00" }, { "id": 1, "name": "Explore-Gitea-Actions", "head_branch": "main", "head_sha": "e5369ab054cae79899ba36e45ee82811a6e0acd5", "run_number": 1, "event": "push", "display_title": "Add job", "status": "failure", "workflow_id": "demo.yaml", "url": "/chester/test/actions/runs/1", "created_at": "2023-08-22T13:15:21-04:00", "updated_at": "2023-08-22T13:18:10-04:00", "run_started_at": "2023-08-22T13:15:21-04:00" } ], "total_count": 3 } ``` --------- Co-authored-by: yp05327 <576951401@qq.com> Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
* [skip ci] Updated translations via CrowdinGiteaBot2024-05-011-0/+1
|
* Improve logout from worker (#30775)wxiaoguang2024-04-303-2/+13
| | | A quick fix for #30756
* Rework and fix stopwatch (#30732)silverwind2024-04-3011-113/+99
| | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30721 and overhauls the stopwatch. Time is now shown inside the "dot" icon and on both mobile and desktop. All rendering is now done by `<relative-time>`, the `pretty-ms` dependency is dropped. Desktop: <img width="557" alt="Screenshot 2024-04-29 at 22 33 27" src="https://github.com/go-gitea/gitea/assets/115237/3a46cdbf-6af2-4bf9-b07f-021348badaac"> Mobile: <img width="640" alt="Screenshot 2024-04-29 at 22 34 19" src="https://github.com/go-gitea/gitea/assets/115237/8a2beea7-bd5d-473f-8fff-66f63fd50877"> Note for tippy: Previously, tippy instances defaulted to "menu" theme, but that theme is really only meant for `.ui.menu`, so it was not optimal for the stopwatch popover. This introduces a unopinionated `default` theme that has no padding and should be suitable for all content. I reviewed all existing uses and explicitely set the desired `theme` on all of them.
* Fix dashboard commit status null access (#30771)wxiaoguang2024-04-301-2/+2
| | | Fix #30768
* Fix tautological conditions (#30735)silverwind2024-04-305-29/+20
| | | | | | | As discovered by https://github.com/go-gitea/gitea/pull/30729. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Get repo assignees and reviewers should ignore deactivated users (#30770)65432024-04-303-8/+26
| | | | | | | | | If an user is deactivated, it should not be in the list of users who are suggested to be assigned or review-requested. old assignees or reviewers are not affected. --- *Sponsored by Kithara Software GmbH*
* Right align the "Settings" menu item in overflow-menu (#30764)wxiaoguang2024-04-305-38/+39
| | | | | | | | | | | | | I guess there could be enough people liking to make the Settings menu item right aligned. As a site admin, I found it's easier to find the right-aligned Settings menu item. Tested with various sizes: ![image](https://github.com/go-gitea/gitea/assets/2114189/92836527-2cb2-4531-9296-233c5bd698f4) ![image](https://github.com/go-gitea/gitea/assets/2114189/3a0729fc-5e33-44b5-9fb4-3a4e787405b5) ![image](https://github.com/go-gitea/gitea/assets/2114189/9845ab6b-88e3-4e5a-8d6d-2b8af259d593)
* Fix duplicate status check contexts (#30660)Zettat1232024-04-302-25/+61
| | | | | | | | | | | | | | | | | Caused by #30076. There may be some duplicate status check contexts when setting status checks for a branch protection rule. The duplicate contexts should be removed. Before: <img src="https://github.com/go-gitea/gitea/assets/15528715/97f4de2d-4868-47a3-8a99-5a180f9ac0a3" width="600px" /> After: <img src="https://github.com/go-gitea/gitea/assets/15528715/ff7289c5-9793-4090-ba31-e8cb3c85f8a3" width="600px" />