Using environment variables to differentiate between PR / commit runs

envars

#1

Hello there!

I run a project called Danger, which needs to distinguish between code running in a PR, and code running on a commit. Currently we’re doing quite a bit of work to try and determine it, and I’m finding it to be not reliable yet.

So now that there is the extra feature around “PRs only” (thanks for that by the way!) I was wondering if there is a way to distinguish between the two types of builds from the environment vars?


#2

I’ve created a repo specifically showing an example of the three types of builds I’m seeing: https://github.com/orta/show_circle_env


#3