gitea/services/convert
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
..
activity.go
attachment.go
convert.go Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +07:00
git_commit.go Decouple diff stats query from actual diffing (#33810) 2025-03-08 17:36:08 +07:00
git_commit_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 +07:00
issue.go Move issue pin to an standalone table for querying performance (#33452) 2025-02-17 11:28:37 +07:00
issue_comment.go Make tracked time representation display as hours (#33315) 2025-01-19 09:30:44 +07:00
issue_test.go
main_test.go
mirror.go
notification.go
package.go
pull.go Fix pull requests API convert panic when head repository is deleted. (#34685) 2025-06-10 20:19:52 +07:00
pull_review.go
pull_review_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 +07:00
pull_test.go Fix pull requests API convert panic when head repository is deleted. (#34685) 2025-06-10 20:19:52 +07:00
release.go
release_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 +07:00
repository.go Export repo's manual merge settings (#34502) 2025-05-19 13:08:00 +07:00
secret.go
status.go Keeping consistent between UI and API about combined commit status state and fix some bugs (#34562) 2025-06-09 04:05:33 +07:00
user.go Make gitea webhooks openproject compatible (#28435) 2024-05-26 04:08:13 +07:00
user_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 +07:00
utils.go Fix typo in gitea downloader test and add missing codebase in `ToGitServiceType` (#33146) 2025-01-08 18:34:53 +07:00
utils_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 +07:00
wiki.go