-
Couldn't load subscription status.
- Fork 411
Support skipping workflow validation #3240
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR introduces an environment variable to skip workflow validation for internal use cases where workflows are known to be valid. The main changes include:
- Refactored workflow validation check into a dedicated
checkWorkflowfunction ininit.ts - Added
SKIP_WORKFLOW_VALIDATIONenvironment variable to control validation - Added comprehensive test coverage for the new function
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/init.ts | Added checkWorkflow function wrapping validation logic with environment variable check |
| src/init-action.ts | Replaced inline workflow validation with call to new checkWorkflow function |
| src/environment.ts | Added SKIP_WORKFLOW_VALIDATION enum entry with documentation |
| src/init.test.ts | Added three test cases covering validation, error logging, and skip scenarios |
| lib/*.js | Generated JavaScript code from TypeScript sources (auto-generated) |
0fd49a1 to
52cec41
Compare
For internal use, we have CodeQL workflows that we know are valid and don't require validation on every run. This PR changes workflow validation so that it is always skipped for
dynamicworkflows. It also adds an environment variable which allows us to skip workflow validation.This PR also slightly refactors the check into a function in
workflow.tsand adds test coverage.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
analysis-kinds: code-scanning).analysis-kinds: code-quality).How did/will you validate this change?
.test.tsfiles).pr-checks).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Merge / deployment checklist