aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix agit automerge (#31207)Lunny Xiao2024-08-205-4/+155
|
* add CfTurnstileSitekey context data to all captcha templates (#31874)Rowan Bohde2024-08-192-0/+4
| | | | | | | | In the OpenID flows, the "CfTurnstileSitekey" wasn't populated, which caused those flows to fail if using Turnstile as the Captcha implementation. This adds the missing context variables, allowing Turnstile to be used in the OpenID flows.
* Add tag name in the commits list (#31082)Lunny Xiao2024-08-199-5/+64
| | | | | | | | | | | | | | | Fix #10036 This PR adds some labels for tags of this commit after the commit message on the commits table. The tag template is share as commit graph's. Desktop: <img width="1302" alt="image" src="https://github.com/go-gitea/gitea/assets/81045/ba94e1e6-2a3d-44f3-85a3-575fb5667c97"> Mobile: <img width="370" alt="image" src="https://github.com/go-gitea/gitea/assets/81045/e3eb1f44-3686-4012-aa9d-52cd88b22c0e">
* Fix actions notify bug (#31866)Lunny Xiao2024-08-193-13/+18
| | | | Try to fix https://github.com/go-gitea/gitea/issues/31757#issuecomment-2295131062
* Actions support workflow dispatch event (#28163)胖梁2024-08-1810-17/+580
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix #23668 My plan: * In the `actions.list` method, if workflow is selected and IsAdmin, check whether the on event contains `workflow_dispatch`. If so, display a `Run workflow` button to allow the user to manually trigger the run. * Providing a form that allows users to select target brach or tag, and these parameters can be configured in yaml * Simple form validation, `required` input cannot be empty * Add a route `/actions/run`, and an `actions.Run` method to handle * Add `WorkflowDispatchPayload` struct to pass the Webhook event payload to the runner when triggered, this payload carries the `inputs` values and other fields, doc: [workflow_dispatch payload](https://docs.github.com/en/webhooks/webhook-events-and-payloads#workflow_dispatch) Other PRs * the `Workflow.WorkflowDispatchConfig()` method still return non-nil when workflow_dispatch is not defined. I submitted a PR https://gitea.com/gitea/act/pulls/85 to fix it. Still waiting for them to process. Behavior should be same with github, but may cause confusion. Here's a quick reminder. * [Doc](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch) Said: This event will `only` trigger a workflow run if the workflow file is `on the default branch`. * If the workflow yaml file only exists in a non-default branch, it cannot be triggered. (It will not even show up in the workflow list) * If the same workflow yaml file exists in each branch at the same time, the version of the default branch is used. Even if `Use workflow from` selects another branch ![image](https://github.com/go-gitea/gitea/assets/3114995/4bf596f3-426b-48e8-9b8f-0f6d18defd79) ```yaml name: Docker Image CI on: workflow_dispatch: inputs: logLevel: description: 'Log level' required: true default: 'warning' type: choice options: - info - warning - debug tags: description: 'Test scenario tags' required: false type: boolean boolean_default_true: description: 'Test scenario tags' required: true type: boolean default: true boolean_default_false: description: 'Test scenario tags' required: false type: boolean default: false environment: description: 'Environment to run tests against' type: environment required: true default: 'environment values' number_required_1: description: 'number ' type: number required: true default: '100' number_required_2: description: 'number' type: number required: true default: '100' number_required_3: description: 'number' type: number required: true default: '100' number_1: description: 'number' type: number required: false number_2: description: 'number' type: number required: false number_3: description: 'number' type: number required: false env: inputs_logLevel: ${{ inputs.logLevel }} inputs_tags: ${{ inputs.tags }} inputs_boolean_default_true: ${{ inputs.boolean_default_true }} inputs_boolean_default_false: ${{ inputs.boolean_default_false }} inputs_environment: ${{ inputs.environment }} inputs_number_1: ${{ inputs.number_1 }} inputs_number_2: ${{ inputs.number_2 }} inputs_number_3: ${{ inputs.number_3 }} inputs_number_required_1: ${{ inputs.number_required_1 }} inputs_number_required_2: ${{ inputs.number_required_2 }} inputs_number_required_3: ${{ inputs.number_required_3 }} jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - run: ls -la - run: env | grep inputs - run: echo ${{ inputs.logLevel }} - run: echo ${{ inputs.boolean_default_false }} ``` ![image](https://github.com/go-gitea/gitea/assets/3114995/a58a842d-a0ff-4618-bc6d-83a9596d07c8) ![image](https://github.com/go-gitea/gitea/assets/3114995/44a7cca5-7bd4-42a9-8723-91751a501c88) --------- Co-authored-by: TKaxv_7S <954067342@qq.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Denys Konovalov <kontakt@denyskon.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2024-08-1910-204/+12
|
* [skip ci] Updated translations via CrowdinGiteaBot2024-08-181-3/+3
|
* Fix overflowing content in action run log (#31842)Adrian Hirt2024-08-161-0/+1
| | | | | | | | | When a long line with characters such as dots is returned by a step in an action (e.g. by the output of the Ruby on Rails test runner), it overflows the log container, causing the page to scroll sideways. This PR adds the CSS `overflow-wrap: anywhere;` to the `.job-step-section .job-step-logs .job-log-line .log-msg` selector, which causes such lines to wrap as well
* Upgrade `htmx` to `2.0.2` (#31847)Yarden Shoham2024-08-162-6/+5
| | | | | | Tested `Follow`, `Star`, `Watch`, and the admin dashboard page. All functionality remains unchanged. Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* fix the component of access token list not mounted (#31824)sillyguodong2024-08-164-21/+28
| | | try to fix #31771
* Avoid returning without written ctx when posting PR (#31843)Jason Song2024-08-161-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #31625. If `pull_service.NewPullRequest` return an error which misses each `if` check, `CompareAndPullRequestPost` will return immediately, since it doesn't write the HTTP response, a 200 response with empty body will be sent to clients. ```go if err := pull_service.NewPullRequest(ctx, repo, pullIssue, labelIDs, attachments, pullRequest, assigneeIDs); err != nil { if repo_model.IsErrUserDoesNotHaveAccessToRepo(err) { ctx.Error(http.StatusBadRequest, "UserDoesNotHaveAccessToRepo", err.Error()) } else if git.IsErrPushRejected(err) { // ... ctx.JSONError(flashError) } else if errors.Is(err, user_model.ErrBlockedUser) { // ... ctx.JSONError(flashError) } else if errors.Is(err, issues_model.ErrMustCollaborator) { // ... ctx.JSONError(flashError) } return } ``` Not sure what kind of error can cause it to happen, so this PR just expose it. And we can fix it when users report that creating PRs failed with error responses. It's all my guess since I cannot reproduce the problem, but even if it's not related, the code here needs to be improved.
* Fix raw wiki links (#31825)Zettat1232024-08-165-32/+84
| | | | | | | | | | | | | | Fix #31395 This regression is introduced by #30273. To find out how GitHub handles this case, I did [some tests](https://github.com/go-gitea/gitea/issues/31395#issuecomment-2278929115). I use redirect in this PR instead of checking if the corresponding `.md` file exists when rendering the link because GitHub also uses redirect. With this PR, there is no need to resolve the raw wiki link when rendering a wiki page. If a wiki link points to a raw file, access will be redirected to the raw link.
* [skip ci] Updated translations via CrowdinGiteaBot2024-08-161-0/+3
|
* Add missing repository type filter parameters to pager (#31832)yp053272024-08-154-0/+61
| | | | | | | | | Fix #31807 ps: the newly added params's value will be changed. When the first time you selected the filter, the values of params will be `0` or `1` But in pager it will be `true` or `false`. So do we have `boolToInt` function?
* Fix panic of ssh public key page after deletion of auth source (#31829)Lunny Xiao2024-08-152-16/+17
| | | | | | Fix #31730 This PR rewrote the function `PublicKeysAreExternallyManaged` with a simple test. The new function removed the loop to make it more readable.
* [skip ci] Updated translations via CrowdinGiteaBot2024-08-151-0/+1
|
* render plain text file if the LFS object doesn't exist (#31812)Rowan Bohde2024-08-157-5/+18
| | | | | | | | We had an issue where a repo was using LFS to store a file, but the user did not push the file. When trying to view the file, Gitea returned a 500 HTTP status code referencing `ErrLFSObjectNotExist`. It appears the intent was the render this file as plain text, but the conditional was flipped. I've also added a test to verify that the file is rendered as plain text.
* Add spacing to global error message (#31826)Sebastian Luino2024-08-141-1/+1
| | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/31717. Include Typescript files in Tailwind config so they can be pre-processed. ![Screenshot from 2024-08-13 08-44-33](https://github.com/user-attachments/assets/196d7801-e299-4000-8b39-cd9f89917f17)
* [skip ci] Updated translations via CrowdinGiteaBot2024-08-141-0/+13
|
* Fixes for unreachable project issues when transfer repository from ↵Edip Emre Bodur2024-08-135-1/+32
| | | | | | | | | | | | | | organization (#31770) When transferring repositories that have issues linked to a project board to another organization, the issues remain associated with the original project board. This causes the columns in the project board to become bugged, making it difficult to move other issues in or out of the affected columns. As a solution, I removed the issue relations since the other organization does not have this project table. Fix for #31538 Co-authored-by: Jason Song <i@wolfogre.com>
* [skip ci] Updated translations via CrowdinGiteaBot2024-08-131-0/+13
|
* Scroll images in project issues separately from the remaining issue (#31683)Simon Priet2024-08-132-2/+7
| | | | | | | | | As discussed in #31667 & #26561, when a card on a Project contains images, they can overflow the card on its containing column. This aims to fix this issue via snapping scrollbars. --- Issue #31667 is open to discussion as there should be room for improvement.
* Support issue template assignees (#31083)Zettat1232024-08-126-24/+41
| | | Resolve #13955
* Add `:focus-visible` style to buttons (#31799)silverwind2024-08-121-0/+4
| | | | | | | | | | | Buttons now show a focus style via [`:focus-visible`](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible) when the browser deems the focus to be important, like for example when the button is focused via keyboard navigation. <img width="492" alt="Screenshot 2024-08-07 at 22 12 51" src="https://github.com/user-attachments/assets/060568b1-1599-4c56-bafb-b36ebb1bec35"> <img width="479" alt="image" src="https://github.com/user-attachments/assets/885f4e10-f496-47f0-8ae5-45827ded09f8">
* [skip ci] Updated licenses and gitignoresGiteaBot2024-08-122-107/+11
|
* Show lock owner instead of repo owner on LFS setting page (#31788)Jason Song2024-08-115-10/+162
| | | | | | | | | | | | | Fix #31784. Before: <img width="1648" alt="image" src="https://github.com/user-attachments/assets/03f32545-4a85-42ed-bafc-2b193a5d8023"> After: <img width="1653" alt="image" src="https://github.com/user-attachments/assets/e5bcaf93-49cb-421f-aac1-5122bc488b02">
* Move repository visibility to danger zone in the settings area (#31126)Fábio Barkoski2024-08-114-23/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved repository visibility to the danger zone in the settings area. To change the visibility, it is necessary to go to the danger zone, click on the private/public button, and accept the change in the modal. Resolves: #23826 --- ## Screenshots <details> <summary>Before</summary> Private repo: ![Private repo](https://github.com/go-gitea/gitea/assets/65479069/4313492a-4854-48bc-9f47-974e3539d791) Public repo: ![Public repo](https://github.com/go-gitea/gitea/assets/65479069/1c45f6e4-ee93-4799-9331-e9d4a7e0f16a) </details> <details> <summary>After</summary> Make private: ![Screenshot from 2024-05-28 21-35-38](https://github.com/go-gitea/gitea/assets/65479069/4887e28a-0514-4990-aa69-bf3ddc7e6c7d) Make private modal ![Screenshot from 2024-06-13 23-55-55](https://github.com/go-gitea/gitea/assets/65479069/9f5a7604-069b-41a2-973b-ee2d58e85953) ![Screenshot from 2024-06-13 23-53-09](https://github.com/go-gitea/gitea/assets/65479069/06c22726-eab2-4bce-8df7-62849dcce974) Make public: ![Screenshot from 2024-05-28 21-34-27](https://github.com/go-gitea/gitea/assets/65479069/6d388f99-0356-48a0-9d85-320cdba55179) Make public modal ![Screenshot from 2024-06-13 23-53-37](https://github.com/go-gitea/gitea/assets/65479069/8944972e-f2d4-4aea-ba96-b892febb5ced) </details> --------- Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
* [skip ci] Updated translations via CrowdinGiteaBot2024-08-111-0/+1
|
* Add types to various low-level functions (#31781)silverwind2024-08-1013-77/+123
| | | | | | | | Adds types to various low-level modules. All changes are type-only, no runtime changes. `tsc` now reports 38 less errors. One problem was that `@types/sortablejs` does not accept promise return in its functions which triggered the linter, so I disabled the rules on those line.
* Add warning message in merge instructions when `AutodetectManualMerge` was ↵a10121127962024-08-103-1/+10
| | | | | | | | | | | | | | | | | | | | not enabled (#31805) not enabled quick-f-i-x https://github.com/go-gitea/gitea/issues/31433 ? , maybe need more disscusion about better solutions. example view: ![image](https://github.com/user-attachments/assets/2af7e1e8-42b9-4473-89c7-12d4a9205d3f) adtion notes about how to enable `AutodetectManualMerge` ![image](https://github.com/user-attachments/assets/28f84317-367a-40d8-b50d-a19ef7c664d4) Signed-off-by: a1012112796 <1012112796@qq.com>
* Show latest run when visit /run/latest (#31808)FuXiaoHei2024-08-102-10/+32
| | | | | | | | | Proposal from https://github.com/go-gitea/gitea/issues/27911#issuecomment-2271982172 When visit latest run path, such as `/{user}/{repo}/actions/runs/latest`. It renders latest run instead of index=0 currently.
* Fix typo for `LOG_COMPRESSION` in ini (#31809)Jason Song2024-08-101-1/+1
| | | | | | | Follow #31761 --------- Co-authored-by: silverwind <me@silverwind.io>
* Add label `docs-update-needed` for PRs that modify `app.example.ini` (#31810)Jason Song2024-08-101-0/+5
| | | | | | To help #31536. Or it's easy to forget to update https://gitea.com/gitea/docs when modifying `app.example.ini`.
* Fix `IsObjectExist` with gogit (#31790)Jason Song2024-08-094-10/+121
| | | | | | | | | | | | | Fix #31271. When gogit is enabled, `IsObjectExist` calls `repo.gogitRepo.ResolveRevision`, which is not correct. It's for checking references not objects, it could work with commit hash since it's both a valid reference and a commit object, but it doesn't work with blob objects. So it causes #31271 because it reports that all blob objects do not exist.
* Support compression for Actions logs (#31761)Jason Song2024-08-0915-9/+615
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support compression for Actions logs to save storage space and bandwidth. Inspired by https://github.com/go-gitea/gitea/issues/24256#issuecomment-1521153015 The biggest challenge is that the compression format should support [seekable](https://github.com/facebook/zstd/blob/dev/contrib/seekable_format/zstd_seekable_compression_format.md). So when users are viewing a part of the log lines, Gitea doesn't need to download the whole compressed file and decompress it. That means gzip cannot help here. And I did research, there aren't too many choices, like bgzip and xz, but I think zstd is the most popular one. It has an implementation in Golang with [zstd](https://github.com/klauspost/compress/tree/master/zstd) and [zstd-seekable-format-go](https://github.com/SaveTheRbtz/zstd-seekable-format-go), and what is better is that it has good compatibility: a seekable format zstd file can be read by a regular zstd reader. This PR introduces a new package `zstd` to combine and wrap the two packages, to provide a unified and easy-to-use API. And a new setting `LOG_COMPRESSION` is added to the config, although I don't see any reason why not to use compression, I think's it's a good idea to keep the default with `none` to be consistent with old versions. `LOG_COMPRESSION` takes effect for only new log files, it adds `.zst` as an extension to the file name, so Gitea can determine if it needs decompression according to the file name when reading. Old files will keep the format since it's not worth converting them, as they will be cleared after #31735. <img width="541" alt="image" src="https://github.com/user-attachments/assets/e9598764-a4e0-4b68-8c2b-f769265183c9">
* Add issue comment when moving issues from one column to another of the ↵Lunny Xiao2024-08-0911-54/+181
| | | | | | | | | | | | | | | | | project (#29311) Fix #27278 Replace #27816 This PR adds a meta-comment for an issue when dragging an issue from one column to another of a project. <img width="600" alt="image" src="https://github.com/go-gitea/gitea/assets/81045/5fc1d954-430e-4db0-aaee-a00006fa91f5"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: yp05327 <576951401@qq.com>
* [skip ci] Updated translations via CrowdinGiteaBot2024-08-091-2/+2
|
* Fix RPM resource leak (#31794)KN4CK3R2024-08-083-36/+44
| | | | | | | Fixes a resource leak introduced by #27069. - add defer - move sign code out of `repository.go`
* Add `TAGS` to `TEST_TAGS` and fix bugs found with gogit (#31791)Jason Song2024-08-073-2/+16
| | | | | | | | | | | Found at https://github.com/go-gitea/gitea/pull/31790#issuecomment-2272898915 `unit-tests-gogit` never work since the workflow set `TAGS` with `gogit`, but the Makefile use `TEST_TAGS`. This PR adds the values of `TAGS` to `TEST_TAGS`, ensuring that setting `TAGS` is always acceptable and avoiding confusion about which one should be set.
* Fix protected branch files detection on pre_receive hook (#31778)Lunny Xiao2024-08-066-14/+81
| | | | | | | | | | | | | | | Fix #31738 When pushing a new branch, the old commit is zero. Most git commands cannot recognize the zero commit id. To get the changed files in the push, we need to get the first diverge commit of this branch. In most situations, we could check commits one by one until one commit is contained by another branch. Then we will think that commit is the diverge point. And in a pre-receive hook, this will be more difficult because all commits haven't been merged and they actually stored in a temporary place by git. So we need to bring some envs to let git know the commit exist.
* Add signature support for the RPM module (#27069)Exploding Dragon2024-08-065-5/+82
| | | | | | | | close #27031 If the rpm package does not contain a matching gpg signature, the installation will fail. See (#27031) , now auto-signing rpm uploads. This option is turned off by default for compatibility.
* Fix null requested_reviewer from API (#31773)Edip Emre Bodur2024-08-055-16/+90
| | | | | | | | If the assign the pull request review to a team, it did not show the members of the team in the "requested_reviewers" field, so the field was null. As a solution, I added the team members to the array. fix #31764
* [skip ci] Updated licenses and gitignoresGiteaBot2024-08-051-0/+10
|
* Rename head branch of pull requests when renaming a branch (#31759)Lunny Xiao2024-08-041-0/+7
| | | Fix #31716
* [skip ci] Updated translations via CrowdinGiteaBot2024-08-042-3/+55
|
* Fix wiki revision pagination (#31760)Lunny Xiao2024-08-031-0/+1
| | | | Fix #31755
* [skip ci] Updated translations via CrowdinGiteaBot2024-08-031-1/+18
|
* Update JS dependencies (#31766)silverwind2024-08-023-625/+928
|
* Upgrade bleve to 2.4.2 (#31762)Lunny Xiao2024-08-022-15/+15
|
* Remove unused code from models/repos/release.go (#31756)Kemal Zebari2024-08-021-26/+0
| | | These blocks aren't used anywhere else when doing a grep search.