Skip to content

Commit

Permalink
Merge pull request #418 from marcusramberg/marcus/fix_collection
Browse files Browse the repository at this point in the history
A couple of bugfixes for collection in workflow_job
  • Loading branch information
tboerger authored Nov 3, 2024
2 parents 9da837d + 28ec2a9 commit 0eb1809
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
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

0 comments on commit 0eb1809

Please sign in to comment.