thii / aws-codebuild-extras

Add extra information of your AWS CodeBuild build via environment variables.
150 stars 115 forks source link

CODEBUILD_PULL_REQUEST always equals false #8

Open iansu opened 5 years ago

iansu commented 5 years ago

This seemed to be working a couple of weeks ago but CODEBUILD_PULL_REQUEST always seems to be false for me now.

kingdonb commented 5 years ago

From the discussion at https://stackoverflow.com/questions/47657423/get-github-git-branch-for-aws-codebuild I would guess this is related to #1

I have replaced the CODEBUILD_ prefix with my own internal prefix or eg. GIT_TAG and this script is working for me.

thii commented 5 years ago

Please try setting git clone depth to something greater than 1.

kingdonb commented 5 years ago

Thank you! I will give that a try, one of my coworkers suggested the same thing in a meeting yesterday.

tahacanatak commented 3 years ago

Thank you! I will give that a try, one of my coworkers suggested the same thing in a meeting yesterday.

I am having the same problem. git clone depth is greater than 1 but it didn't work. pull request always false. Did you find a solution?