feat(web): add automatic actions for open pull requests

A new pr_open alert carries the head commit SHA of each open, non-draft, same-repository pull request. An action with auto enabled sends its webhook once for each pull request and head commit. An authors list limits which pull requests trigger it. The alert never changes repository health.
This commit is contained in:
2026-10-05 00:41:08 +01:00
parent 23bbbedf59
commit c79ecb728f
15 changed files with 473 additions and 27 deletions
+12 -6
View File
@@ -90,6 +90,8 @@ type PullRequest struct {
Checks CheckSummary
Number int
Draft bool
// Fork is true when the head repository differs from the base or was deleted.
Fork bool
}
type CheckSummary struct {
@@ -133,12 +135,16 @@ func (r Run) Failed() bool {
}
type Alert struct {
Since time.Time
Repo string
Kind string
Subject string
Detail string
URL string
Since time.Time
Repo string
Kind string
Subject string
Detail string
URL string
// Ref is the head commit of a pr_open alert; empty for other kinds.
Ref string
// Author is the pull request author of a pr_open alert; it is not part of the JSON API.
Author string
Severity Severity
}