{"action":"created","comment":{"url":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/comments/171423646","pull_request_review_id":100272793,"id":171423646,"diff_hunk":"@@ -1016,6 +1084,60 @@ int tm_set_payload(struct telem_ref *t_ref, char *payload)\n         return ret;\n }\n \n+\n+/**\n+ * Checks for id to have length = 32 characters\n+ * and hexadecimal characters only.\n+ *\n+ * @param id A pointer to string to be checked\n+ *\n+ * @return 0 on success, 1 on failure\n+ *\n+ */\n+static int validate_event_id(char *id)\n+{\n+       int rc = 0;\n+       const char alphab[] = EVENT_ID_ALPHAB;\n+\n+       // make sure is not null\n+       if(!id) {\n+               return 1;\n+       }\n+\n+       // 32 - 32 = 0\n+       if((rc = (int)(strlen(id) - EVENT_ID_LEN)) != 0) {","path":"src/telemetry.c","position":114,"original_position":114,"commit_id":"5897d9ab0bb6b4122c7ced3aa087cfd499090d82","original_commit_id":"5897d9ab0bb6b4122c7ced3aa087cfd499090d82","user":{"login":"phmccarty","id":1093718,"avatar_url":"https://avatars1.githubusercontent.com/u/1093718?v=4","gravatar_id":"","url":"https://api.github.com/users/phmccarty","html_url":"https://github.com/phmccarty","followers_url":"https://api.github.com/users/phmccarty/followers","following_url":"https://api.github.com/users/phmccarty/following{/other_user}","gists_url":"https://api.github.com/users/phmccarty/gists{/gist_id}","starred_url":"https://api.github.com/users/phmccarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phmccarty/subscriptions","organizations_url":"https://api.github.com/users/phmccarty/orgs","repos_url":"https://api.github.com/users/phmccarty/repos","events_url":"https://api.github.com/users/phmccarty/events{/privacy}","received_events_url":"https://api.github.com/users/phmccarty/received_events","type":"User","site_admin":false},"body":"style: space after `if`","created_at":"2018-02-28T23:45:45Z","updated_at":"2018-02-28T23:54:37Z","html_url":"https://github.com/clearlinux/telemetrics-client/pull/50#discussion_r171423646","pull_request_url":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/50","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/comments/171423646"},"html":{"href":"https://github.com/clearlinux/telemetrics-client/pull/50#discussion_r171423646"},"pull_request":{"href":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/50","id":171530403,"html_url":"https://github.com/clearlinux/telemetrics-client/pull/50","diff_url":"https://github.com/clearlinux/telemetrics-client/pull/50.diff","patch_url":"https://github.com/clearlinux/telemetrics-client/pull/50.patch","issue_url":"https://api.github.com/repos/clearlinux/telemetrics-client/issues/50","number":50,"state":"open","locked":false,"title":"Support for event id header","user":{"login":"alexjch","id":1099605,"avatar_url":"https://avatars1.githubusercontent.com/u/1099605?v=4","gravatar_id":"","url":"https://api.github.com/users/alexjch","html_url":"https://github.com/alexjch","followers_url":"https://api.github.com/users/alexjch/followers","following_url":"https://api.github.com/users/alexjch/following{/other_user}","gists_url":"https://api.github.com/users/alexjch/gists{/gist_id}","starred_url":"https://api.github.com/users/alexjch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexjch/subscriptions","organizations_url":"https://api.github.com/users/alexjch/orgs","repos_url":"https://api.github.com/users/alexjch/repos","events_url":"https://api.github.com/users/alexjch/events{/privacy}","received_events_url":"https://api.github.com/users/alexjch/received_events","type":"User","site_admin":false},"body":"This header allows to group records by event_id.","created_at":"2018-02-27T00:23:54Z","updated_at":"2018-02-28T23:54:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2419bac4de3488d0b5ede59cf58e60f812c306e0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/50/commits","review_comments_url":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/50/comments","review_comment_url":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clearlinux/telemetrics-client/issues/50/comments","statuses_url":"https://api.github.com/repos/clearlinux/telemetrics-client/statuses/5897d9ab0bb6b4122c7ced3aa087cfd499090d82","head":{"label":"alexjch:event_id","ref":"event_id","sha":"5897d9ab0bb6b4122c7ced3aa087cfd499090d82","user":{"login":"alexjch","id":1099605,"avatar_url":"https://avatars1.githubusercontent.com/u/1099605?v=4","gravatar_id":"","url":"https://api.github.com/users/alexjch","html_url":"https://github.com/alexjch","followers_url":"https://api.github.com/users/alexjch/followers","following_url":"https://api.github.com/users/alexjch/following{/other_user}","gists_url":"https://api.github.com/users/alexjch/gists{/gist_id}","starred_url":"https://api.github.com/users/alexjch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexjch/subscriptions","organizations_url":"https://api.github.com/users/alexjch/orgs","repos_url":"https://api.github.com/users/alexjch/repos","events_url":"https://api.github.com/users/alexjch/events{/privacy}","received_events_url":"https://api.github.com/users/alexjch/received_events","type":"User","site_admin":false},"repo":{"id":101326750,"name":"telemetrics-client","full_name":"alexjch/telemetrics-client","owner":{"login":"alexjch","id":1099605,"avatar_url":"https://avatars1.githubusercontent.com/u/1099605?v=4","gravatar_id":"","url":"https://api.github.com/users/alexjch","html_url":"https://github.com/alexjch","followers_url":"https://api.github.com/users/alexjch/followers","following_url":"https://api.github.com/users/alexjch/following{/other_user}","gists_url":"https://api.github.com/users/alexjch/gists{/gist_id}","starred_url":"https://api.github.com/users/alexjch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexjch/subscriptions","organizations_url":"https://api.github.com/users/alexjch/orgs","repos_url":"https://api.github.com/users/alexjch/repos","events_url":"https://api.github.com/users/alexjch/events{/privacy}","received_events_url":"https://api.github.com/users/alexjch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexjch/telemetrics-client","description":"Client telemetry components","fork":true,"url":"https://api.github.com/repos/alexjch/telemetrics-client","forks_url":"https://api.github.com/repos/alexjch/telemetrics-client/forks","keys_url":"https://api.github.com/repos/alexjch/telemetrics-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexjch/telemetrics-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexjch/telemetrics-client/teams","hooks_url":"https://api.github.com/repos/alexjch/telemetrics-client/hooks","issue_events_url":"https://api.github.com/repos/alexjch/telemetrics-client/issues/events{/number}","events_url":"https://api.github.com/repos/alexjch/telemetrics-client/events","assignees_url":"https://api.github.com/repos/alexjch/telemetrics-client/assignees{/user}","branches_url":"https://api.github.com/repos/alexjch/telemetrics-client/branches{/branch}","tags_url":"https://api.github.com/repos/alexjch/telemetrics-client/tags","blobs_url":"https://api.github.com/repos/alexjch/telemetrics-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexjch/telemetrics-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexjch/telemetrics-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexjch/telemetrics-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexjch/telemetrics-client/statuses/{sha}","languages_url":"https://api.github.com/repos/alexjch/telemetrics-client/languages","stargazers_url":"https://api.github.com/repos/alexjch/telemetrics-client/stargazers","contributors_url":"https://api.github.com/repos/alexjch/telemetrics-client/contributors","subscribers_url":"https://api.github.com/repos/alexjch/telemetrics-client/subscribers","subscription_url":"https://api.github.com/repos/alexjch/telemetrics-client/subscription","commits_url":"https://api.github.com/repos/alexjch/telemetrics-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexjch/telemetrics-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexjch/telemetrics-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexjch/telemetrics-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexjch/telemetrics-client/contents/{+path}","compare_url":"https://api.github.com/repos/alexjch/telemetrics-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexjch/telemetrics-client/merges","archive_url":"https://api.github.com/repos/alexjch/telemetrics-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexjch/telemetrics-client/downloads","issues_url":"https://api.github.com/repos/alexjch/telemetrics-client/issues{/number}","pulls_url":"https://api.github.com/repos/alexjch/telemetrics-client/pulls{/number}","milestones_url":"https://api.github.com/repos/alexjch/telemetrics-client/milestones{/number}","notifications_url":"https://api.github.com/repos/alexjch/telemetrics-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexjch/telemetrics-client/labels{/name}","releases_url":"https://api.github.com/repos/alexjch/telemetrics-client/releases{/id}","deployments_url":"https://api.github.com/repos/alexjch/telemetrics-client/deployments","created_at":"2017-08-24T18:41:26Z","updated_at":"2017-08-24T18:41:28Z","pushed_at":"2018-02-28T22:33:23Z","git_url":"git://github.com/alexjch/telemetrics-client.git","ssh_url":"git@github.com:alexjch/telemetrics-client.git","clone_url":"https://github.com/alexjch/telemetrics-client.git","svn_url":"https://github.com/alexjch/telemetrics-client","homepage":null,"size":330,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"clearlinux:master","ref":"master","sha":"da45642759913a6cc68a95701be0c327c0007c65","user":{"login":"clearlinux","id":12545216,"avatar_url":"https://avatars2.githubusercontent.com/u/12545216?v=4","gravatar_id":"","url":"https://api.github.com/users/clearlinux","html_url":"https://github.com/clearlinux","followers_url":"https://api.github.com/users/clearlinux/followers","following_url":"https://api.github.com/users/clearlinux/following{/other_user}","gists_url":"https://api.github.com/users/clearlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/clearlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearlinux/subscriptions","organizations_url":"https://api.github.com/users/clearlinux/orgs","repos_url":"https://api.github.com/users/clearlinux/repos","events_url":"https://api.github.com/users/clearlinux/events{/privacy}","received_events_url":"https://api.github.com/users/clearlinux/received_events","type":"Organization","site_admin":false},"repo":{"id":61900532,"name":"telemetrics-client","full_name":"clearlinux/telemetrics-client","owner":{"login":"clearlinux","id":12545216,"avatar_url":"https://avatars2.githubusercontent.com/u/12545216?v=4","gravatar_id":"","url":"https://api.github.com/users/clearlinux","html_url":"https://github.com/clearlinux","followers_url":"https://api.github.com/users/clearlinux/followers","following_url":"https://api.github.com/users/clearlinux/following{/other_user}","gists_url":"https://api.github.com/users/clearlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/clearlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearlinux/subscriptions","organizations_url":"https://api.github.com/users/clearlinux/orgs","repos_url":"https://api.github.com/users/clearlinux/repos","events_url":"https://api.github.com/users/clearlinux/events{/privacy}","received_events_url":"https://api.github.com/users/clearlinux/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clearlinux/telemetrics-client","description":"Client telemetry components","fork":false,"url":"https://api.github.com/repos/clearlinux/telemetrics-client","forks_url":"https://api.github.com/repos/clearlinux/telemetrics-client/forks","keys_url":"https://api.github.com/repos/clearlinux/telemetrics-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clearlinux/telemetrics-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clearlinux/telemetrics-client/teams","hooks_url":"https://api.github.com/repos/clearlinux/telemetrics-client/hooks","issue_events_url":"https://api.github.com/repos/clearlinux/telemetrics-client/issues/events{/number}","events_url":"https://api.github.com/repos/clearlinux/telemetrics-client/events","assignees_url":"https://api.github.com/repos/clearlinux/telemetrics-client/assignees{/user}","branches_url":"https://api.github.com/repos/clearlinux/telemetrics-client/branches{/branch}","tags_url":"https://api.github.com/repos/clearlinux/telemetrics-client/tags","blobs_url":"https://api.github.com/repos/clearlinux/telemetrics-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clearlinux/telemetrics-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clearlinux/telemetrics-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/clearlinux/telemetrics-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clearlinux/telemetrics-client/statuses/{sha}","languages_url":"https://api.github.com/repos/clearlinux/telemetrics-client/languages","stargazers_url":"https://api.github.com/repos/clearlinux/telemetrics-client/stargazers","contributors_url":"https://api.github.com/repos/clearlinux/telemetrics-client/contributors","subscribers_url":"https://api.github.com/repos/clearlinux/telemetrics-client/subscribers","subscription_url":"https://api.github.com/repos/clearlinux/telemetrics-client/subscription","commits_url":"https://api.github.com/repos/clearlinux/telemetrics-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/clearlinux/telemetrics-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/clearlinux/telemetrics-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/clearlinux/telemetrics-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/clearlinux/telemetrics-client/contents/{+path}","compare_url":"https://api.github.com/repos/clearlinux/telemetrics-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clearlinux/telemetrics-client/merges","archive_url":"https://api.github.com/repos/clearlinux/telemetrics-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clearlinux/telemetrics-client/downloads","issues_url":"https://api.github.com/repos/clearlinux/telemetrics-client/issues{/number}","pulls_url":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls{/number}","milestones_url":"https://api.github.com/repos/clearlinux/telemetrics-client/milestones{/number}","notifications_url":"https://api.github.com/repos/clearlinux/telemetrics-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clearlinux/telemetrics-client/labels{/name}","releases_url":"https://api.github.com/repos/clearlinux/telemetrics-client/releases{/id}","deployments_url":"https://api.github.com/repos/clearlinux/telemetrics-client/deployments","created_at":"2016-06-24T17:19:45Z","updated_at":"2018-01-23T11:09:39Z","pushed_at":"2018-02-28T22:33:25Z","git_url":"git://github.com/clearlinux/telemetrics-client.git","ssh_url":"git@github.com:clearlinux/telemetrics-client.git","clone_url":"https://github.com/clearlinux/telemetrics-client.git","svn_url":"https://github.com/clearlinux/telemetrics-client","homepage":null,"size":318,"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":10,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":10,"open_issues":9,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/50"},"html":{"href":"https://github.com/clearlinux/telemetrics-client/pull/50"},"issue":{"href":"https://api.github.com/repos/clearlinux/telemetrics-client/issues/50"},"comments":{"href":"https://api.github.com/repos/clearlinux/telemetrics-client/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clearlinux/telemetrics-client/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/clearlinux/telemetrics-client/statuses/5897d9ab0bb6b4122c7ced3aa087cfd499090d82"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"phmccarty"}}