{"action":"created","issue":{"url":"https://api.github.com/repos/cainus/codecov.io/issues/17","labels_url":"https://api.github.com/repos/cainus/codecov.io/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/cainus/codecov.io/issues/17/comments","events_url":"https://api.github.com/repos/cainus/codecov.io/issues/17/events","html_url":"https://github.com/cainus/codecov.io/pull/17","id":89558118,"number":17,"title":"Add support for snap-ci","user":{"login":"kentcdodds","id":1500684,"avatar_url":"https://avatars.githubusercontent.com/u/1500684?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcdodds","html_url":"https://github.com/kentcdodds","followers_url":"https://api.github.com/users/kentcdodds/followers","following_url":"https://api.github.com/users/kentcdodds/following{/other_user}","gists_url":"https://api.github.com/users/kentcdodds/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcdodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcdodds/subscriptions","organizations_url":"https://api.github.com/users/kentcdodds/orgs","repos_url":"https://api.github.com/users/kentcdodds/repos","events_url":"https://api.github.com/users/kentcdodds/events{/privacy}","received_events_url":"https://api.github.com/users/kentcdodds/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-06-19T12:53:21Z","updated_at":"2015-06-30T20:08:00Z","closed_at":"2015-06-19T17:56:38Z","pull_request":{"url":"https://api.github.com/repos/cainus/codecov.io/pulls/17","html_url":"https://github.com/cainus/codecov.io/pull/17","diff_url":"https://github.com/cainus/codecov.io/pull/17.diff","patch_url":"https://github.com/cainus/codecov.io/pull/17.patch"},"body":"Closes #16\r\n\r\nI couldn't find a way to get `owner` or `repo` from snap's environment variables :-("},"comment":{"url":"https://api.github.com/repos/cainus/codecov.io/issues/comments/117325560","html_url":"https://github.com/cainus/codecov.io/pull/17#issuecomment-117325560","issue_url":"https://api.github.com/repos/cainus/codecov.io/issues/17","id":117325560,"user":{"login":"kentcdodds","id":1500684,"avatar_url":"https://avatars.githubusercontent.com/u/1500684?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcdodds","html_url":"https://github.com/kentcdodds","followers_url":"https://api.github.com/users/kentcdodds/followers","following_url":"https://api.github.com/users/kentcdodds/following{/other_user}","gists_url":"https://api.github.com/users/kentcdodds/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcdodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcdodds/subscriptions","organizations_url":"https://api.github.com/users/kentcdodds/orgs","repos_url":"https://api.github.com/users/kentcdodds/repos","events_url":"https://api.github.com/users/kentcdodds/events{/privacy}","received_events_url":"https://api.github.com/users/kentcdodds/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T20:08:00Z","updated_at":"2015-06-30T20:08:00Z","body":"@akshaykarle, looks like there is no `SNAP_BRANCH` environment variable available for pull request builds :-( This breaks codecov... Here's some useful output from [my private build](https://snap-ci.com/alianza-dev/admin-portal/pull/1/logs/defaultPipeline/1/Test?back_to=build_history):\r\n\r\nAll of the environment variables available from snap\r\n\r\n```\r\n$ export SNAP_CI=true\r\n$ export CI=true\r\n$ export SNAP_CACHE_DIR=/var/go\r\n$ export LANG=en_US.UTF-8\r\n$ export LC_ALL=en_US.UTF-8\r\n$ export SNAP_WORKING_DIR=/var/snap-ci/repo\r\n$ export SNAP_PIPELINE_COUNTER=1\r\n$ export SNAP_STAGE_NAME=Test\r\n$ export SNAP_PULL_REQUEST_NUMBER=1\r\n$ export SNAP_UPSTREAM_BRANCH=master\r\n$ export SNAP_COMMIT=fb4aec4b75e8c8efe732ae421b0f4e2a06b7214d\r\n$ export SNAP_COMMIT_SHORT=fb4aec4\r\n$ export SNAP_TRACKING_PIPELINE=true\r\n$ export SNAP_INTEGRATION_PIPELINE=false\r\n```\r\n\r\nThe attempt to send coverage stats to codecov:\r\n\r\n```\r\nconfiguration:  { service: 'snap',\r\n  build: '1',\r\n  commit: 'fb4aec4b75e8c8efe732ae421b0f4e2a06b7214d',\r\n  branch: undefined,\r\n  pull_request: '1',\r\n  token: '********',\r\n  package: 'node' }\r\nerror sending to codecov.io:  { [Error: non-success response]\r\n  detail: \r\n   { statusCode: 400,\r\n     body: '{\"uploaded\": false, \"meta\": {\"status\": 400, \"request\": \"1b1d451e-055a-46f5-9e06-698feb2ac8a8\"}, \"message\": \"Invalid value {\\'package\\': \\'node\\', \\'build\\': \\'1\\', \\'pull_request\\': \\'1\\', \\'service\\': \\'snap\\', \\'commit\\': \\'fb4aec4b75e8c8efe732ae421b0f4e2a06b7214d\\', \\'token\\': \\'********\\'} (dict): missing required properties: [\\'branch\\']\"}',\r\n     request: \r\n      { url: 'https://codecov.io/upload/v2?service=snap&build=1&commit=fb4aec4b75e8c8efe732ae421b0f4e2a06b7214d&branch=&pull_request=1&token=********&package=node',\r\n        body: 'TN:\\nSF:/var/snap-ci/repo/app/index.common.js\\nFNF:0\\\r\n\r\n... etc\r\n```\r\n\r\nSo it's missing `branch` because `SNAP_BRANCH` is not available in the PR build... Why is that? Is it a bug? Can it be fixed? Are we going to have to figure out the branch ourselves via git?"}}