Skip to content

Commit 5eeb2b0

Browse files
committed
feat: add GitHub Check Runs for deployment authorization PR visibility
GitHub Deployments only appear in the PR Environments section. This adds Check Runs via the Checks API so blocked deployments show a prominent yellow "action_required" badge in the PR checks list. On authorization, the check run is updated to green success.
1 parent 57c7d2f commit 5eeb2b0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

svc/ctrl/worker/github/interface.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ type GitHubClient interface {
3838
ListCheckRunsForRef(installationID int64, repo string, ref string, checkName string) ([]CheckRun, error)
3939
}
4040

41-
// CheckRun holds the minimal fields of a GitHub Check Run needed for updates.
42-
type CheckRun struct {
43-
ID int64
44-
Name string
45-
}
46-
4741
// CommitInfo holds metadata about a single Git commit retrieved from the GitHub API.
4842
type CommitInfo struct {
4943
SHA string
@@ -53,6 +47,12 @@ type CommitInfo struct {
5347
Timestamp time.Time
5448
}
5549

50+
// CheckRun holds the minimal fields of a GitHub Check Run needed for updates.
51+
type CheckRun struct {
52+
ID int64
53+
Name string
54+
}
55+
5656
// InstallationToken represents a GitHub installation access token. The token
5757
// provides repository access for a specific App installation and expires after
5858
// 1 hour.

0 commit comments

Comments
 (0)