aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add "Cancel workflow run" button to Actions list page (#34817)NorthRealm2025-06-224-3/+9
|
* Use `shallowRef` instead of `ref` in `.vue` files where possible (#34813)Kilisei2025-06-229-51/+51
| | | | | | | | | | | This PR improves some `.vue` components by using `shallowRef instead of ref`, which `should improve performance`. It's probably not significant, but it's an improvement because Vue no longer deep watches the ref (shallowRef). Also i used `useTemplateRef` instead of `ref`. --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Edit file workflow for creating a fork and proposing changes (#34240)Brecht Van Lommel2025-06-2226-419/+740
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When viewing a file that the user can't edit because they can't write to the branch, the new, upload, patch, edit and delete functionality is no longer disabled. If no user fork of the repository exists, there is now a page to create one. It will automatically create a fork with a single branch matching the one being viewed, and a unique repository name will be automatically picked. When a fork exists, but it's archived, a mirror or the user can't write code to it, there will instead be a message explaining the situation. If the usable fork exists, a message will appear at the top of the edit page explaining that the changes will be applied to a branch in the fork. The base repository branch will be pushed to a new branch to the fork, and then the edits will be applied on top. The suggestion to fork happens when accessing /_edit/, so that for example online documentation can have an "edit this page" link to the base repository that does the right thing. Also includes changes to properly report errors when trying to commit to a new branch that is protected, and when trying to commit to an existing branch when choosing the new branch option. Resolves #9017, #20882 --------- Co-authored-by: Brecht Van Lommel <brecht@blender.org> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor packages (#34777)wxiaoguang2025-06-228-247/+149
|
* Refactor wiki (#34805)wxiaoguang2025-06-2212-173/+71
| | | Remove unclear code
* [skip ci] Updated translations via CrowdinGiteaBot2025-06-2228-164/+62
|
* Upgrade htmx to 2.0.5 (#34809)Yarden Shoham2025-06-212-5/+5
| | | | | | | | | Release notes: https://github.com/bigskysoftware/htmx/releases/tag/v2.0.5 Tested Star, Watch, and the admin dashboard page. All functionality remains unchanged. Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Forks repository list page follow other repositories page (#34784)Lunny Xiao2025-06-2112-27/+26
| | | | | | | | | | | | Replace #24130 Before: ![image](https://github.com/user-attachments/assets/98c39bce-bdbf-4fc1-b476-527c5139e01f) After: ![image](https://github.com/user-attachments/assets/65fef5b8-63b9-4283-b8ea-2ac2f27cb001)
* Add post-installation redirect based on admin account status (#34493)Kerwin Bryant2025-06-217-4/+32
| | | | | | | | | | | | | | | | This PR adds a feature to direct users to appropriate pages after system installation: - If no admin credentials were provided during installation, redirect to the registration page with a prominent notice about creating the first administrative account - If admin credentials were already set, redirect directly to the login page ![4d396ad132d9b57fc4f45a62117177f1](https://github.com/user-attachments/assets/3a5d8700-9194-4d3b-a862-e64c8c347932) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Rework delete org and rename org UI (#34762)Lunny Xiao2025-06-2117-207/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # What's the problem of the original implementation Renaming organization will mix with organization's information change make the operation difficult to keep consistent. This PR created a danger zone like what's repository setting. It also moved organization's `rename` and `delete` operations to this zone. The original updating repository will not change the name any more. This is also a step to extract the `updaterepository` function completely. Before: ![image](https://github.com/user-attachments/assets/d097dfdf-07be-4d79-8fcf-e78822515575) ![image](https://github.com/user-attachments/assets/42ee832c-cb44-41ec-9fe3-92a1c94747d2) After: ![image](https://github.com/user-attachments/assets/f7700ed7-f104-4302-a924-09e118f24be3) ![image](https://github.com/user-attachments/assets/4c49952a-578e-4d14-bd01-4a68c9e02412) ![image](https://github.com/user-attachments/assets/814829d3-00fe-4e87-ae05-625c129170d2) ![image](https://github.com/user-attachments/assets/b067b263-c909-4b48-b23c-73481c32d350) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor editor (#34780)wxiaoguang2025-06-2141-1634/+973
| | | A complete rewrite
* Improve img lazy loading (#34804)wxiaoguang2025-06-2111-17/+30
| | | Related #32051 and #13526
* [skip ci] Updated translations via CrowdinGiteaBot2025-06-212-2/+3
|
* Fix Feishu webhook signature verification (#34788)Snowball_2332025-06-203-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Fix Feishu Webhook Signature Verification This PR implements proper signature verification for Feishu (Lark) webhooks according to the [official documentation](https://open.feishu.cn/document/client-docs/bot-v3/add-custom-bot). ## Changes - Implemented the `GenSign` function based on Feishu's official Go sample code - Modified the webhook request creation to include timestamp and signature in the payload when a secret is configured - Fixed the signature generation algorithm to properly use HMAC-SHA256 with the correct string format ## Implementation Details The signature verification works as follows: 1. When a webhook secret is provided, a timestamp is generated 2. The signature string is created using `timestamp + "\n" + secret` 3. The HMAC-SHA256 algorithm is applied to an empty string using the signature string as the key 4. The result is Base64 encoded to produce the final signature 5. Both timestamp and signature are added to the payload According to Feishu's documentation, the timestamp must be within 1 hour (3600 seconds) of the current time to be considered valid. ## Security Note Feishu emphasizes the importance of keeping webhook URLs secure. Do not disclose them on GitHub, blogs, or any public sites to prevent unauthorized use. ## References - [Feishu Custom Bot Documentation](https://open.feishu.cn/document/client-docs/bot-v3/add-custom-bot) --------- Co-authored-by: hiifong <i@hiif.ong> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Upgrade chi to v5.2.2 (#34798)Lunny Xiao2025-06-202-3/+3
|
* Fix the issue of abnormal interface when there is no issue-item on the ↵Kerwin Bryant2025-06-201-0/+1
| | | | project page (#34791)
* Fix container range bug (#34795)wxiaoguang2025-06-212-3/+17
| | | Fix #34792 and add new tests
* Fix OCI manifest parser (#34797)wxiaoguang2025-06-214-28/+34
| | | Do not parse the media type we don't know.
* Bump poetry feature to new url for dev container (#34787)yp053272025-06-201-1/+1
|
* Add workflow_run api + webhook (#33964)ChristopherHX2025-06-2051-231/+2811
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements - https://docs.github.com/en/rest/actions/workflow-jobs?apiVersion=2022-11-28#list-jobs-for-a-workflow-run--code-samples - https://docs.github.com/en/rest/actions/workflow-jobs?apiVersion=2022-11-28#get-a-job-for-a-workflow-run--code-samples - https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository - https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#get-a-workflow-run - `/actions/runs` for global + user + org (Gitea only) - `/actions/jobs` for global + user + org + repository (Gitea only) - workflow_run webhook + action trigger - limitations - workflow id is assigned to a string, this may result into problems in strongly typed clients Fixes - workflow_job webhook url to no longer contain the `runs/<run>` part to align with api - workflow instance does now use it's name inside the file instead of filename if set Refactoring - Moved a lot of logic from workflows/workflow_job into a shared module used by both webhook and api TODO - [x] Verify Keda Compatibility - [x] Edit Webhook API bug is resolved Closes https://github.com/go-gitea/gitea/issues/23670 Closes https://github.com/go-gitea/gitea/issues/23796 Closes https://github.com/go-gitea/gitea/issues/24898 Replaces https://github.com/go-gitea/gitea/pull/28047 and is much more complete --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2025-06-201-0/+2
|
* Add ff_only parameter to POST /repos/{owner}/{repo}/merge-upstream (#34770)Dan Čermák2025-06-196-3/+45
| | | | | | | | | The merge-upstream route was so far performing any kind of merge, even those that would create merge commits and thus make your branch diverge from upstream, requiring manual intervention via the git cli to undo the damage. With the new optional parameter ff_only, we can instruct gitea to error out, if a non-fast-forward merge would be performed.
* Add repo file tree item link behavior (#34730)bytedream2025-06-205-105/+86
| | | | | | | | | | Converts the repo file tree items into `<a>` elements to have default link behavior. Dynamic content load is still done when no special key is pressed while clicking on an item. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix tag target (#34781)wxiaoguang2025-06-191-3/+3
| | | Fix #34779
* [skip ci] Updated translations via CrowdinGiteaBot2025-06-191-0/+25
|
* Upgrade `gopls` to v0.19.0, add `make fix` (#34772)silverwind2025-06-186-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade to [v0.19.0](https://github.com/golang/tools/releases/tag/gopls%2Fv0.19.0) and fix issues. Runs with new `warning` serverity setting. This likely does less checks than before. Additionally, add `make fix` which runs modernize. This is also verified on CI. For the record, here are the issues discoverd when running with `info` severity, in case we want to fix these: ``` tests/integration/repo_test.go:95:5-14: could use tagged switch on i tests/integration/api_packages_generic_test.go:149:4-64: could use tagged switch on setting.Packages.Storage.Type services/webhook/msteams_test.go:33:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:59:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:85:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:111:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:138:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:161:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:187:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:213:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:239:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:266:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:407:4-33: could use tagged switch on fact.Name tests/integration/api_packages_conan_test.go:350:6-33: could use tagged switch on pf.Name models/issues/tracked_time_test.go:98:3-18: could use tagged switch on user.ID tests/integration/api_token_test.go:505:5-43: could use tagged switch on minRequiredLevel services/gitdiff/gitdiff.go:220:33-46: method "getLineLegacy" is unused ``` --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Refactor packages (func name & UI) (#34773)wxiaoguang2025-06-1829-51/+73
| | | | | | 1. Use `OpenXxx` instead of `GetXxx` because the returned readers should be correctly closed, and clarify the behaviors of the functions: they increase the download counter 2. Use `packages-content` styles instead of `issue-content`
* Fix remaining issues after `gopls modernize` formatting (#34771)silverwind2025-06-187-42/+10
| | | | | | | | Followup https://github.com/go-gitea/gitea/pull/34751, fix all remaining marked issues. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix some package registry problems (#34759)wxiaoguang2025-06-1911-60/+118
| | | | 1. Fix #33787 2. Fix container image display
* Fix incorrect cli default values and default command (#34765)wxiaoguang2025-06-187-43/+76
|
* Support annotated tags when using create release API (#31840)Kemal Zebari2025-06-183-1/+8
| | | | | | | | | | This adds a new field, "tag_message", that represents the message of the annotated tag. Resolves #31835. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* when using rules to delete packages, remove unclean bugs (#34632)anthony-zh2025-06-185-132/+145
| | | | | | | | | | | | | By default, the code extracts 200 package versions. If too many packages are generated every day or if rule cleaning is enabled later, which means there are more than 200 versions corresponding to the library package, it may not be cleaned up completely, resulting in residue Fix #31961 --------- Co-authored-by: yeyuanjie <yecao100@126.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix readme path and markdown link paste (#34755)wxiaoguang2025-06-183-4/+4
|
* Remove unused param `doer` (#34545)Philip Peterson2025-06-1816-26/+20
|
* Improve alignment of commit status icon on commit page (#34750)silverwind2025-06-181-1/+1
| | | | | | | | | | | | | | | | | Before, icon vertically misaligned: <img width="243" alt="Screenshot 2025-06-17 at 18 14 26" src="https://github.com/user-attachments/assets/ac515c6d-25bd-44da-88be-a1d93c137ed0" /> After, icon correctly vertically centered: <img width="244" alt="Screenshot 2025-06-17 at 18 14 40" src="https://github.com/user-attachments/assets/41556d52-aa15-4bfb-82e2-91ed774cf2b0" /> I think it's fine to single out this one case and not alter `flex-text-inline` because that class seems to work well in other places.
* Run `gopls modernize` on codebase (#34751)silverwind2025-06-18190-696/+369
| | | | Recent modernize fixes: https://github.com/golang/tools/commits/master/gopls/internal/analysis/modernize
* Refactor some file edit related code (#34744)wxiaoguang2025-06-188-225/+224
| | | | | | | Follow up #34350 --------- Co-authored-by: delvh <dev.lh@web.de>
* [skip ci] Updated translations via CrowdinGiteaBot2025-06-184-25/+437
|
* Fix ghost user in feeds when pushing in an actions, it should be ↵Lunny Xiao2025-06-174-28/+14
| | | | gitea-actions (#34703)
* upgrade orgmode to v1.8.0 (#34721)Lunny Xiao2025-06-172-3/+3
|
* Support title and body query parameters for new PRs (#34537)endo0911engineer2025-06-171-1/+7
| | | | | | | | | | | | | | | | | | | | Currently, Gitea supports title and body query parameters when creating new issues, allowing pre-filling those fields via URL parameters. However, similar support for pull requests (PRs) does not exist. This feature adds support for the title, body, and quick_pull query parameters in the new pull request creation page. These parameters work similarly to GitHub’s behavior, allowing users to pre-populate the PR title and body, and optionally expand the PR creation form automatically. By supporting these query parameters, it improves the usability and automation capabilities when creating pull requests via direct URLs, aligning Gitea more closely with GitHub’s user experience. --------- Co-authored-by: root <root@DESKTOP-UPANUTP> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve nuget/rubygems package registries (#34741)wxiaoguang2025-06-1716-136/+335
| | | | | | | | 1. Add some missing (optional) fields for nuget v2, and sort the fields to make it easier to maintain 2. Add missing "platform" for rubygems: `VERSION-PLATFORM` and `VERSION_PLATFORM` Co-authored-by: Giteabot <teabot@gitea.io>
* Replace update repository function in some places (#34566)Lunny Xiao2025-06-1711-57/+121
| | | | | | | | | | | | `UpdateAllCols` is dangerous, the columns should be updated when necessary. This PR replaces some `updateRepository` invokes to reduce possible problems and wrongly updated time. Some parts have been fixed in #34388, but some are hidden in the function `updateRepository`. Alternatively, using `UpdateRepositoryColsNoAutoTime` to update the changed columns. Some `UpdateRepoSize` invokes are duplicated, so they will be removed when extracting from `updateRepository`.
* remove unnecessary duplicate code (#34733)Lunny Xiao2025-06-171-30/+5
|
* fix: prevent double markdown link brackets when pasting URL (#34745)MaxWebZ2025-06-172-7/+26
| | | | | | | | | | | | | | When adding a link using the "Add a link" button in comment editor, pasting a URL resulted in incorrect Markdown formatting (double brackets) instead of replacing the placeholder text. This fix adds a context check to prevent creating a new markdown link when we're already inside an existing one. Fixes #34740 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix JS error for "select" dropdown (#34743)wxiaoguang2025-06-171-2/+2
| | | Regression of recent dropdown filter change.
* [skip ci] Updated translations via CrowdinGiteaBot2025-06-172-154/+144
|
* Allow renaming/moving binary/LFS files in the UI (#34350)bytedream2025-06-1612-115/+417
| | | | | | | | | | | | | | | | | | | Adds the ability to rename/move binary files like binary blobs or images and files that are too large in the web ui. This was purposed in #24722, along with the ability edit images via an upload of a new image, which I didn't implement here (could be done in a separate PR). Binary file content: ![binary](https://github.com/user-attachments/assets/61d9ff71-25d3-4832-9288-452cdefc7283) File too large: ![toolarge](https://github.com/user-attachments/assets/3b42dbd0-e76a-4c3c-92d2-52ebffedea64) GitHub does the same (I've copied the text from there): ![gh](https://github.com/user-attachments/assets/e1499813-fb71-4544-9d58-086046a5f13e)
* Clean bindata (#34728)wxiaoguang2025-06-164-15/+2
| | | Follow #34692
* Refactor container and UI (#34736)wxiaoguang2025-06-1610-80/+153
|