{"action":"closed","issue":{"url":"https://api.github.com/repos/gogits/gogs/issues/366","labels_url":"https://api.github.com/repos/gogits/gogs/issues/366/labels{/name}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/366/comments","events_url":"https://api.github.com/repos/gogits/gogs/issues/366/events","html_url":"https://github.com/gogits/gogs/issues/366","id":41018275,"number":366,"title":"API, Webhooks and Integrations","user":{"login":"nuss-justin","id":6443781,"avatar_url":"https://avatars.githubusercontent.com/u/6443781?v=3","gravatar_id":"","url":"https://api.github.com/users/nuss-justin","html_url":"https://github.com/nuss-justin","followers_url":"https://api.github.com/users/nuss-justin/followers","following_url":"https://api.github.com/users/nuss-justin/following{/other_user}","gists_url":"https://api.github.com/users/nuss-justin/gists{/gist_id}","starred_url":"https://api.github.com/users/nuss-justin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuss-justin/subscriptions","organizations_url":"https://api.github.com/users/nuss-justin/orgs","repos_url":"https://api.github.com/users/nuss-justin/repos","events_url":"https://api.github.com/users/nuss-justin/events{/privacy}","received_events_url":"https://api.github.com/users/nuss-justin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2014-08-24T20:28:29Z","updated_at":"2015-07-25T03:23:05Z","closed_at":"2015-07-25T03:23:05Z","body":"I'd like to discuss some stuff about APIs, Webhooks and Integrations.\r\n\r\nI thought about integrations proposed/mentioned in other issues and came to the conclusion that (in my opinion) there should be some focus on an API, Webhooks and Integrations.\r\nThis would make working on such features much easier, as (with a good API and Webhooks) this features can be developed without affecting the develoment of Gogs itself. \r\nRight now for many things proposed here today we would need to change some functions.\r\n\r\nUntil here I think there even could be plans (or some kind of tracking bug here on Github or on Trello).\r\nBut let's talk more about integrations now.\r\n\r\nWhen integrating for example a CI tool the developer needs a way to show the build status for a pull request.\r\nThis means that we need (special) write access to the repository. For this we need a way for this kind of integrations to authenticate.\r\nThe best solution would probably be an option to generate special access tokens for URLs/Services in the project settings.\r\n\r\nHere comes what I'm really interested in (everything I wrote before is nothing new):\r\n\r\nA good idea for a tool like Gogs is to ship with some integrations for other tools/services (say drone).\r\nNow one could create an external tool that integrates drone in Gogs through communicating with Gogs/drone over their APIs(/Webhooks).\r\n\r\nThe thing about this is, that every integration shipping with Gogs would be it's one server this way.\r\nMy question is: Should everything be an external tool or should some integrations be build in?\r\nHaving an integration built in would allow easy enabling/disabling of it in the project settings and would allow us to update the integrations with Gogs.\r\n\r\nOn the other side updates for the integrations would then mean a new version of Gogs (because it would ship as one part/binary) and also it would require a way to\r\ninvoke the API as functions (without ugly (fake) HTTP requests) and receiving the webhooks.\r\n\r\nI thought about all this and would love to here your answer/opinions.\r\nDo you have the same (or an similar) opinion or do you think I'm crazy? (Which I probably wouldn't even deny ;-))\r\n\r\n(OMG, so much text)"}}