]> source.dussan.org Git - gitea.git/commit
Refactor commit status for Actions jobs (#23786) (#24060)
authorDenys Konovalov <privat@denyskon.de>
Wed, 12 Apr 2023 02:37:34 +0000 (04:37 +0200)
committerGitHub <noreply@github.com>
Wed, 12 Apr 2023 02:37:34 +0000 (22:37 -0400)
commit29724f31c5c48820df16ccf7a2a3aded24ab8b78
tree557183526e1517e3ad2797e70c13a9ef257eb4cb
parent580da8f35320dbd15b168bf8ccfaff6187ff87e0
 Refactor commit status for Actions jobs (#23786)  (#24060)

Backport #23786

Refactor commit status for Actions jobs (#23786)

Highlights:
- Treat `StatusSkipped` as `CommitStatusSuccess` instead of
`CommitStatusFailure`, so it fixed #23599.
- Use the bot user `gitea-actions` instead of the trigger as the creator
of commit status.
- New format `<run_name> / <job_name> / (<event>)` for the context of
commit status to avoid conflicts.
- Add descriptions for commit status.
- Add the missing calls to `CreateCommitStatus`.
- Refactor `CreateCommitStatus` to make it easier to use.

Co-authored-by: Jason Song <i@wolfogre.com>
routers/api/actions/runner/runner.go
routers/api/actions/runner/utils.go
routers/web/repo/actions/view.go
services/actions/clear_tasks.go
services/actions/commit_status.go
services/actions/job_emitter.go
services/actions/notifier_helper.go