| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR adds a clearer runtime error log when the internal-only analysis-kinds input is set to a non-default value in non–GitHub-managed (custom/advanced) workflows, and refactors test utilities to make it easier to set up Actions-like environment variables in unit tests.
Changes:
| File | Description |
|---|---|
| src/testing-utils.ts | Introduces setupBaseActionsVars and a shared override type to simplify environment setup in unit tests. |
| src/analyses.ts | Adds custom-workflow detection and logs an error for non-default analysis-kinds; refactors repeated error prefix into a helper. |
| src/analyses.test.ts | Updates tests to set required Actions env vars and adds coverage for the new “custom vs managed workflow” logging behavior. |
| lib/setup-codeql-action.js | Generated output updated to reflect the TypeScript changes. |
| lib/init-action.js | Generated output updated to reflect the TypeScript changes. |
Sorry, something went wrong.
| !logger.hasMessage( | ||
| "An analysis kind other than `code-scanning` was specified in a custom workflow.", | ||
| ), |
There was a problem hiding this comment.
Nit, optional: this isn't robust to the message changing slightly — it would be more robust to assert what is logged.
Sorry, something went wrong.
…rn-on-non-cs-advanced-setup
| Back | FazBrowse Home | New Git URL |
The analysis-kinds input is for internal-use only and non-default arguments outside of GitHub-managed workflows are not supported. This PR logs an error if we detect that a (meaningful) value other than code-scanning (the default) is provided, along with instructions for the intended way of enabling e.g. other queries.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
Products:
Environments:
How did/will you validate this change?
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?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist