{"action":"created","issue":{"url":"https://api.github.com/repos/gogits/gogs/issues/2045","labels_url":"https://api.github.com/repos/gogits/gogs/issues/2045/labels{/name}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/2045/comments","events_url":"https://api.github.com/repos/gogits/gogs/issues/2045/events","html_url":"https://github.com/gogits/gogs/issues/2045","id":119210837,"number":2045,"title":"Slack hook too verbose on fallback","user":{"login":"mkaito","id":20434,"avatar_url":"https://avatars.githubusercontent.com/u/20434?v=3","gravatar_id":"","url":"https://api.github.com/users/mkaito","html_url":"https://github.com/mkaito","followers_url":"https://api.github.com/users/mkaito/followers","following_url":"https://api.github.com/users/mkaito/following{/other_user}","gists_url":"https://api.github.com/users/mkaito/gists{/gist_id}","starred_url":"https://api.github.com/users/mkaito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkaito/subscriptions","organizations_url":"https://api.github.com/users/mkaito/orgs","repos_url":"https://api.github.com/users/mkaito/repos","events_url":"https://api.github.com/users/mkaito/events{/privacy}","received_events_url":"https://api.github.com/users/mkaito/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gogits/gogs/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/gogits/gogs/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/gogits/gogs/labels/feedback%20needed","name":"feedback needed","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/gogits/gogs/milestones/15","html_url":"https://github.com/gogits/gogs/milestones/0.8.0","labels_url":"https://api.github.com/repos/gogits/gogs/milestones/15/labels","id":1423407,"number":15,"title":"0.8.0","description":"","creator":{"login":"Unknwon","id":2946214,"avatar_url":"https://avatars.githubusercontent.com/u/2946214?v=3","gravatar_id":"","url":"https://api.github.com/users/Unknwon","html_url":"https://github.com/Unknwon","followers_url":"https://api.github.com/users/Unknwon/followers","following_url":"https://api.github.com/users/Unknwon/following{/other_user}","gists_url":"https://api.github.com/users/Unknwon/gists{/gist_id}","starred_url":"https://api.github.com/users/Unknwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unknwon/subscriptions","organizations_url":"https://api.github.com/users/Unknwon/orgs","repos_url":"https://api.github.com/users/Unknwon/repos","events_url":"https://api.github.com/users/Unknwon/events{/privacy}","received_events_url":"https://api.github.com/users/Unknwon/received_events","type":"User","site_admin":false},"open_issues":34,"closed_issues":40,"state":"open","created_at":"2015-11-21T22:31:47Z","updated_at":"2015-12-05T01:11:33Z","due_on":null,"closed_at":null},"comments":36,"created_at":"2015-11-27T15:15:28Z","updated_at":"2015-12-05T02:31:16Z","closed_at":null,"body":"We use Slack, which I use over IRC, so I get the fallback text for hooks. I've found the gogs notifications to be... verbose. Let me illustrate:\r\n\r\nI force-pushed to a repo, which is not really the average case, but it serves to illustrate the spam.\r\n\r\nThis is what it looks like in the Slack client:\r\n![gogs_slack_web](https://cloud.githubusercontent.com/assets/20434/11443742/7920ff3c-9517-11e5-81b6-650a83370cbb.png)\r\n\r\nThis looks sweet, and thanks to the goodness of hyperlinked text, it is concise yet practical.\r\n\r\nNow, on IRC it looks like this:\r\n![gogs_slack_fallback](https://cloud.githubusercontent.com/assets/20434/11443760/99e6864c-9517-11e5-9dd2-6784cd45a4cb.png)\r\n\r\nThe first line contains a full link to the repo, a full link to the branch, and a full link to the full diff. Then we have a line for each commit with a full link to that changeset.\r\n\r\nWhile that certainly contains every link one could possibly want, I think it's actually *too much*. Extensive linking is fine with hyperlinked text, but plaintext links are huge, and the amount of links actually makes it hard to read.\r\n\r\nI propose reducing the amount of text to the bare minimum, with only a single link where one can see everything. As an IRC user, I'm perfectly fine with not getting every bell and whistle present in the full slack interface. That's precisely *why* I use IRC.\r\n\r\nSo here's what I'd put in the fallback, at most:\r\n\r\n```\r\nmkaito pushed 5 new commits to potato/master:  http://git.guildpad.com/haven/potato/compare/8317d2518487c1950626babacd95aa584ff486da...4912bcf99b04691f67913cdd7ffccdcbcc666489\r\n```\r\n\r\nAs a bit of a minimalist, I still think that link is a bit on the longer side. One way to work around this would be shortening the link to use only the minimum necessary part of the SHA, which is usually the first 6 characters:\r\n\r\n```\r\nmkaito pushed 5 new commits to potato/master:  http://git.guildpad.com/haven/potato/compare/8317d2...4912bc\r\n```\r\n\r\nAlternatively, just link to the commits page, and let the user work out what he wants to see. This would be further supported by the ability to compare commits right from the commits page (but that's a separate issue).\r\n\r\n```\r\nmkaito pushed 5 new commits to potato/master: http://git.guildpad.com/haven/potato/commits/master\r\n```"},"comment":{"url":"https://api.github.com/repos/gogits/gogs/issues/comments/162132875","html_url":"https://github.com/gogits/gogs/issues/2045#issuecomment-162132875","issue_url":"https://api.github.com/repos/gogits/gogs/issues/2045","id":162132875,"user":{"login":"Unknwon","id":2946214,"avatar_url":"https://avatars.githubusercontent.com/u/2946214?v=3","gravatar_id":"","url":"https://api.github.com/users/Unknwon","html_url":"https://github.com/Unknwon","followers_url":"https://api.github.com/users/Unknwon/followers","following_url":"https://api.github.com/users/Unknwon/following{/other_user}","gists_url":"https://api.github.com/users/Unknwon/gists{/gist_id}","starred_url":"https://api.github.com/users/Unknwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unknwon/subscriptions","organizations_url":"https://api.github.com/users/Unknwon/orgs","repos_url":"https://api.github.com/users/Unknwon/repos","events_url":"https://api.github.com/users/Unknwon/events{/privacy}","received_events_url":"https://api.github.com/users/Unknwon/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T02:31:16Z","updated_at":"2015-12-05T02:31:16Z","body":"OK, I just pushed something for other issues, now the `develop` branch should have version `0.7.30.1204 Beta`, please make sure you test under this version."}}