MCPcopy
hub / github.com/ossf/scorecard / getJobRunsOnLabels

Function getJobRunsOnLabels

checks/fileparser/github_workflow.go:132–142  ·  view source on GitHub ↗
(job *actionlint.Job)

Source from the content-addressed store, hash-verified

130}
131
132func getJobRunsOnLabels(job *actionlint.Job) []*actionlint.String {
133 if job != nil && job.RunsOn != nil {
134 // Starting at v1.6.16, either field may be set
135 // https://github.com/rhysd/actionlint/issues/164
136 if job.RunsOn.LabelsExpr != nil {
137 return []*actionlint.String{job.RunsOn.LabelsExpr}
138 }
139 return job.RunsOn.Labels
140 }
141 return nil
142}
143
144func getJobStrategyMatrixRows(job *actionlint.Job) map[string]*actionlint.MatrixRow {
145 if job != nil && job.Strategy != nil && job.Strategy.Matrix != nil {

Callers 1

GetOSesForJobFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected