summaryrefslogtreecommitdiffstats
path: root/modules/util/timer.go (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-02-02Add artifacts v4 jwt to job message and accept it (#28885)ChristopherHX4-6/+166
This change allows act_runner / actions_runner to use jwt tokens for `ACTIONS_RUNTIME_TOKEN` that are compatible with actions/upload-artifact@v4. The official Artifact actions are now validating and extracting the jwt claim scp to get the runid and jobid, the old artifact backend also needs to accept the same token jwt. --- Related to #28853 I'm not familar with the auth system, maybe you know how to improve this I have tested - the jwt token is a valid token for artifact uploading - the jwt token can be parsed by actions/upload-artifact@v4 and passes their scp claim validation Next steps would be a new artifacts@v4 backend. ~~I'm linking the act_runner change soonish.~~ act_runner change to make the change effective and use jwt tokens <https://gitea.com/gitea/act_runner/pulls/471>
2024-02-02Pass es2020 to esbuild-loader as well (#29027)silverwind1-1/+1
Followup https://github.com/go-gitea/gitea/pull/28977. I forgot to pass the updated option to esbuild-loader, e.g. previously it was only passed to the minifier.
2024-02-02Fix default avatar image size in PR diff page (#28971)yp053274-4/+4
Fix #28941 ps: didn't test. The repo is too big to migrate.
2024-02-02Update JS and PY dependencies, build for `es2020` browsers (#28977)silverwind218-1686/+1471
- Update all JS dependencies minus @mcaptcha/vanilla-glue - Fix new lint errors - Regenerate SVGs - Switch to maintained stylelint stylistic plugin - Tested Mermaid, Citation, Swagger, sorting - Raise ESBuild target to `es2020` as dictated by `pretty-ms` dependency.
2024-02-02Wrap contained tags and branches again (#29021)delvh1-2/+2
Fixes #29016 ## After ![grafik](https://github.com/go-gitea/gitea/assets/51889757/2c72ee8f-439e-4328-85df-77772e0f4aef)
2024-02-02Avoid sending update/delete release notice when it is draft (#29008)yp053271-8/+7
Fix #27157
2024-02-01Fix incorrect button CSS usages (#29015)wxiaoguang3-4/+4
2024-02-01Strip trailing newline in markdown code copy (#29019)silverwind1-1/+3
Behaviour now matches GH. Safeguard added in the for loop because `textContent` may be null in which case it does not make sense to render the copy button.
2024-02-01Improve user search display name (#29002)KN4CK3R8-29/+18
I tripped over this strange method and I don't think we need that workaround to fix the value. old: ![grafik](https://github.com/go-gitea/gitea/assets/1666336/c8b6797b-eb45-4dec-99db-1b0649a34ec5) new: ![grafik](https://github.com/go-gitea/gitea/assets/1666336/ab1a65ae-de5b-4ce4-9813-3b8b39c7922e) --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-02-01Revert "Speed up loading the dashboard on mysql/mariadb (#28546)" (#29006)Lunny Xiao1-6/+3
This reverts commit fa8c3beb26acfcc7e732038c947225857ebcbf31. #28546 Because it seems performance become worse.
2024-02-01Update dorny/paths-filter action (#29003)silverwind1-1/+1
2024-02-01[skip ci] Updated translations via CrowdinGiteaBot1-1/+23
2024-02-01Fix UI Spacing Errors in mirror settings (#28990)yp053272-3/+15
2024-01-31Add htmx guidelines (#28993)Yarden Shoham1-0/+3
To make sure we don't abuse it. --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
2024-01-31Some refactor for git http (#28995)Lunny Xiao1-100/+85
# Purpose This PR makes git http related functions use the same `context.Context` so they can be maintained easier.
2024-01-31Fix an actions schedule bug (#28942)Zettat1237-19/+104
In #28691, schedule plans will be deleted when a repo's actions unit is disabled. But when the unit is enabled, the schedule plans won't be created again. This PR fixes the bug. The schedule plans will be created again when the actions unit is re-enabled
2024-01-31Fix doc img path in profile readme (#28994)yp053272-1/+1
https://gitea.com/gitea/gitea-docusaurus/actions/runs/1007/jobs/0#jobstep-9-25
2024-01-30Introduce htmx and use it to avoid full page load on `Subscribe` and ↵Yarden Shoham11-21/+62
`Follow` (#28908) - Closes https://github.com/go-gitea/gitea/issues/28880 This change introduces htmx with the hope we could use it to make Gitea more reactive while keeping our "HTML rendered on the server" approach. - Add `htmx.js` that imports `htmx.org` and initializes error toasts - Place `hx-headers='{"x-csrf-token": "{{.CsrfToken}}"}'` on the `<body>` tag so every request that htmx sends is authenticated - Place `hx-swap="outerHTML"` on the `<body>` tag so the response of each htmx request replaces the tag it targets (as opposed to its inner content) - Place `hx-push-url="false"` on the `<body>` tag so no changes to the URL happen in `<form>` tags - Add the `is-loading` class during request ### Error toasts in action ![errors](https://github.com/go-gitea/gitea/assets/20454870/181a1beb-1cb8-4858-abe8-fa1fc3f5b8f3) ## Don't do a full page load when clicking the subscribe button - Refactor the form around the subscribe button into its own template - Use htmx to perform the form submission - `hx-boost="true"` to prevent the default form submission behavior of a full page load - `hx-sync="this:replace"` to replace the current request (in case the button is clicked again before the response is returned) - `hx-target="this"` to replace the form tag with the new form tag - Change the backend response to return a `<form>` tag instead of a redirect to the issue page ### Before ![subscribe_before](https://github.com/go-gitea/gitea/assets/20454870/cb2439a2-c3c0-425c-8d3c-5d646b1cdc28) ### After ![subscribe_after](https://github.com/go-gitea/gitea/assets/20454870/6fcd77d8-7b11-40b0-af4f-b152aaad787c) ## Don't do a full page load when clicking the follow button - Use htmx to perform the button request - `hx-post="{{.ContextUser.HomeLink}}?action=follow"` to send a POST request to follow the user - `hx-target="#profile-avatar-card"` to target the card div for replacement - `hx-indicator="#profile-avatar-card"` to place the loading indicator on the card - Change the backend response to return a `<div>` tag (the card) instead of a redirect to the user page ### Before ![follow_before](https://github.com/go-gitea/gitea/assets/20454870/a210b643-6e74-4ff9-8e61-d658c62edf1f) ### After ![follow_after](https://github.com/go-gitea/gitea/assets/20454870/5bb19ae9-0d59-4ae3-b538-4c83334e4722) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: 6543 <m.huber@kithara.com> Co-authored-by: Giteabot <teabot@gitea.io>
2024-01-30Fix joins in `db.Find(AndCount)` (#28978)KN4CK3R1-11/+21
2024-01-30Update golang links to use https (#28980)Mike Cifelli9-20/+20
Many of the golang links point to the old site and don't use https. This pull request updates these outdated links to https://go.dev . https://github.com/go-gitea/gitea/issues/28979
2024-01-30Fix google logo in security page (#28982)Matheus Sampaio Queiroga2-2/+2
Fix google logo in user security page: #28701 Before ![before user security page](https://github.com/go-gitea/gitea/assets/50121801/6c058c28-8013-470a-b047-f47afecdca09) after ![user security page](https://github.com/go-gitea/gitea/assets/50121801/36053ee9-18c5-4ef0-a63a-8accc1d00adc)
2024-01-29Also match weakly validated ETags (#28957)cchangwen1-1/+1
https://stackoverflow.com/questions/51973120/where-does-the-w-in-an-etag-appear-from https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag# --------- Co-authored-by: delvh <dev.lh@web.de>