-
Notifications
You must be signed in to change notification settings - Fork 451
Validate workflow to check that all codeql-action versions are the same
#3099
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
step.uses condition
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -168,10 +168,7 @@ export async function getWorkflowErrors( | |||||
| for (const job of Object.values(doc?.jobs || {})) { | ||||||
| if (Array.isArray(job.steps)) { | ||||||
| for (const step of job.steps) { | ||||||
| if ( | ||||||
| step.uses !== undefined && | ||||||
| step.uses.startsWith("github/codeql-action/") | ||||||
| ) { | ||||||
| if (step.uses?.startsWith("github/codeql-action/")) { | ||||||
| const parts = step.uses.split("@"); | ||||||
| if (parts.length >= 2) { | ||||||
| codeqlStepRefs.push(parts[parts.length - 1]); | ||||||
|
||||||
| codeqlStepRefs.push(parts[parts.length - 1]); | |
| codeqlStepRefs.push(parts.slice(1).join("@")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: don't we have this kind of parsing elsewhere already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have
in
getRemoteConfig, but I thought I'd keep this simple.