I’ve got a config that looks something like this:
pull_requestevents, I build and push a Docker image
- I then allow those
pull_request-triggered builds to be promoted to various targets for testing
This works great. The one thing I’m struggling with is that I’d like to be able to post back to the original PR when the
promote-triggered build completes with a status, using this plugin, but there’s no easy way I can find to get at the pull request number for the PR that triggered the parent
pull_request build (
DRONE_PULL_REQUEST isn’t set to anything useful in the
The closest I’ve come is attempting to munge
DRONE_COMMIT_REF (which for a PR-triggered promote build looks like
refs/pull/123/head) into the right shape using the string substitution feature, but I can’t figure out an incantation that quite works, since I need to strip both a prefix and a suffix.
Any ideas on how to achieve this?