Make PR commit count available via envrionment variable

envars

#1

It would be great if one could have access to the number of commits on a PR build.
Currently the checkout command only does a shallow clone of the git repo. We would like to be able to retrieve the full branch (from its fork point up to its head) to be able to run code sanity check on all files modified by the PR, not just those modified in the last commit. It is much better to encourage code quality improvement, following the “boy scout” rule, instead of having to a complete code overhaul which messes with other works being done on a repository.

The work around this, for now, we fetch an arbitrary “sufficiently big number of commits to be on the safe side”, which is not necessarily reliable.

Thank you for considering this and also making that number available as an environment variable.


#2