Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple of bugfixes for collection in workflow_job #418

Merged
merged 2 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func JobLabels() *cli.StringSlice {
"title",
"branch",
"sha",
"identifier",
"run_id",
"run_attempt",
"labels",
Expand Down
4 changes: 3 additions & 1 deletion pkg/store/generic_workflow_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,15 @@ UPDATE
workflow_jobs
SET
run_attempt=:run_attempt,
conclusion=:conclusion,
name=:name,
status=:status,
branch=:branch,
sha=:sha,
identifier=:identifier,
created_at=:created_at,
started_at=:started_at
started_at=:started_at,
completed_at=:completed_at
WHERE
owner=:owner AND repo=:repo AND identifier=:identifier;`

Expand Down
2 changes: 2 additions & 0 deletions pkg/store/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ func (r *WorkflowJob) ByLabel(label string) string {
return r.Branch
case "sha":
return r.SHA
case "identifier":
return strconv.FormatInt(r.Identifier, 10)
case "run_id":
return strconv.FormatInt(r.RunID, 10)
case "run_attempt":
Expand Down