Get last commit of file in github actions PR

1k views Asked by At

I am struggling with the following Problem. I need to get the last commit that changed a file. In my local repository everything works fine, but in my github actions merge pipeline it seems as if github creates its own commit for the whole project (all files have the same new commit hash).

Is there a way how I can get the real last commit of that file?

git rev-list --all --no-merges -1 path/to/file.txt

This works in my local repository - but in github actions on a PR, all files have this new commit ID (that I can't see in the web interface on the source branch...

0

There are 0 answers