{"action":"closed","number":4136,"pull_request":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/4136","id":100366203,"html_url":"https://github.com/zestedesavoir/zds-site/pull/4136","diff_url":"https://github.com/zestedesavoir/zds-site/pull/4136.diff","patch_url":"https://github.com/zestedesavoir/zds-site/pull/4136.patch","issue_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/4136","number":4136,"state":"closed","locked":false,"title":"[ZEP-30] [WIP] Création de l'API des forums","user":{"login":"Anto59290","id":6287044,"avatar_url":"https://avatars2.githubusercontent.com/u/6287044?v=4","gravatar_id":"","url":"https://api.github.com/users/Anto59290","html_url":"https://github.com/Anto59290","followers_url":"https://api.github.com/users/Anto59290/followers","following_url":"https://api.github.com/users/Anto59290/following{/other_user}","gists_url":"https://api.github.com/users/Anto59290/gists{/gist_id}","starred_url":"https://api.github.com/users/Anto59290/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anto59290/subscriptions","organizations_url":"https://api.github.com/users/Anto59290/orgs","repos_url":"https://api.github.com/users/Anto59290/repos","events_url":"https://api.github.com/users/Anto59290/events{/privacy}","received_events_url":"https://api.github.com/users/Anto59290/received_events","type":"User","site_admin":false},"body":"| Q                                   | R\r\n| ----------------------------------- | -------------------------------------------\r\n| Type de modification                | nouvelle fonctionnalité\r\n| Ticket(s) (_issue(s)_) concerné(s)  | -\r\n\r\n### QA\r\n\r\n* Vérifier l'ensemble des routes/verbes de l'API ajouté.\r\n\r\n### Spécifications\r\nDans cette PR je vous propose l'ajout de l'API des forums (ancien nom ZEP-30). [Les spécifications de départ sont disponibles ici.](https://zestedesavoir.com/forums/sujet/3112/zep-30-elaboration-de-lapi-des-forums/) Elles n'ont pas été suivies : \r\n\r\n- Retrait des routes qui ne seront jamais utilisées. Personne ne créera jamais de forum (ou n’éditera) en utilisant l'API. La création de forum est un cas extrêmement rare ( < 1 fois / an) et pour cela l'admin de Django est suffisant.\r\n- Refacto de certaines routes. Par exemple la route /api/tags/:tag/sujets n'existe plus, on pourra en revanche faire une requête sur /sujets en utilisant un tag en filtre. Cette approche permet de filtrer par forum / auteur / tag (ou une combinaison de ces filtres). \r\n- Le prefixe /forum/ est présent sur toutes les routes de cette API.\r\n- Le like et le dislike ayant été implémenté depuis la rédaction des specs le code n'a pas été touché de ce côté là.\r\n\r\n### Travail effectué\r\n\r\nA ce jour voilà ce qui a été fait : \r\n- Écriture des routes\r\n- Écriture de l'environnement de l'API : permissions, serializers, validators, etc.\r\n- Écriture des tests\r\n\r\n### A faire\r\n\r\nBien que le gros du travail soit fait, il reste beaucoup de peaufinage : \r\n- [ ] Réorganiser le code de test en différentes classes, reordonner les tests\r\n- [ ] Gérer le champ update (date) lors de l'edit de messages / topic\r\n- [x] Gérer l'antispam (limite de 15 minutes d'attente entre deux posts)\r\n- [x] Identifer quand masquer les messages (message modéré ou masqué par son auteur)\r\n- [x] Empecher les membres en ls et les membres bannis de faire des alertes\r\n- [ ] Gestion de tags (à la création d'un topic, à l'édit et aux details)\r\n- [ ] Certains tests ne passent pas (environ 4 / 100). Majoritairement des permissions à affiner\r\n- [x] Certains tests sont encore manquants (environ une dizaine)\r\n- [ ] Nettoyage du code, retirer les print restant, relire la documentation des routes\r\n- [ ] Style / PEP8\r\n\r\n### A vous les studios\r\n\r\nJe suis preneur de tous commentaires sur le code / le style / les routes / les autorisations, etc. Il y a probablement des moyens de faire plus simple à certains endroits. J'ai pas mal de notes en commentaires dans le code pour les choses à faire (todo) et pour le style de code à certains endroits. \r\n\r\n\r\n**Ne pas merger travail en cours !** \r\n","created_at":"2017-01-05T21:21:15Z","updated_at":"2017-08-21T11:31:42Z","closed_at":"2017-08-21T11:31:42Z","merged_at":null,"merge_commit_sha":"f8b1860e08f6e46696ecd93a086b613370390be1","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/4136/commits","review_comments_url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/4136/comments","review_comment_url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/4136/comments","statuses_url":"https://api.github.com/repos/zestedesavoir/zds-site/statuses/b5ef5ce7fc1fb7282b2c6e0213a599bc96432088","head":{"label":"Anto59290:ZEP30","ref":"ZEP30","sha":"b5ef5ce7fc1fb7282b2c6e0213a599bc96432088","user":{"login":"Anto59290","id":6287044,"avatar_url":"https://avatars2.githubusercontent.com/u/6287044?v=4","gravatar_id":"","url":"https://api.github.com/users/Anto59290","html_url":"https://github.com/Anto59290","followers_url":"https://api.github.com/users/Anto59290/followers","following_url":"https://api.github.com/users/Anto59290/following{/other_user}","gists_url":"https://api.github.com/users/Anto59290/gists{/gist_id}","starred_url":"https://api.github.com/users/Anto59290/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anto59290/subscriptions","organizations_url":"https://api.github.com/users/Anto59290/orgs","repos_url":"https://api.github.com/users/Anto59290/repos","events_url":"https://api.github.com/users/Anto59290/events{/privacy}","received_events_url":"https://api.github.com/users/Anto59290/received_events","type":"User","site_admin":false},"repo":{"id":54818027,"name":"zds-site","full_name":"Anto59290/zds-site","owner":{"login":"Anto59290","id":6287044,"avatar_url":"https://avatars2.githubusercontent.com/u/6287044?v=4","gravatar_id":"","url":"https://api.github.com/users/Anto59290","html_url":"https://github.com/Anto59290","followers_url":"https://api.github.com/users/Anto59290/followers","following_url":"https://api.github.com/users/Anto59290/following{/other_user}","gists_url":"https://api.github.com/users/Anto59290/gists{/gist_id}","starred_url":"https://api.github.com/users/Anto59290/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anto59290/subscriptions","organizations_url":"https://api.github.com/users/Anto59290/orgs","repos_url":"https://api.github.com/users/Anto59290/repos","events_url":"https://api.github.com/users/Anto59290/events{/privacy}","received_events_url":"https://api.github.com/users/Anto59290/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Anto59290/zds-site","description":"Dépot ZDS","fork":true,"url":"https://api.github.com/repos/Anto59290/zds-site","forks_url":"https://api.github.com/repos/Anto59290/zds-site/forks","keys_url":"https://api.github.com/repos/Anto59290/zds-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Anto59290/zds-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Anto59290/zds-site/teams","hooks_url":"https://api.github.com/repos/Anto59290/zds-site/hooks","issue_events_url":"https://api.github.com/repos/Anto59290/zds-site/issues/events{/number}","events_url":"https://api.github.com/repos/Anto59290/zds-site/events","assignees_url":"https://api.github.com/repos/Anto59290/zds-site/assignees{/user}","branches_url":"https://api.github.com/repos/Anto59290/zds-site/branches{/branch}","tags_url":"https://api.github.com/repos/Anto59290/zds-site/tags","blobs_url":"https://api.github.com/repos/Anto59290/zds-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Anto59290/zds-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Anto59290/zds-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/Anto59290/zds-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Anto59290/zds-site/statuses/{sha}","languages_url":"https://api.github.com/repos/Anto59290/zds-site/languages","stargazers_url":"https://api.github.com/repos/Anto59290/zds-site/stargazers","contributors_url":"https://api.github.com/repos/Anto59290/zds-site/contributors","subscribers_url":"https://api.github.com/repos/Anto59290/zds-site/subscribers","subscription_url":"https://api.github.com/repos/Anto59290/zds-site/subscription","commits_url":"https://api.github.com/repos/Anto59290/zds-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/Anto59290/zds-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/Anto59290/zds-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/Anto59290/zds-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/Anto59290/zds-site/contents/{+path}","compare_url":"https://api.github.com/repos/Anto59290/zds-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Anto59290/zds-site/merges","archive_url":"https://api.github.com/repos/Anto59290/zds-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Anto59290/zds-site/downloads","issues_url":"https://api.github.com/repos/Anto59290/zds-site/issues{/number}","pulls_url":"https://api.github.com/repos/Anto59290/zds-site/pulls{/number}","milestones_url":"https://api.github.com/repos/Anto59290/zds-site/milestones{/number}","notifications_url":"https://api.github.com/repos/Anto59290/zds-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Anto59290/zds-site/labels{/name}","releases_url":"https://api.github.com/repos/Anto59290/zds-site/releases{/id}","deployments_url":"https://api.github.com/repos/Anto59290/zds-site/deployments","created_at":"2016-03-27T07:45:57Z","updated_at":"2016-03-27T07:46:00Z","pushed_at":"2017-08-15T19:04:15Z","git_url":"git://github.com/Anto59290/zds-site.git","ssh_url":"git@github.com:Anto59290/zds-site.git","clone_url":"https://github.com/Anto59290/zds-site.git","svn_url":"https://github.com/Anto59290/zds-site","homepage":null,"size":105867,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"zestedesavoir:dev","ref":"dev","sha":"6310c92ae1d88ffbbcd2d8a7acf125513eaa9ae4","user":{"login":"zestedesavoir","id":7406239,"avatar_url":"https://avatars3.githubusercontent.com/u/7406239?v=4","gravatar_id":"","url":"https://api.github.com/users/zestedesavoir","html_url":"https://github.com/zestedesavoir","followers_url":"https://api.github.com/users/zestedesavoir/followers","following_url":"https://api.github.com/users/zestedesavoir/following{/other_user}","gists_url":"https://api.github.com/users/zestedesavoir/gists{/gist_id}","starred_url":"https://api.github.com/users/zestedesavoir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zestedesavoir/subscriptions","organizations_url":"https://api.github.com/users/zestedesavoir/orgs","repos_url":"https://api.github.com/users/zestedesavoir/repos","events_url":"https://api.github.com/users/zestedesavoir/events{/privacy}","received_events_url":"https://api.github.com/users/zestedesavoir/received_events","type":"Organization","site_admin":false},"repo":{"id":14778920,"name":"zds-site","full_name":"zestedesavoir/zds-site","owner":{"login":"zestedesavoir","id":7406239,"avatar_url":"https://avatars3.githubusercontent.com/u/7406239?v=4","gravatar_id":"","url":"https://api.github.com/users/zestedesavoir","html_url":"https://github.com/zestedesavoir","followers_url":"https://api.github.com/users/zestedesavoir/followers","following_url":"https://api.github.com/users/zestedesavoir/following{/other_user}","gists_url":"https://api.github.com/users/zestedesavoir/gists{/gist_id}","starred_url":"https://api.github.com/users/zestedesavoir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zestedesavoir/subscriptions","organizations_url":"https://api.github.com/users/zestedesavoir/orgs","repos_url":"https://api.github.com/users/zestedesavoir/repos","events_url":"https://api.github.com/users/zestedesavoir/events{/privacy}","received_events_url":"https://api.github.com/users/zestedesavoir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zestedesavoir/zds-site","description":"Dépôt de ZdS, faisant notamment fonctionner https://zestedesavoir.com","fork":false,"url":"https://api.github.com/repos/zestedesavoir/zds-site","forks_url":"https://api.github.com/repos/zestedesavoir/zds-site/forks","keys_url":"https://api.github.com/repos/zestedesavoir/zds-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zestedesavoir/zds-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zestedesavoir/zds-site/teams","hooks_url":"https://api.github.com/repos/zestedesavoir/zds-site/hooks","issue_events_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/events{/number}","events_url":"https://api.github.com/repos/zestedesavoir/zds-site/events","assignees_url":"https://api.github.com/repos/zestedesavoir/zds-site/assignees{/user}","branches_url":"https://api.github.com/repos/zestedesavoir/zds-site/branches{/branch}","tags_url":"https://api.github.com/repos/zestedesavoir/zds-site/tags","blobs_url":"https://api.github.com/repos/zestedesavoir/zds-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zestedesavoir/zds-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zestedesavoir/zds-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/zestedesavoir/zds-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zestedesavoir/zds-site/statuses/{sha}","languages_url":"https://api.github.com/repos/zestedesavoir/zds-site/languages","stargazers_url":"https://api.github.com/repos/zestedesavoir/zds-site/stargazers","contributors_url":"https://api.github.com/repos/zestedesavoir/zds-site/contributors","subscribers_url":"https://api.github.com/repos/zestedesavoir/zds-site/subscribers","subscription_url":"https://api.github.com/repos/zestedesavoir/zds-site/subscription","commits_url":"https://api.github.com/repos/zestedesavoir/zds-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/zestedesavoir/zds-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/zestedesavoir/zds-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/zestedesavoir/zds-site/contents/{+path}","compare_url":"https://api.github.com/repos/zestedesavoir/zds-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zestedesavoir/zds-site/merges","archive_url":"https://api.github.com/repos/zestedesavoir/zds-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zestedesavoir/zds-site/downloads","issues_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues{/number}","pulls_url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls{/number}","milestones_url":"https://api.github.com/repos/zestedesavoir/zds-site/milestones{/number}","notifications_url":"https://api.github.com/repos/zestedesavoir/zds-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zestedesavoir/zds-site/labels{/name}","releases_url":"https://api.github.com/repos/zestedesavoir/zds-site/releases{/id}","deployments_url":"https://api.github.com/repos/zestedesavoir/zds-site/deployments","created_at":"2013-11-28T14:23:48Z","updated_at":"2017-08-12T10:56:14Z","pushed_at":"2017-08-21T11:31:20Z","git_url":"git://github.com/zestedesavoir/zds-site.git","ssh_url":"git@github.com:zestedesavoir/zds-site.git","clone_url":"https://github.com/zestedesavoir/zds-site.git","svn_url":"https://github.com/zestedesavoir/zds-site","homepage":"","size":109070,"stargazers_count":189,"watchers_count":189,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":133,"mirror_url":null,"open_issues_count":257,"forks":133,"open_issues":257,"watchers":189,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/4136"},"html":{"href":"https://github.com/zestedesavoir/zds-site/pull/4136"},"issue":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/issues/4136"},"comments":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/issues/4136/comments"},"review_comments":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/4136/comments"},"review_comment":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/4136/commits"},"statuses":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/statuses/b5ef5ce7fc1fb7282b2c6e0213a599bc96432088"}},"merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":12,"review_comments":3,"maintainer_can_modify":false,"commits":29,"additions":2885,"deletions":21,"changed_files":13}}
{"actor":{"display_login":"artragis"}}