-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Add changed files env var #853
Comments
Maybe another alternative: let |
Why integrating all that into woodpecker? What about a 3rd party plugin like it can be archived with github actions? |
If you refer to this action, this is what @wxiaoguang is suggesting (
|
In general, I'd say the plugin approach requires a way to store data outside of the repo itself and then always add this as an extra volume to the docker containers, and maybe provide an env var likeg |
We can use something like |
add **`CI_PIPELINE_FILES`** to builtin env vars close #853 --- *Sponsored by Kithara Software GmbH*
Clear and concise description of the problem
There isn't a way to get the changed files of a commit/PR, which would be useful for static code checks so that they don't have to run on all files, only changed ones.
Suggested solution
Add an environment variable that contains changed files, i.e. the list under the
Changed files
tab. To make it machine-readable, a json-style string could used. For example, this build would be:[".woodpecker/docs.yml"]
And an example with more files from a PR, https://ci.woodpecker-ci.org/woodpecker-ci/woodpecker/build/2303:
Alternative
I don't know if that's possible, but you could extract the build URL and then request the files from the api (if there's one).
Additional context
I'm working on a plugin which checks files and I don't want this plugin to check all files of a repo, only changed ones.
Validations
The text was updated successfully, but these errors were encountered: