gitea/services
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 +08:00
..
actions Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +08:00
agit Option to delay conflict checking of old pull requests until page view (#27779) 2025-04-24 19:26:57 +00:00
asymkey Improve instance wide ssh commit signing (#34341) 2025-06-11 10:32:55 +00:00
attachment Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
auth Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
automerge Option to delay conflict checking of old pull requests until page view (#27779) 2025-04-24 19:26:57 +00:00
context Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +08:00
contexttest Add API endpoint to request contents of multiple files simultaniously (#34139) 2025-04-22 01:20:11 +08:00
convert Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +08:00
cron Use default Git timeout when checking repo health (#33593) 2025-02-14 15:13:56 +00:00
doctor Remove unused param `doer` (#34545) 2025-06-18 03:12:16 +00:00
externalaccount Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
feed Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
forms Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +08:00
git Fix GetUsersByEmails (#34643) 2025-06-07 18:30:36 +00:00
gitdiff Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
indexer Update issue indexer after merging a PR (#30715) 2024-05-08 14:45:15 +00:00
issue Fix doctor deleting orphaned issues attachments (#34142) 2025-05-30 05:06:03 +00:00
lfs Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
mailer Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
markup Refactor Git Attribute & performance optimization (#34154) 2025-04-11 21:41:29 +08:00
migrations Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
mirror Only git operations should update `last changed` of a repository (#34388) 2025-05-11 19:18:46 +00:00
notify Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +08:00
oauth2_provider Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
org Remove unused param `doer` (#34545) 2025-06-18 03:12:16 +00:00
packages Upgrade `gopls` to v0.19.0, add `make fix` (#34772) 2025-06-18 19:30:40 +00:00
projects Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
pull Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
release Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
repository Add ff_only parameter to POST /repos/{owner}/{repo}/merge-upstream (#34770) 2025-06-19 12:29:10 -07:00
secrets Added Description Field for Secrets and Variables (#33526) 2025-03-17 19:24:54 +00:00
task Fix bug when migrating repository (#34182) 2025-04-14 04:48:03 +00:00
uinotification
user Fix last admin check when syncing users (#34649) 2025-06-09 20:57:45 +00:00
versioned_migration Add global lock for migrations to make upgrade more safe with multiple replications (#33706) 2025-03-07 21:08:53 +00:00
webhook Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +08:00
webtheme Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
wiki Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00