{"action":"created","issue":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/1633","labels_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/1633/labels{/name}","comments_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/1633/comments","events_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/1633/events","html_url":"https://github.com/travis-ci/travis-ci/issues/1633","id":22870811,"number":1633,"title":"Add ENV var for branch name where PR came from","user":{"login":"joshk","id":8701,"avatar_url":"https://avatars.githubusercontent.com/u/8701?v=3","gravatar_id":"","url":"https://api.github.com/users/joshk","html_url":"https://github.com/joshk","followers_url":"https://api.github.com/users/joshk/followers","following_url":"https://api.github.com/users/joshk/following{/other_user}","gists_url":"https://api.github.com/users/joshk/gists{/gist_id}","starred_url":"https://api.github.com/users/joshk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshk/subscriptions","organizations_url":"https://api.github.com/users/joshk/orgs","repos_url":"https://api.github.com/users/joshk/repos","events_url":"https://api.github.com/users/joshk/events{/privacy}","received_events_url":"https://api.github.com/users/joshk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/travis-ci/travis-ci/labels/feature-request","name":"feature-request","color":"009800"},{"url":"https://api.github.com/repos/travis-ci/travis-ci/labels/travis-build","name":"travis-build","color":"207de5"},{"url":"https://api.github.com/repos/travis-ci/travis-ci/labels/travis-hub","name":"travis-hub","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2013-11-18T22:00:17Z","updated_at":"2015-09-28T12:29:30Z","closed_at":null,"body":"A customer asked for us to export the branch name where the PR came from as they use it in their tests to clone another repo which uses the same branch name structure.\r\n\r\neg. `TRAVIS_PULL_REQUEST_SOURCE_BRANCH_NAME` (name is a little long) :)"},"comment":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/comments/143729063","html_url":"https://github.com/travis-ci/travis-ci/issues/1633#issuecomment-143729063","issue_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/1633","id":143729063,"user":{"login":"brianguertin","id":120002,"avatar_url":"https://avatars.githubusercontent.com/u/120002?v=3","gravatar_id":"","url":"https://api.github.com/users/brianguertin","html_url":"https://github.com/brianguertin","followers_url":"https://api.github.com/users/brianguertin/followers","following_url":"https://api.github.com/users/brianguertin/following{/other_user}","gists_url":"https://api.github.com/users/brianguertin/gists{/gist_id}","starred_url":"https://api.github.com/users/brianguertin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianguertin/subscriptions","organizations_url":"https://api.github.com/users/brianguertin/orgs","repos_url":"https://api.github.com/users/brianguertin/repos","events_url":"https://api.github.com/users/brianguertin/events{/privacy}","received_events_url":"https://api.github.com/users/brianguertin/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T12:29:30Z","updated_at":"2015-09-28T12:29:30Z","body":"@bpinto My workaround for now is:\r\n```\r\ngit fetch --tags\r\ngit fetch --unshallow\r\nBRANCH=`git rev-parse --abbrev-ref HEAD`\r\n```"}}