Closed vadi2 closed 3 years ago
Thanks for looking into this @vadi2 ! This might be a little bit of a problem, because we need to use the Github diff pre-merge to get the line numbers in the PR to post comments on. It works like this:
clang-tidy
on just the changed linesWith the Github merge commit, it's not obvious how to construct the lookup table for step 2. It's at least going to be a bit more complicated.
It looks like there's an option for checking out the PR HEAD instead of the merge commit: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit That might be the easiest thing to do -- I'll investigate and put that in the README if it turns out to be the best course of action
I think that would work :+1:
When Github is running a check for a PR, it merges it into the incoming branch first. The action however calculates the line numbers diff on the pre-merge file.
This means that if the file in question was changed in development by some other code, the action won't work. If it hasn't been changed in development yet, the action will work.