{"action":"created","comment":{"url":"https://api.github.com/repos/hhru/hh-webutils/pulls/comments/185817520","pull_request_review_id":117283694,"id":185817520,"diff_hunk":"@@ -0,0 +1,41 @@\n+# coding=utf-8\n+\n+import datetime\n+import unittest\n+from freezegun import freeze_time\n+\n+from hhwebutils.minutes_ago_to_human_readable import convert_to_readable\n+\n+\n+def get_day_minutes_since_start():\n+    now = datetime.datetime.now()\n+    today_beginning = datetime.datetime.combine(datetime.date.today(), datetime.time())\n+    diff = now - today_beginning\n+    return diff.seconds / 60\n+\n+\n+def check(self, diff, time_code, days_ago):","path":"hhwebutils_tests/test_minutes_ago_to_human_readable.py","position":null,"original_position":17,"commit_id":"8a14e9ef973f5e5bb116bff0e13eb45d33fd855f","original_commit_id":"58008f05db516d757dae3a8b330004fdafca910e","user":{"login":"ilyashubin","id":6043481,"avatar_url":"https://avatars1.githubusercontent.com/u/6043481?v=4","gravatar_id":"","url":"https://api.github.com/users/ilyashubin","html_url":"https://github.com/ilyashubin","followers_url":"https://api.github.com/users/ilyashubin/followers","following_url":"https://api.github.com/users/ilyashubin/following{/other_user}","gists_url":"https://api.github.com/users/ilyashubin/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyashubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyashubin/subscriptions","organizations_url":"https://api.github.com/users/ilyashubin/orgs","repos_url":"https://api.github.com/users/ilyashubin/repos","events_url":"https://api.github.com/users/ilyashubin/events{/privacy}","received_events_url":"https://api.github.com/users/ilyashubin/received_events","type":"User","site_admin":false},"body":"Done 👍 ","created_at":"2018-05-03T14:28:42Z","updated_at":"2018-05-03T14:28:42Z","html_url":"https://github.com/hhru/hh-webutils/pull/30#discussion_r185817520","pull_request_url":"https://api.github.com/repos/hhru/hh-webutils/pulls/30","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/hhru/hh-webutils/pulls/comments/185817520"},"html":{"href":"https://github.com/hhru/hh-webutils/pull/30#discussion_r185817520"},"pull_request":{"href":"https://api.github.com/repos/hhru/hh-webutils/pulls/30"}},"in_reply_to_id":185798043},"pull_request":{"url":"https://api.github.com/repos/hhru/hh-webutils/pulls/30","id":185685440,"html_url":"https://github.com/hhru/hh-webutils/pull/30","diff_url":"https://github.com/hhru/hh-webutils/pull/30.diff","patch_url":"https://github.com/hhru/hh-webutils/pull/30.patch","issue_url":"https://api.github.com/repos/hhru/hh-webutils/issues/30","number":30,"state":"open","locked":false,"title":"HH-78568 Добавлен модуль перевода из минут назад в человекочитаемую форму","user":{"login":"ilyashubin","id":6043481,"avatar_url":"https://avatars1.githubusercontent.com/u/6043481?v=4","gravatar_id":"","url":"https://api.github.com/users/ilyashubin","html_url":"https://github.com/ilyashubin","followers_url":"https://api.github.com/users/ilyashubin/followers","following_url":"https://api.github.com/users/ilyashubin/following{/other_user}","gists_url":"https://api.github.com/users/ilyashubin/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyashubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyashubin/subscriptions","organizations_url":"https://api.github.com/users/ilyashubin/orgs","repos_url":"https://api.github.com/users/ilyashubin/repos","events_url":"https://api.github.com/users/ilyashubin/events{/privacy}","received_events_url":"https://api.github.com/users/ilyashubin/received_events","type":"User","site_admin":false},"body":"Описание форматов времени: https://jira.hh.ru/browse/PORTFOLIO-4530\r\n\r\nБыла задача переводить количество минут, прошедшее от текущего момента в человекочитаемый вид формата:\r\n\r\n```\r\nсейчас онлайн\r\nбыл сегодня\r\nбыл вчера\r\nбыл 2(-7) дней назад\r\nбыл больше недели назад\r\nбыл более месяца назад\r\n```\r\n\r\nДобавил функцию, возвращающую код формата (используется в переводах) и количество дней, прошедшее с текущего момента времени (используется для случая `2(-7) дней назад`).\r\n\r\nВыношу сюда, т.к. будет использоваться в xhh и hhmobile","created_at":"2018-05-03T11:21:24Z","updated_at":"2018-05-03T14:28:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c82e2f6488771918165f4591392c66c1f0a57dff","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hhru/hh-webutils/pulls/30/commits","review_comments_url":"https://api.github.com/repos/hhru/hh-webutils/pulls/30/comments","review_comment_url":"https://api.github.com/repos/hhru/hh-webutils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hhru/hh-webutils/issues/30/comments","statuses_url":"https://api.github.com/repos/hhru/hh-webutils/statuses/8a14e9ef973f5e5bb116bff0e13eb45d33fd855f","head":{"label":"hhru:HH-78568","ref":"HH-78568","sha":"8a14e9ef973f5e5bb116bff0e13eb45d33fd855f","user":{"login":"hhru","id":152753,"avatar_url":"https://avatars2.githubusercontent.com/u/152753?v=4","gravatar_id":"","url":"https://api.github.com/users/hhru","html_url":"https://github.com/hhru","followers_url":"https://api.github.com/users/hhru/followers","following_url":"https://api.github.com/users/hhru/following{/other_user}","gists_url":"https://api.github.com/users/hhru/gists{/gist_id}","starred_url":"https://api.github.com/users/hhru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhru/subscriptions","organizations_url":"https://api.github.com/users/hhru/orgs","repos_url":"https://api.github.com/users/hhru/repos","events_url":"https://api.github.com/users/hhru/events{/privacy}","received_events_url":"https://api.github.com/users/hhru/received_events","type":"Organization","site_admin":false},"repo":{"id":12426796,"name":"hh-webutils","full_name":"hhru/hh-webutils","owner":{"login":"hhru","id":152753,"avatar_url":"https://avatars2.githubusercontent.com/u/152753?v=4","gravatar_id":"","url":"https://api.github.com/users/hhru","html_url":"https://github.com/hhru","followers_url":"https://api.github.com/users/hhru/followers","following_url":"https://api.github.com/users/hhru/following{/other_user}","gists_url":"https://api.github.com/users/hhru/gists{/gist_id}","starred_url":"https://api.github.com/users/hhru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhru/subscriptions","organizations_url":"https://api.github.com/users/hhru/orgs","repos_url":"https://api.github.com/users/hhru/repos","events_url":"https://api.github.com/users/hhru/events{/privacy}","received_events_url":"https://api.github.com/users/hhru/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hhru/hh-webutils","description":"hh.ru python common web utility library","fork":false,"url":"https://api.github.com/repos/hhru/hh-webutils","forks_url":"https://api.github.com/repos/hhru/hh-webutils/forks","keys_url":"https://api.github.com/repos/hhru/hh-webutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hhru/hh-webutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hhru/hh-webutils/teams","hooks_url":"https://api.github.com/repos/hhru/hh-webutils/hooks","issue_events_url":"https://api.github.com/repos/hhru/hh-webutils/issues/events{/number}","events_url":"https://api.github.com/repos/hhru/hh-webutils/events","assignees_url":"https://api.github.com/repos/hhru/hh-webutils/assignees{/user}","branches_url":"https://api.github.com/repos/hhru/hh-webutils/branches{/branch}","tags_url":"https://api.github.com/repos/hhru/hh-webutils/tags","blobs_url":"https://api.github.com/repos/hhru/hh-webutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hhru/hh-webutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hhru/hh-webutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/hhru/hh-webutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hhru/hh-webutils/statuses/{sha}","languages_url":"https://api.github.com/repos/hhru/hh-webutils/languages","stargazers_url":"https://api.github.com/repos/hhru/hh-webutils/stargazers","contributors_url":"https://api.github.com/repos/hhru/hh-webutils/contributors","subscribers_url":"https://api.github.com/repos/hhru/hh-webutils/subscribers","subscription_url":"https://api.github.com/repos/hhru/hh-webutils/subscription","commits_url":"https://api.github.com/repos/hhru/hh-webutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/hhru/hh-webutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/hhru/hh-webutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/hhru/hh-webutils/issues/comments{/number}","contents_url":"https://api.github.com/repos/hhru/hh-webutils/contents/{+path}","compare_url":"https://api.github.com/repos/hhru/hh-webutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hhru/hh-webutils/merges","archive_url":"https://api.github.com/repos/hhru/hh-webutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hhru/hh-webutils/downloads","issues_url":"https://api.github.com/repos/hhru/hh-webutils/issues{/number}","pulls_url":"https://api.github.com/repos/hhru/hh-webutils/pulls{/number}","milestones_url":"https://api.github.com/repos/hhru/hh-webutils/milestones{/number}","notifications_url":"https://api.github.com/repos/hhru/hh-webutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hhru/hh-webutils/labels{/name}","releases_url":"https://api.github.com/repos/hhru/hh-webutils/releases{/id}","deployments_url":"https://api.github.com/repos/hhru/hh-webutils/deployments","created_at":"2013-08-28T06:52:45Z","updated_at":"2018-04-28T14:14:02Z","pushed_at":"2018-05-03T14:28:15Z","git_url":"git://github.com/hhru/hh-webutils.git","ssh_url":"git@github.com:hhru/hh-webutils.git","clone_url":"https://github.com/hhru/hh-webutils.git","svn_url":"https://github.com/hhru/hh-webutils","homepage":"","size":88,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"hhru:master","ref":"master","sha":"ddc4919a3c2bd410850fa8012a36584064da8808","user":{"login":"hhru","id":152753,"avatar_url":"https://avatars2.githubusercontent.com/u/152753?v=4","gravatar_id":"","url":"https://api.github.com/users/hhru","html_url":"https://github.com/hhru","followers_url":"https://api.github.com/users/hhru/followers","following_url":"https://api.github.com/users/hhru/following{/other_user}","gists_url":"https://api.github.com/users/hhru/gists{/gist_id}","starred_url":"https://api.github.com/users/hhru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhru/subscriptions","organizations_url":"https://api.github.com/users/hhru/orgs","repos_url":"https://api.github.com/users/hhru/repos","events_url":"https://api.github.com/users/hhru/events{/privacy}","received_events_url":"https://api.github.com/users/hhru/received_events","type":"Organization","site_admin":false},"repo":{"id":12426796,"name":"hh-webutils","full_name":"hhru/hh-webutils","owner":{"login":"hhru","id":152753,"avatar_url":"https://avatars2.githubusercontent.com/u/152753?v=4","gravatar_id":"","url":"https://api.github.com/users/hhru","html_url":"https://github.com/hhru","followers_url":"https://api.github.com/users/hhru/followers","following_url":"https://api.github.com/users/hhru/following{/other_user}","gists_url":"https://api.github.com/users/hhru/gists{/gist_id}","starred_url":"https://api.github.com/users/hhru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhru/subscriptions","organizations_url":"https://api.github.com/users/hhru/orgs","repos_url":"https://api.github.com/users/hhru/repos","events_url":"https://api.github.com/users/hhru/events{/privacy}","received_events_url":"https://api.github.com/users/hhru/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hhru/hh-webutils","description":"hh.ru python common web utility library","fork":false,"url":"https://api.github.com/repos/hhru/hh-webutils","forks_url":"https://api.github.com/repos/hhru/hh-webutils/forks","keys_url":"https://api.github.com/repos/hhru/hh-webutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hhru/hh-webutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hhru/hh-webutils/teams","hooks_url":"https://api.github.com/repos/hhru/hh-webutils/hooks","issue_events_url":"https://api.github.com/repos/hhru/hh-webutils/issues/events{/number}","events_url":"https://api.github.com/repos/hhru/hh-webutils/events","assignees_url":"https://api.github.com/repos/hhru/hh-webutils/assignees{/user}","branches_url":"https://api.github.com/repos/hhru/hh-webutils/branches{/branch}","tags_url":"https://api.github.com/repos/hhru/hh-webutils/tags","blobs_url":"https://api.github.com/repos/hhru/hh-webutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hhru/hh-webutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hhru/hh-webutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/hhru/hh-webutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hhru/hh-webutils/statuses/{sha}","languages_url":"https://api.github.com/repos/hhru/hh-webutils/languages","stargazers_url":"https://api.github.com/repos/hhru/hh-webutils/stargazers","contributors_url":"https://api.github.com/repos/hhru/hh-webutils/contributors","subscribers_url":"https://api.github.com/repos/hhru/hh-webutils/subscribers","subscription_url":"https://api.github.com/repos/hhru/hh-webutils/subscription","commits_url":"https://api.github.com/repos/hhru/hh-webutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/hhru/hh-webutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/hhru/hh-webutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/hhru/hh-webutils/issues/comments{/number}","contents_url":"https://api.github.com/repos/hhru/hh-webutils/contents/{+path}","compare_url":"https://api.github.com/repos/hhru/hh-webutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hhru/hh-webutils/merges","archive_url":"https://api.github.com/repos/hhru/hh-webutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hhru/hh-webutils/downloads","issues_url":"https://api.github.com/repos/hhru/hh-webutils/issues{/number}","pulls_url":"https://api.github.com/repos/hhru/hh-webutils/pulls{/number}","milestones_url":"https://api.github.com/repos/hhru/hh-webutils/milestones{/number}","notifications_url":"https://api.github.com/repos/hhru/hh-webutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hhru/hh-webutils/labels{/name}","releases_url":"https://api.github.com/repos/hhru/hh-webutils/releases{/id}","deployments_url":"https://api.github.com/repos/hhru/hh-webutils/deployments","created_at":"2013-08-28T06:52:45Z","updated_at":"2018-04-28T14:14:02Z","pushed_at":"2018-05-03T14:28:15Z","git_url":"git://github.com/hhru/hh-webutils.git","ssh_url":"git@github.com:hhru/hh-webutils.git","clone_url":"https://github.com/hhru/hh-webutils.git","svn_url":"https://github.com/hhru/hh-webutils","homepage":"","size":88,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hhru/hh-webutils/pulls/30"},"html":{"href":"https://github.com/hhru/hh-webutils/pull/30"},"issue":{"href":"https://api.github.com/repos/hhru/hh-webutils/issues/30"},"comments":{"href":"https://api.github.com/repos/hhru/hh-webutils/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/hhru/hh-webutils/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/hhru/hh-webutils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hhru/hh-webutils/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/hhru/hh-webutils/statuses/8a14e9ef973f5e5bb116bff0e13eb45d33fd855f"}},"author_association":"NONE"}}
{"actor":{"display_login":"ilyashubin"}}