aboutsummaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
...
* Add workflow_run api + webhook (#33964)ChristopherHX2025-06-202-0/+898
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add ff_only parameter to POST /repos/{owner}/{repo}/merge-upstream (#34770)Dan Čermák2025-06-191-0/+4
| | | | | | | | | 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.
* Refactor packages (func name & UI) (#34773)wxiaoguang2025-06-182-6/+6
| | | | | | 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 some package registry problems (#34759)wxiaoguang2025-06-193-9/+26
| | | | 1. Fix #33787 2. Fix container image display
* Support annotated tags when using create release API (#31840)Kemal Zebari2025-06-181-0/+4
| | | | | | | | | | This adds a new field, "tag_message", that represents the message of the annotated tag. Resolves #31835. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix readme path and markdown link paste (#34755)wxiaoguang2025-06-181-1/+1
|
* 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.
* Fix ghost user in feeds when pushing in an actions, it should be ↵Lunny Xiao2025-06-171-1/+5
| | | | gitea-actions (#34703)
* Allow renaming/moving binary/LFS files in the UI (#34350)bytedream2025-06-163-23/+32
| | | | | | | | | | | | | | | | | | | 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)
* Refactor container and UI (#34736)wxiaoguang2025-06-161-1/+11
|
* Prevent duplicate form submissions when creating forks (#34714)Kerwin Bryant2025-06-161-1/+1
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Improve instance wide ssh commit signing (#34341)ChristopherHX2025-06-111-0/+56
| | | | | | | | | | | | | | | | | * Signed SSH commits can look in the UI like on GitHub, just like gpg keys today in Gitea * SSH format can be added in gitea config * SSH Signing worked before with DEFAULT_TRUST_MODEL=committer `TRUSTED_SSH_KEYS` can be a list of additional ssh public key contents to trust for every user of this instance Closes #34329 Related #31392 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix commit message rendering and some UI problems (#34680)wxiaoguang2025-06-101-1/+2
| | | | | | * Fix #34679 * Fix #34676 * Fix #34674 * Fix #34526
* Keeping consistent between UI and API about combined commit status state and ↵Lunny Xiao2025-06-091-8/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix some bugs (#34562) Extract from #34531 ## Move Commit status state to a standalone package Move the state from `structs` to `commitstatus` package. It also introduce `CommitStatusStates` so that the combine function could be used from UI and API logic. ## Combined commit status Changed This PR will follow Github's combined commit status. Before this PR, every commit status could be a combined one. According to https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#get-the-combined-status-for-a-specific-reference > Additionally, a combined state is returned. The state is one of: > failure if any of the contexts report as error or failure > pending if there are no statuses or a context is pending > success if the latest status for all contexts is success This PR will follow that rule and remove the `NoBetterThan` logic. This also fixes the inconsistent between UI and API. In the API convert package, it has implemented this which is different from the UI. It also fixed the missing `URL` and `CommitURL` in the API. ## `CalcCommitStatus` return nil if there is no commit statuses The behavior of `CalcCommitStatus` is changed. If the parameter commit statuses is empty, it will return nil. The reference places should check the returned value themselves.
* Misc CSS fixes (#34638)silverwind2025-06-073-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1. apply [`text-wrap: balance`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-wrap#balance) to various places making the text wrapping nicer, moving `empty-placeholder` CSS to base because it's not repo-specific. <img width="537" alt="Screenshot 2025-06-07 at 15 09 00" src="https://github.com/user-attachments/assets/8b37d031-269d-4ab3-ba59-2ac469c431e4" /> <img width="514" alt="Screenshot 2025-06-07 at 15 11 16" src="https://github.com/user-attachments/assets/27a63117-be1d-4797-80f7-9ed14cca41dc" /> <img width="346" alt="Screenshot 2025-06-07 at 15 22 26" src="https://github.com/user-attachments/assets/2f371384-0330-4a00-bb79-bc3c50ba5c91" /> 2. fix overflow-related bug on actions run list, before: <img width="302" alt="Screenshot 2025-06-07 at 15 26 26" src="https://github.com/user-attachments/assets/d6607eeb-288b-4e81-a770-45a421c9c68c" /> After: <img width="299" alt="Screenshot 2025-06-07 at 15 26 59" src="https://github.com/user-attachments/assets/b0ddb66f-d4fe-4711-8ed9-eca08ce608f3" />
* Validate hex colors when creating/editing labels (#34623)Kemal Zebari2025-06-071-2/+3
| | | | | | | | Resolves #34618. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* add codecommit to supported services in api docs (#34626)TheFox0x72025-06-071-1/+2
|
* Small fix in Pull Requests page (#34612)NorthRealm2025-06-061-1/+1
|
* Fix some trivial problems (#34579)wxiaoguang2025-06-021-1/+1
|
* Retain issue sort type when a keyword search is introduced (#34559)badhezi2025-06-021-0/+1
| | | Fixes #34523
* Fix actions skipped commit status indicator (#34507)badhezi2025-05-281-0/+3
| | | | | Addresses https://github.com/go-gitea/gitea/issues/34500 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add "View workflow file" to Actions list page (#34538)NorthRealm2025-05-281-4/+1
| | | | | | | | | | This PR adds "View workflow file" to Actions list page, and replaces the redundant link. Related #34530 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add sort option recentclose for issues and pulls (#34525)Markus Amshove2025-05-261-0/+1
| | | | | | closes #34171 Adds a new sort option `recentclose` for issues and pull requests which will return items in a descending order of when they were closed
* fix: return 201 Created for CreateVariable API responses (#34517)Bo-Yi Wu2025-05-261-17/+14
| | | | | | | | | | | | | | | | | | | - Change CreateVariable API response status from 204 No Content to 201 Created - Update related integration tests to expect 201 Created instead of 204 No Content ## :warning: BREAKING :warning: Change the response status code of the Create Variable API under both Org and Repo levels to `201` instead of 204. API SDK: https://gitea.com/gitea/go-sdk/pulls/713 --------- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Signed-off-by: appleboy <appleboy.tw@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
* Actions list (#34530)NorthRealm2025-05-261-9/+17
| | | | | | | | Closes #34524 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Performance optimization for tags synchronization (#34355)Lunny Xiao2025-05-221-1/+1
| | | | | | | | | The tags synchronization is very slow for a non-mirror repository with many tags especially forking. This PR make all repositories' tags synchronization use the same function and remove the low performance synchronization function. The commit count of tag now will not be stored into database when syncing. Since the commits count will always be read from cache or git data, the `NumCommits` in the release table will be updated for the first read from git data.
* ui: add a default tab on repo header when migrating (#34503)a10121127962025-05-201-1/+9
| | | Signed-off-by: a1012112796 <1012112796@qq.com>
* feat(api): add date range filtering to commit retrieval endpoints (#34497)Bo-Yi Wu2025-05-191-0/+14
| | | | | | | | | | | | | | | - Add support for filtering commits by date range via new "since" and "until" parameters - Update API endpoints and command logic to handle the new parameters for fetching commits within given dates - Extend API documentation and Swagger specs to describe the new "since" and "until" query parameters - Refactor related function signatures and implementations to accept and pass "since" and "until" values --------- Signed-off-by: appleboy <appleboy.tw@gmail.com> Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Export repo's manual merge settings (#34502)Adam Majer2025-05-191-0/+8
|
* Add endpoint deleting workflow run (#34337)NorthRealm2025-05-133-15/+70
| | | | | | | | | | | Add endpoint deleting workflow run Resolves #26219 /claim #26219 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix releases sidebar navigation link (#34436)badhezi2025-05-121-1/+1
| | | Resolves https://github.com/go-gitea/gitea/issues/34435
* Refactor commit message rendering and fix bugs (#34412)wxiaoguang2025-05-0910-15/+15
| | | | | | Fix #34398, fix #33308 Remove all `repo.ComposeCommentMetas` from templates, only use `repo` to render commit message.
* Fix autofocus behavior (#34397)wxiaoguang2025-05-086-8/+8
| | | | | | | | | | | | | | | | The "autofocus" was abused or misbehaved: 1. When users visit a page but they are not going to change a field, then the field shouldn't get "autofocus" * the "auth" / "user" page: in most cases, users do not want to change the names * see also the GitHub's "settings" page behavior. 2. There shouldn't be duplicate "autofocus" inputs in most cases, only the first one focuses 3. When a panel is shown, the "autofocus" should get focus * "add ssh key" panel This PR fixes all these problems and by the way remove duplicate "isElemHidden" function.
* Fix incorrect divergence cache after switching default branch (#34370)GWDx2025-05-081-3/+3
| | | | | | | | | | Issue: After switching the default branch, other branches are still compared against the old default branch due to outdated divergence cache. Change: Clear the divergence cache in SetRepoDefaultBranch to ensure correct comparisons against the new default branch. Fixes #34369
* Add a button editing action secret (#34348)NorthRealm2025-05-081-5/+19
| | | | | | | | Add a button editing action secret Closes #34190 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix "The sidebar of the repository file list does not have a fixed height ↵Kerwin Bryant2025-05-071-1/+1
| | | | | | | | | | #34298" (#34321) There is a known issue where scrolling to the bottom of the page is affected by unknown elements in the footer area: https://github.com/go-gitea/gitea/blob/24145f811069295b9727f25469f1dd3a7c2c5dd7/templates/base/footer.tmpl#L11-L18 ![after](https://github.com/user-attachments/assets/4cdbce32-d22e-4907-a78b-c8e301017fac)
* Grey out expired artifact on Artifacts list (#34314)NorthRealm2025-05-051-0/+1
| | | | | | | | | | | Grey out expired artifact on Artifacts list. ![1](https://github.com/user-attachments/assets/79c00e39-29f5-4264-b7b2-7ed638ab71c1) ![2](https://github.com/user-attachments/assets/686b745f-d6d7-4921-8e1b-3472ac8b6c17) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use lfs label for lfs file rather than a long description (#34363)Lunny Xiao2025-05-052-2/+2
| | | | | | | | | | | Before ![image](https://github.com/user-attachments/assets/ed6c9221-5a6a-4717-8178-e5528fd180bf) After ![image](https://github.com/user-attachments/assets/baa94350-ead4-46bf-b4b7-1bfd3aa5dcac)
* Fix repo search input height (#34330)bytedream2025-05-011-1/+1
| | | | | | | | | | | | | | before: ![before](https://github.com/user-attachments/assets/1abdcb8a-d005-4f35-8d2e-1581fde26e0c) after: ![after](https://github.com/user-attachments/assets/41dab645-c5a7-4c45-9215-1340fb411130) The difference is minimal, only a few pixels above and beneath, but it stands out when switching fast between the tabs on the explore route.
* feat: return time of last usage for public keys and access tokens in the api ↵Tobias Balle-Petersen2025-05-011-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | (#34323) In the Gitea GUI, the user can see the time that _AccessTokens_ and _PublicKeys_ were last used. This information is not returned by the _/users/{username}/tokens_ and _/user/keys_ endpoints in the API. This PR adds the missing data. The time of last usage for for _tokens_ & _keys_ seem to be stored in the _Updated_ field of the structs internally. For consistency, I have used the name _updated_at_ for the new field returned by the _API_. However, for the _API_ user, I don't think that name reflects the data returned, as I believe it is the time of last usage. I propose that we use the name _last_used_at_ instead. Let's hear reviewers opinion on that. * PublicKey 1. _last_used_at_: string($date-time) * AccessToken 1. _created_at_: string($date-time) (for parity with public keys) 2. _last_used_at_: string($date-time) Fix #34313
* Fix some dropdown problems on the issue sidebar (#34308)wxiaoguang2025-04-306-17/+18
| | | Also fix #34300
* Fix button alignments (#34307)Kerwin Bryant2025-04-291-1/+1
| | | Continue with #34206.
* support the open-icon of folder (#34168)Kerwin Bryant2025-04-282-2/+3
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187)wxiaoguang2025-04-283-28/+13
| | | | | | | | | | | | | | | | | | | | | Fix #880 Design: 1. A global setting `security.TWO_FACTOR_AUTH`. * To support org-level config, we need to introduce a better "owner setting" system first (in the future) 2. A user without 2FA can login and may explore, but can NOT read or write to any repositories via API/web. 3. Keep things as simple as possible. * This option only aggressively suggest users to enable their 2FA at the moment, it does NOT guarantee that users must have 2FA before all other operations, it should be good enough for real world use cases. * Some details and tests could be improved in the future since this change only adds a check and seems won't affect too much. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix button alignments (#34276)Kerwin Bryant2025-04-272-6/+10
| | | | | | | | Continue with #34206. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update token creation API swagger documentation (#34288)Lunny Xiao2025-04-271-1/+12
| | | Fix #34231
* Option to delay conflict checking of old pull requests until page view (#27779)Brecht Van Lommel2025-04-243-11/+18
| | | | | | | | | | | | | | | | | | | | | | `[repository.pull-request] DELAY_CHECK_FOR_INACTIVE_DAYS` is a new setting to delay the mergeable check for pull requests that have been inactive for the specified number of days. This avoids potentially long delays for big repositories with many pull requests. and reduces system load overall when there are many repositories or pull requests. When viewing the PR, checking will start immediately and the PR merge box will automatically reload when complete. Accessing the PR through the API will also start checking immediately. The default value of `7` provides a balance between system load, and keeping behavior similar to what it was before both for users and API access. With `0` all conflict checking will be delayed, while `-1` always checks immediately to restore the previous behavior. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix various trivial frontend problems (#34263)wxiaoguang2025-04-2414-29/+28
| | | | | | | | | | 1. Fix #20606 2. Fix #34246 3. Fix missing spaces, fix misspells, no visual change. 4. Fix missing "not-mobile", fix #34265 --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix runner list tmpl (#34270)wxiaoguang2025-04-231-11/+7
| | | | | Fix #34269 And fix some layout problems.
* Add fullscreen mode as a more efficient operation way to view projects (#34081)Kerwin Bryant2025-04-233-15/+18
| | | | | | | Maybe fix #33482, maybe fix #34015 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>