Over at https://github.com/mui-org/material-ui the CIRCLE_COMPARE_URL is only set for jobs that run on the master branch.
master: https://circleci.com/gh/mui-org/material-ui/41208
pull(from member): https://circleci.com/gh/mui-org/material-ui/41166
I wanted to have a list of changed files on the branch CI is running compared to master. Turns out that CircleCI uses hard resets when checking out so git diff master...
does not work. Parsing the compare url was my next approach but it is empty when needed. I settled on git rev parse origin/master
but that seems to cause some troubles. Using the compare url would be better and ideal would be to expose just the commit range.