Skip to content

Commit 22bfd96

Browse files
committed
fix keda scaler compat
1 parent 875c774 commit 22bfd96

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

modules/structs/repo_actions.go

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,21 @@ type ActionArtifact struct {
8686

8787
// ActionWorkflowRun represents a WorkflowRun
8888
type ActionWorkflowRun struct {
89-
ID int64 `json:"id"`
90-
URL string `json:"url"`
91-
HTMLURL string `json:"html_url"`
92-
DisplayTitle string `json:"display_title"`
93-
Path string `json:"path"`
94-
Event string `json:"event"`
95-
RunAttempt int64 `json:"run_attempt"`
96-
RunNumber int64 `json:"run_number"`
97-
RepositoryID int64 `json:"repository_id,omitempty"`
98-
HeadSha string `json:"head_sha"`
99-
HeadBranch string `json:"head_branch,omitempty"`
100-
Status string `json:"status"`
101-
Conclusion string `json:"conclusion,omitempty"`
89+
ID int64 `json:"id"`
90+
URL string `json:"url"`
91+
HTMLURL string `json:"html_url"`
92+
DisplayTitle string `json:"display_title"`
93+
Path string `json:"path"`
94+
Event string `json:"event"`
95+
RunAttempt int64 `json:"run_attempt"`
96+
RunNumber int64 `json:"run_number"`
97+
RepositoryID int64 `json:"repository_id,omitempty"`
98+
HeadSha string `json:"head_sha"`
99+
HeadBranch string `json:"head_branch,omitempty"`
100+
Status string `json:"status"`
101+
Repository *Repository `json:"repository,omitempty"`
102+
HeadRepository *Repository `json:"head_repository,omitempty"`
103+
Conclusion string `json:"conclusion,omitempty"`
102104
// swagger:strfmt date-time
103105
StartedAt time.Time `json:"started_at,omitempty"`
104106
// swagger:strfmt date-time

services/convert/convert.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ func ToActionWorkflowRun(ctx context.Context, repo *repo_model.Repository, run *
251251
Status: status,
252252
Conclusion: conclusion,
253253
Path: fmt.Sprintf("%s@%s", run.WorkflowID, run.Ref),
254+
Repository: ToRepo(ctx, repo, access_model.Permission{AccessMode: perm.AccessModeNone}),
254255
}, nil
255256
}
256257

0 commit comments

Comments
 (0)