gitea/models
ChristopherHX cda90eca31
Add workflow_run api + webhook (#33964)
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>
2025-06-20 20:14:00 +07:00
..
actions Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +07:00
activities Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +07:00
admin Fix omitempty bug (#33663) 2025-02-20 12:39:21 +07:00
asymkey Update x/crypto package and make builtin SSH use default parameters (#34667) 2025-06-09 19:51:02 +07:00
auth Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +07:00
avatars
db Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +07:00
dbfs Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +07:00
fixtures Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +07:00
git Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +07:00
issues Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +07:00
migrations Upgrade `gopls` to v0.19.0, add `make fix` (#34772) 2025-06-18 19:30:40 +07:00
organization Refactor FindOrgOptions to use enum instead of bool, fix membership visibility (#34629) 2025-06-09 03:30:34 +07:00
packages Fix some package registry problems (#34759) 2025-06-19 00:32:43 +07:00
perm Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187) 2025-04-28 15:31:59 +07:00
project Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +07:00
pull Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +07:00
renderhelper Fix commit message rendering and some UI problems (#34680) 2025-06-10 23:20:32 +07:00
repo Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +07:00
secret Added Description Field for Secrets and Variables (#33526) 2025-03-17 19:24:54 +07:00
shared/types
system Enable testifylint rules (#34075) 2025-03-31 01:53:48 +07:00
unit Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +07:00
unittest Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +07:00
user Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +07:00
webhook Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +07:00
main_test.go
repo.go Fix issue comment number (#30556) 2024-12-30 14:35:46 +07:00
repo_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 +07:00