-
Notifications
You must be signed in to change notification settings - Fork 7
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
Set matrix based on changed file types #6
Comments
@CallMeGreg I'd like to take this on if that works for you? @p5 Some engineering teams may prefer to maintain control over this aspect themselves. It might be worthwhile to consider adding an option where, if specific files are provided to the action, it returns the detected languages based on their extensions. In the absence of any specified files, the action could default to its current behavior, returning all detected languages? |
Apologies for not quite following your suggestion here regarding the specific files being provided. Do you mean having a custom step before this which will query git for the changed files, feeding all of them into this action as an input?
I agree that we should try and keep the current usage available to consumers of the action, so I was thinking of an input such as |
@CallMeGreg Thanks! I already started on something in the background! @p5 Exactly! I would use something like this action: https://github.com/tj-actions/changed-files And then feed the output of that action into this action where we can return languages based on the extensions found in the list of files. However, if the argument is empty, we just return all detected languages. Does that make sense? PS: I think that if we add functionality to detect changed files to this action, instead of feeding it a list, that it would overcomplicate things. |
Currently, CodeQL runs all languages defined in the array, even when a pull request does not touch a particular language. For example a single change to
index.js
triggers Python tests if that repo contains any Python at all.Some of the checks take much longer than the others, so engineers are often sat waiting around for Python checks to pass when they didn't change any Python.
It would be great if this action was able to check the file extensions changed in a Pull Request, and set the matrix accordingly.
The text was updated successfully, but these errors were encountered: