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:
pipeline:
build:
image: golang
commands:
- env # dump environment variables
Your build logs after execution:
...
DRONE_PULL_REQUEST=42
DRONE_BUILD_EVENT=pull_request
...
Pull request is only set if drone is building a pull request hook.