DRONE_COMMIT_MESSAGE is not updated in PR events


I’m using some keywords in my commit message to modify the CI logic. The CI logic runs in the PR events.

I’ve just realised that Drone does not update the DRONE_COMMIT_MESSAGE environment variable when there are subsequent commits added to a PR, and therefore the logic of my CI is always decided upon the commit message of the first commit, not the subsequent one.


the DRONE_COMMIT_MESSAGE is populated from the pull_request.title field in the pull request webhook. We do not capture the individual git commit message for pull requests.

Could that use case be accommodated? It seems really weird that DRONE_COMMIT_MESSAGE takes the drone PR title. In that case, I would expect the commit message to be empty and the current value to be bound to DRONE_PR_TITLE.

However, I see no reason why DRONE_COMMIT_MESSAGE is not correctly populated.


yes, we can consider capturing the git commit message field in a future release.

1 Like

I was confused about this behavior.
I tryed to use “[CI SKIP]” commit message explained in “Skip Commits” in http://docs.drone.io/hooks/#skip-commits, but it does not work.
I think this is because DRONE_COMMIT_MESSAGE is pull_request.title when the hook event is pull_request.