{"action":"created","comment":{"url":"https://api.github.com/repos/jjaniec/21sh/pulls/comments/221008663","pull_request_review_id":159554336,"id":221008663,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTAwODY2Mw==","diff_hunk":"@@ -0,0 +1,87 @@\n+/* ************************************************************************** */\n+/*                                                                            */\n+/*                                                        :::      ::::::::   */\n+/*   get_next_line.c                                    :+:      :+:    :+:   */\n+/*                                                    +:+ +:+         +:+     */\n+/*   By: cyfermie <cyfermie@student.42.fr>          +#+  +:+       +#+        */\n+/*                                                +#+#+#+#+#+   +#+           */\n+/*   Created: 2017/12/09 14:51:42 by cgaspart          #+#    #+#             */\n+/*   Updated: 2018/09/25 16:57:15 by cyfermie         ###   ########.fr       */\n+/*                                                                            */\n+/* ************************************************************************** */\n+\n+#include <twenty_one_sh.h>\n+\n+static t_slot    *get_slot(t_slot *first, int fd)\n+{\n+    t_slot    *slot;\n+\n+    slot = first;\n+    while (slot && slot->fd != fd)\n+        slot = slot->next;\n+    if (!slot)\n+    {\n+        if (!(slot = malloc(sizeof(t_slot))) ||\n+        !(slot->save = ft_strnew(0)))","path":"srcs/get_next_line.c","position":25,"original_position":25,"commit_id":"14cef8b4db49840df99eedc366b88bcd265b1cc4","original_commit_id":"14cef8b4db49840df99eedc366b88bcd265b1cc4","user":{"login":"sonarcloud[bot]","id":39514782,"node_id":"MDM6Qm90Mzk1MTQ3ODI=","avatar_url":"https://avatars2.githubusercontent.com/in/12526?v=4","gravatar_id":"","url":"https://api.github.com/users/sonarcloud%5Bbot%5D","html_url":"https://github.com/apps/sonarcloud","followers_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/followers","following_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/repos","events_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"![Code Smell](https://sonarsource.github.io/sonar-github/code_smell.png 'Code Smell') Code Smell: Remove any side effects from right hand operands of logical && or || operators. ([c:SideEffectInRightHandSideOfLogical](https://sonarcloud.io/organizations/jjaniec-github/rules#rule_key=c%3ASideEffectInRightHandSideOfLogical))\n\n[See it in SonarCloud](https://sonarcloud.io/project/issues?id=jjaniec_21sh&pullRequest=30&issues=AWYb47pbvOWp7Yd651ZK&open=AWYb47pbvOWp7Yd651ZK)\n\n[ISSUE_KEY]: AWYb47pbvOWp7Yd651ZK","created_at":"2018-09-27T17:22:14Z","updated_at":"2018-09-27T17:22:15Z","html_url":"https://github.com/jjaniec/21sh/pull/30#discussion_r221008663","pull_request_url":"https://api.github.com/repos/jjaniec/21sh/pulls/30","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/comments/221008663"},"html":{"href":"https://github.com/jjaniec/21sh/pull/30#discussion_r221008663"},"pull_request":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/jjaniec/21sh/pulls/30","id":218713015,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4NzEzMDE1","html_url":"https://github.com/jjaniec/21sh/pull/30","diff_url":"https://github.com/jjaniec/21sh/pull/30.diff","patch_url":"https://github.com/jjaniec/21sh/pull/30.patch","issue_url":"https://api.github.com/repos/jjaniec/21sh/issues/30","number":30,"state":"open","locked":false,"title":"Builtin history","user":{"login":"Gamouche","id":22396445,"node_id":"MDQ6VXNlcjIyMzk2NDQ1","avatar_url":"https://avatars0.githubusercontent.com/u/22396445?v=4","gravatar_id":"","url":"https://api.github.com/users/Gamouche","html_url":"https://github.com/Gamouche","followers_url":"https://api.github.com/users/Gamouche/followers","following_url":"https://api.github.com/users/Gamouche/following{/other_user}","gists_url":"https://api.github.com/users/Gamouche/gists{/gist_id}","starred_url":"https://api.github.com/users/Gamouche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gamouche/subscriptions","organizations_url":"https://api.github.com/users/Gamouche/orgs","repos_url":"https://api.github.com/users/Gamouche/repos","events_url":"https://api.github.com/users/Gamouche/events{/privacy}","received_events_url":"https://api.github.com/users/Gamouche/received_events","type":"User","site_admin":false},"body":"builtin history \r\n/*\r\n**\tWithout option : print the history list with an index.\r\n**\t--clear : empty the history.\r\n**\t--save : save the history into a file.\r\n**\thistory n : print the last 'n' elements.\r\n**\t-d n : deletes the element with the index 'n'.\r\n*/\r\n\r\ntestez et approuvez si ca vous va :)","created_at":"2018-09-27T16:21:03Z","updated_at":"2018-09-27T17:22:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"904bba37670e21b28a821feca5c7caa4050bde24","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false},{"login":"SebastienBruckert","id":25817270,"node_id":"MDQ6VXNlcjI1ODE3Mjcw","avatar_url":"https://avatars2.githubusercontent.com/u/25817270?v=4","gravatar_id":"","url":"https://api.github.com/users/SebastienBruckert","html_url":"https://github.com/SebastienBruckert","followers_url":"https://api.github.com/users/SebastienBruckert/followers","following_url":"https://api.github.com/users/SebastienBruckert/following{/other_user}","gists_url":"https://api.github.com/users/SebastienBruckert/gists{/gist_id}","starred_url":"https://api.github.com/users/SebastienBruckert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SebastienBruckert/subscriptions","organizations_url":"https://api.github.com/users/SebastienBruckert/orgs","repos_url":"https://api.github.com/users/SebastienBruckert/repos","events_url":"https://api.github.com/users/SebastienBruckert/events{/privacy}","received_events_url":"https://api.github.com/users/SebastienBruckert/received_events","type":"User","site_admin":false},{"login":"cgaspart","id":33488209,"node_id":"MDQ6VXNlcjMzNDg4MjA5","avatar_url":"https://avatars2.githubusercontent.com/u/33488209?v=4","gravatar_id":"","url":"https://api.github.com/users/cgaspart","html_url":"https://github.com/cgaspart","followers_url":"https://api.github.com/users/cgaspart/followers","following_url":"https://api.github.com/users/cgaspart/following{/other_user}","gists_url":"https://api.github.com/users/cgaspart/gists{/gist_id}","starred_url":"https://api.github.com/users/cgaspart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgaspart/subscriptions","organizations_url":"https://api.github.com/users/cgaspart/orgs","repos_url":"https://api.github.com/users/cgaspart/repos","events_url":"https://api.github.com/users/cgaspart/events{/privacy}","received_events_url":"https://api.github.com/users/cgaspart/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jjaniec/21sh/pulls/30/commits","review_comments_url":"https://api.github.com/repos/jjaniec/21sh/pulls/30/comments","review_comment_url":"https://api.github.com/repos/jjaniec/21sh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jjaniec/21sh/issues/30/comments","statuses_url":"https://api.github.com/repos/jjaniec/21sh/statuses/14cef8b4db49840df99eedc366b88bcd265b1cc4","head":{"label":"jjaniec:builtin_history","ref":"builtin_history","sha":"14cef8b4db49840df99eedc366b88bcd265b1cc4","user":{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false},"repo":{"id":133548605,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM1NDg2MDU=","name":"21sh","full_name":"jjaniec/21sh","private":false,"owner":{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jjaniec/21sh","description":"Our own shell - wip","fork":false,"url":"https://api.github.com/repos/jjaniec/21sh","forks_url":"https://api.github.com/repos/jjaniec/21sh/forks","keys_url":"https://api.github.com/repos/jjaniec/21sh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jjaniec/21sh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jjaniec/21sh/teams","hooks_url":"https://api.github.com/repos/jjaniec/21sh/hooks","issue_events_url":"https://api.github.com/repos/jjaniec/21sh/issues/events{/number}","events_url":"https://api.github.com/repos/jjaniec/21sh/events","assignees_url":"https://api.github.com/repos/jjaniec/21sh/assignees{/user}","branches_url":"https://api.github.com/repos/jjaniec/21sh/branches{/branch}","tags_url":"https://api.github.com/repos/jjaniec/21sh/tags","blobs_url":"https://api.github.com/repos/jjaniec/21sh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jjaniec/21sh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jjaniec/21sh/git/refs{/sha}","trees_url":"https://api.github.com/repos/jjaniec/21sh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jjaniec/21sh/statuses/{sha}","languages_url":"https://api.github.com/repos/jjaniec/21sh/languages","stargazers_url":"https://api.github.com/repos/jjaniec/21sh/stargazers","contributors_url":"https://api.github.com/repos/jjaniec/21sh/contributors","subscribers_url":"https://api.github.com/repos/jjaniec/21sh/subscribers","subscription_url":"https://api.github.com/repos/jjaniec/21sh/subscription","commits_url":"https://api.github.com/repos/jjaniec/21sh/commits{/sha}","git_commits_url":"https://api.github.com/repos/jjaniec/21sh/git/commits{/sha}","comments_url":"https://api.github.com/repos/jjaniec/21sh/comments{/number}","issue_comment_url":"https://api.github.com/repos/jjaniec/21sh/issues/comments{/number}","contents_url":"https://api.github.com/repos/jjaniec/21sh/contents/{+path}","compare_url":"https://api.github.com/repos/jjaniec/21sh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jjaniec/21sh/merges","archive_url":"https://api.github.com/repos/jjaniec/21sh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jjaniec/21sh/downloads","issues_url":"https://api.github.com/repos/jjaniec/21sh/issues{/number}","pulls_url":"https://api.github.com/repos/jjaniec/21sh/pulls{/number}","milestones_url":"https://api.github.com/repos/jjaniec/21sh/milestones{/number}","notifications_url":"https://api.github.com/repos/jjaniec/21sh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jjaniec/21sh/labels{/name}","releases_url":"https://api.github.com/repos/jjaniec/21sh/releases{/id}","deployments_url":"https://api.github.com/repos/jjaniec/21sh/deployments","created_at":"2018-05-15T17:10:47Z","updated_at":"2018-09-27T14:52:46Z","pushed_at":"2018-09-27T17:20:30Z","git_url":"git://github.com/jjaniec/21sh.git","ssh_url":"git@github.com:jjaniec/21sh.git","clone_url":"https://github.com/jjaniec/21sh.git","svn_url":"https://github.com/jjaniec/21sh","homepage":"","size":2070,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":1,"open_issues":3,"watchers":3,"default_branch":"develop"}},"base":{"label":"jjaniec:develop","ref":"develop","sha":"7b59b5f950c73d06d40998bce77965be9cb935d4","user":{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false},"repo":{"id":133548605,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM1NDg2MDU=","name":"21sh","full_name":"jjaniec/21sh","private":false,"owner":{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jjaniec/21sh","description":"Our own shell - wip","fork":false,"url":"https://api.github.com/repos/jjaniec/21sh","forks_url":"https://api.github.com/repos/jjaniec/21sh/forks","keys_url":"https://api.github.com/repos/jjaniec/21sh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jjaniec/21sh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jjaniec/21sh/teams","hooks_url":"https://api.github.com/repos/jjaniec/21sh/hooks","issue_events_url":"https://api.github.com/repos/jjaniec/21sh/issues/events{/number}","events_url":"https://api.github.com/repos/jjaniec/21sh/events","assignees_url":"https://api.github.com/repos/jjaniec/21sh/assignees{/user}","branches_url":"https://api.github.com/repos/jjaniec/21sh/branches{/branch}","tags_url":"https://api.github.com/repos/jjaniec/21sh/tags","blobs_url":"https://api.github.com/repos/jjaniec/21sh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jjaniec/21sh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jjaniec/21sh/git/refs{/sha}","trees_url":"https://api.github.com/repos/jjaniec/21sh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jjaniec/21sh/statuses/{sha}","languages_url":"https://api.github.com/repos/jjaniec/21sh/languages","stargazers_url":"https://api.github.com/repos/jjaniec/21sh/stargazers","contributors_url":"https://api.github.com/repos/jjaniec/21sh/contributors","subscribers_url":"https://api.github.com/repos/jjaniec/21sh/subscribers","subscription_url":"https://api.github.com/repos/jjaniec/21sh/subscription","commits_url":"https://api.github.com/repos/jjaniec/21sh/commits{/sha}","git_commits_url":"https://api.github.com/repos/jjaniec/21sh/git/commits{/sha}","comments_url":"https://api.github.com/repos/jjaniec/21sh/comments{/number}","issue_comment_url":"https://api.github.com/repos/jjaniec/21sh/issues/comments{/number}","contents_url":"https://api.github.com/repos/jjaniec/21sh/contents/{+path}","compare_url":"https://api.github.com/repos/jjaniec/21sh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jjaniec/21sh/merges","archive_url":"https://api.github.com/repos/jjaniec/21sh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jjaniec/21sh/downloads","issues_url":"https://api.github.com/repos/jjaniec/21sh/issues{/number}","pulls_url":"https://api.github.com/repos/jjaniec/21sh/pulls{/number}","milestones_url":"https://api.github.com/repos/jjaniec/21sh/milestones{/number}","notifications_url":"https://api.github.com/repos/jjaniec/21sh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jjaniec/21sh/labels{/name}","releases_url":"https://api.github.com/repos/jjaniec/21sh/releases{/id}","deployments_url":"https://api.github.com/repos/jjaniec/21sh/deployments","created_at":"2018-05-15T17:10:47Z","updated_at":"2018-09-27T14:52:46Z","pushed_at":"2018-09-27T17:20:30Z","git_url":"git://github.com/jjaniec/21sh.git","ssh_url":"git@github.com:jjaniec/21sh.git","clone_url":"https://github.com/jjaniec/21sh.git","svn_url":"https://github.com/jjaniec/21sh","homepage":"","size":2070,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":1,"open_issues":3,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/30"},"html":{"href":"https://github.com/jjaniec/21sh/pull/30"},"issue":{"href":"https://api.github.com/repos/jjaniec/21sh/issues/30"},"comments":{"href":"https://api.github.com/repos/jjaniec/21sh/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/jjaniec/21sh/statuses/14cef8b4db49840df99eedc366b88bcd265b1cc4"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"sonarcloud"}}