root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.54k stars 1.24k forks source link

changed-in-PR filter of "clang-tools code analysis" workflow is leaky #15933

Open egpbos opened 1 week ago

egpbos commented 1 week ago

Explain what you would like to see improved and how.

The filter seems to include files that were changed since the last branch off of master. Take for instance https://github.com/root-project/root/actions/runs/9682129594/job/26714405775. The COMMIT_FILES variable contains many files not touched in this PR. This makes the output quite tedious to parse and the PR hard to improve.

ROOT version

Irrelevant, it is a CI issue.

Installation method

CI

Operating system

CI

Additional context

No response

egpbos commented 1 week ago

Possibly related: https://github.com/orgs/community/discussions/59677

egpbos commented 1 week ago

This could be a way to side-step the GitHub variable issue: https://stackoverflow.com/a/74268200

hahnjo commented 1 week ago

A possible workaround is to rebase, then you should only get exactly the files changed by the PR.

Let me also add @jblomer who last fixed the list of files the analysis workflow. Maybe there's an easy way we can only get the files changed by the PR no matter the state of master...

egpbos commented 1 week ago

A possible workaround is to rebase, then you should only get exactly the files changed by the PR.

Indeed, that works. The SO answer I linked to above provides a possible solution, but I haven't checked whether it completely matches the ROOT situation.