gitea/services/forms
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
..
admin.go Add option to set language in admin user view (#28449) 2024-03-02 22:55:02 +07:00
auth_form.go Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187) 2025-04-28 15:31:59 +07:00
org.go Fix: Allow org team names of length 255 in create team form (#31564) 2024-07-10 02:15:17 +07:00
package_form.go Add Arch package registry (#32692) 2024-12-04 23:09:07 +07:00
repo_branch_form.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +07:00
repo_form.go Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +07:00
repo_form_test.go Add API routes to lock and unlock issues (#34165) 2025-04-21 00:43:43 +07:00
repo_tag_form.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +07:00
runner.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +07:00
user_form.go Added Description Field for Secrets and Variables (#33526) 2025-03-17 19:24:54 +07:00
user_form_auth_openid.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +07:00
user_form_hidden_comments.go Issue time estimate, meaningful time tracking (#23113) 2024-12-05 13:07:53 +07:00
user_form_test.go Refactor some tests (#34580) 2025-06-03 01:26:19 +07:00