DRONE_PULL_REQUEST env variable holds the pull request number(Check This). You can access all the environment variables through your build logs. You can do this by adding env command in your yaml file:
- env # dump environment variables
Your build logs after execution:
Pull request is only set if drone is building a pull request hook.