{"action":"created","issue":{"url":"https://api.github.com/repos/bitrise-io/bitrise-webhooks/issues/4","repository_url":"https://api.github.com/repos/bitrise-io/bitrise-webhooks","labels_url":"https://api.github.com/repos/bitrise-io/bitrise-webhooks/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/bitrise-io/bitrise-webhooks/issues/4/comments","events_url":"https://api.github.com/repos/bitrise-io/bitrise-webhooks/issues/4/events","html_url":"https://github.com/bitrise-io/bitrise-webhooks/pull/4","id":157137986,"number":4,"title":"Add support for Environment Variables in Slack commands.","user":{"login":"nobre84","id":459535,"avatar_url":"https://avatars.githubusercontent.com/u/459535?v=3","gravatar_id":"","url":"https://api.github.com/users/nobre84","html_url":"https://github.com/nobre84","followers_url":"https://api.github.com/users/nobre84/followers","following_url":"https://api.github.com/users/nobre84/following{/other_user}","gists_url":"https://api.github.com/users/nobre84/gists{/gist_id}","starred_url":"https://api.github.com/users/nobre84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nobre84/subscriptions","organizations_url":"https://api.github.com/users/nobre84/orgs","repos_url":"https://api.github.com/users/nobre84/repos","events_url":"https://api.github.com/users/nobre84/events{/privacy}","received_events_url":"https://api.github.com/users/nobre84/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bitrise-io/bitrise-webhooks/labels/awaiting-reply","name":"awaiting-reply","color":"159818"},{"url":"https://api.github.com/repos/bitrise-io/bitrise-webhooks/labels/awesome","name":"awesome","color":"006b75"},{"url":"https://api.github.com/repos/bitrise-io/bitrise-webhooks/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":34,"created_at":"2016-05-27T06:20:32Z","updated_at":"2016-06-20T10:10:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitrise-io/bitrise-webhooks/pulls/4","html_url":"https://github.com/bitrise-io/bitrise-webhooks/pull/4","diff_url":"https://github.com/bitrise-io/bitrise-webhooks/pull/4.diff","patch_url":"https://github.com/bitrise-io/bitrise-webhooks/pull/4.patch"},"body":"Hi! I needed this feature: https://bitrise.uservoice.com/forums/235233-general/suggestions/14200494-allow-for-custom-params-for-slack-command-to-be-se\r\n\r\nOn the chatrooms you guys gave me the option to use the API directly with the advanced build feature, thanks! I take a stab at how I would see this working, sorry I'm awful at Golang! Never had used it before and couldn't make the server run locally to test it working. Please if anyone can review this and make it better...\r\n\r\nThe usage would be:\r\nSlack command calls `/bitrise branch:develop|env[DEVICE_NAME]:iPhone de Rafael|env[DEVICE_UDID]:8237842783478237878234`\r\n\r\nwebhook-processor outputs\r\n`\"build_params\":{\"branch\":\"develop\",\"environments\":[{\"mapped_to\":\"DEVICE_NAME\",\"value\":\"iPhone de Rafael\",\"is_expand\":true},{\"mapped_to\":\"DEVICE_UDID\",\"value\":\"8237842783478237878234\",\"is_expand\":true}]}`"},"comment":{"url":"https://api.github.com/repos/bitrise-io/bitrise-webhooks/issues/comments/227102465","html_url":"https://github.com/bitrise-io/bitrise-webhooks/pull/4#issuecomment-227102465","issue_url":"https://api.github.com/repos/bitrise-io/bitrise-webhooks/issues/4","id":227102465,"user":{"login":"viktorbenei","id":430618,"avatar_url":"https://avatars.githubusercontent.com/u/430618?v=3","gravatar_id":"","url":"https://api.github.com/users/viktorbenei","html_url":"https://github.com/viktorbenei","followers_url":"https://api.github.com/users/viktorbenei/followers","following_url":"https://api.github.com/users/viktorbenei/following{/other_user}","gists_url":"https://api.github.com/users/viktorbenei/gists{/gist_id}","starred_url":"https://api.github.com/users/viktorbenei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktorbenei/subscriptions","organizations_url":"https://api.github.com/users/viktorbenei/orgs","repos_url":"https://api.github.com/users/viktorbenei/repos","events_url":"https://api.github.com/users/viktorbenei/events{/privacy}","received_events_url":"https://api.github.com/users/viktorbenei/received_events","type":"User","site_admin":false},"created_at":"2016-06-20T10:10:45Z","updated_at":"2016-06-20T10:10:45Z","body":"> I changed as per your request, but the call sites look weird imo as they now require passing an empty environment array instead of not passing anything.\r\n\r\nDo you mean in the tests?\r\n\r\nBtw I agree with you that this is not the best aspect of Go, but so far we found that using this pattern (never return `nil` for maps/slices) is the safest way overall, as you won't accidentally skip a `nil` check and use the variable as if it'd be initialized when in reality it's a typed `nil`."}}
{"actor":{"display_login":"viktorbenei"}}