github icon indicating copy to clipboard operation
github copied to clipboard

Skipped jobs cause a parse failure in `jobsForWorkflowRunR`

Open Tristano8 opened this issue 1 year ago • 0 comments

When querying jobs by workflow run id, runner_id, runner_name, runner_group_id and runner_group_name fields can return as null if the job was skipped as part of the run. The GitHub API itself doesn't provide a way to filter these out, so any use of jobsForWorkflowRunR will cause a parse error if any of the jobs were skipped. It would be better to model these as optional types.

Either:

    , jobRunnerId        :: !(Maybe Integer)
    , jobRunnerName      :: !(Maybe Text)
    , jobRunnerGroupId   :: !(Maybe Integer)
    , jobRunnerGroupName :: !(Maybe Text)

Or, since they appear to be all null or all present as a group:

, jobRunnerFields :: !(Maybe JobRunnerFields)

Higher-kinded data could also work, but doesn't feel on-brand for this repo

Tristano8 avatar Jan 19 '25 05:01 Tristano8