{"action":"created","issue":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/2894","labels_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/2894/labels{/name}","comments_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/2894/comments","events_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/2894/events","html_url":"https://github.com/travis-ci/travis-ci/issues/2894","id":46463350,"number":2894,"title":"Slack notifications: add support for on_success and on_failure","user":{"login":"mattab","id":466765,"avatar_url":"https://avatars.githubusercontent.com/u/466765?v=3","gravatar_id":"","url":"https://api.github.com/users/mattab","html_url":"https://github.com/mattab","followers_url":"https://api.github.com/users/mattab/followers","following_url":"https://api.github.com/users/mattab/following{/other_user}","gists_url":"https://api.github.com/users/mattab/gists{/gist_id}","starred_url":"https://api.github.com/users/mattab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattab/subscriptions","organizations_url":"https://api.github.com/users/mattab/orgs","repos_url":"https://api.github.com/users/mattab/repos","events_url":"https://api.github.com/users/mattab/events{/privacy}","received_events_url":"https://api.github.com/users/mattab/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/travis-ci/travis-ci/labels/notifications","name":"notifications","color":"444444"}],"state":"open","locked":false,"assignee":{"login":"BanzaiMan","id":25666,"avatar_url":"https://avatars.githubusercontent.com/u/25666?v=3","gravatar_id":"","url":"https://api.github.com/users/BanzaiMan","html_url":"https://github.com/BanzaiMan","followers_url":"https://api.github.com/users/BanzaiMan/followers","following_url":"https://api.github.com/users/BanzaiMan/following{/other_user}","gists_url":"https://api.github.com/users/BanzaiMan/gists{/gist_id}","starred_url":"https://api.github.com/users/BanzaiMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BanzaiMan/subscriptions","organizations_url":"https://api.github.com/users/BanzaiMan/orgs","repos_url":"https://api.github.com/users/BanzaiMan/repos","events_url":"https://api.github.com/users/BanzaiMan/events{/privacy}","received_events_url":"https://api.github.com/users/BanzaiMan/received_events","type":"User","site_admin":false},"milestone":null,"comments":20,"created_at":"2014-10-22T01:18:30Z","updated_at":"2015-11-24T20:41:56Z","closed_at":null,"body":"The goal of this issue is to add support for `on_success` and `on_failure` for Slack notifications.\r\n\r\n**Steps to reproduce:**\r\n * Add notification to Slack eg. https://github.com/piwik/piwik/blob/master/.travis.yml#L167-L172\r\n```\r\nslack:\r\nrooms:\r\n- piwik:x\r\non_success: change\r\non_failure: change\r\n```\r\n * Commit a change to repo\r\n\r\n**Result:**\r\n * Expected:  get notifications in Slack only when build status changes\r\n * Got instead: notifications is sent to Slack after each build\r\n"},"comment":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/comments/159399090","html_url":"https://github.com/travis-ci/travis-ci/issues/2894#issuecomment-159399090","issue_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/2894","id":159399090,"user":{"login":"BanzaiMan","id":25666,"avatar_url":"https://avatars.githubusercontent.com/u/25666?v=3","gravatar_id":"","url":"https://api.github.com/users/BanzaiMan","html_url":"https://github.com/BanzaiMan","followers_url":"https://api.github.com/users/BanzaiMan/followers","following_url":"https://api.github.com/users/BanzaiMan/following{/other_user}","gists_url":"https://api.github.com/users/BanzaiMan/gists{/gist_id}","starred_url":"https://api.github.com/users/BanzaiMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BanzaiMan/subscriptions","organizations_url":"https://api.github.com/users/BanzaiMan/orgs","repos_url":"https://api.github.com/users/BanzaiMan/repos","events_url":"https://api.github.com/users/BanzaiMan/events{/privacy}","received_events_url":"https://api.github.com/users/BanzaiMan/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T20:41:55Z","updated_at":"2015-11-24T20:41:55Z","body":"I just tested the `on_success` and `on_failure` with both string and symbol, and they all worked as expected. This is the case with .com and .org."}}