{"action":"created","comment":{"url":"https://api.github.com/repos/shuhrat/npm-inject/pulls/comments/91567755","pull_request_review_id":12077705,"id":91567755,"diff_hunk":"@@ -38,6 +39,24 @@ fi\n \n echo \"==> Running npm wrapper script with node_modules caching\"\n \n+#Если существует переменная времени жизни кэша, то ищем просроченные кэши\n+#Время жизни указывается в днях в переменно $NPM_CACHE_EXPIRE_DAYS\n+if [[ -n ${NPM_CACHE_EXPIRE_DAYS} ]]; then\n+  echo \"Looking for expired cache\"\n+\n+  CACHE_DIR=\"$HOME/.cache/npm-inject\"\n+  EXPIRED_DIRS=$(find $CACHE_DIR -maxdepth 1 -mtime +$NPM_CACHE_EXPIRE_DAYS ! -path $CACHE_DIR -type d)","path":"npm","position":18,"original_position":18,"commit_id":"97421d62fdbd081a39f4b3b9a5fa24677c52fb26","original_commit_id":"97421d62fdbd081a39f4b3b9a5fa24677c52fb26","user":{"login":"ket4yii","id":8127702,"avatar_url":"https://avatars.githubusercontent.com/u/8127702?v=3","gravatar_id":"","url":"https://api.github.com/users/ket4yii","html_url":"https://github.com/ket4yii","followers_url":"https://api.github.com/users/ket4yii/followers","following_url":"https://api.github.com/users/ket4yii/following{/other_user}","gists_url":"https://api.github.com/users/ket4yii/gists{/gist_id}","starred_url":"https://api.github.com/users/ket4yii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ket4yii/subscriptions","organizations_url":"https://api.github.com/users/ket4yii/orgs","repos_url":"https://api.github.com/users/ket4yii/repos","events_url":"https://api.github.com/users/ket4yii/events{/privacy}","received_events_url":"https://api.github.com/users/ket4yii/received_events","type":"User","site_admin":false},"body":"@shuhrat Тогда, если каталог кэша(CACHE_DIR) будет \"просрочен\", то удалится и он, а вместе с ним и все кэши. Или я ошибаюсь?","created_at":"2016-12-08T17:49:40Z","updated_at":"2016-12-08T17:49:40Z","html_url":"https://github.com/shuhrat/npm-inject/pull/1#discussion_r91567755","pull_request_url":"https://api.github.com/repos/shuhrat/npm-inject/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/shuhrat/npm-inject/pulls/comments/91567755"},"html":{"href":"https://github.com/shuhrat/npm-inject/pull/1#discussion_r91567755"},"pull_request":{"href":"https://api.github.com/repos/shuhrat/npm-inject/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/shuhrat/npm-inject/pulls/1","id":95205840,"html_url":"https://github.com/shuhrat/npm-inject/pull/1","diff_url":"https://github.com/shuhrat/npm-inject/pull/1.diff","patch_url":"https://github.com/shuhrat/npm-inject/pull/1.patch","issue_url":"https://api.github.com/repos/shuhrat/npm-inject/issues/1","number":1,"state":"open","locked":false,"title":"Add cache expire feature","user":{"login":"ket4yii","id":8127702,"avatar_url":"https://avatars.githubusercontent.com/u/8127702?v=3","gravatar_id":"","url":"https://api.github.com/users/ket4yii","html_url":"https://github.com/ket4yii","followers_url":"https://api.github.com/users/ket4yii/followers","following_url":"https://api.github.com/users/ket4yii/following{/other_user}","gists_url":"https://api.github.com/users/ket4yii/gists{/gist_id}","starred_url":"https://api.github.com/users/ket4yii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ket4yii/subscriptions","organizations_url":"https://api.github.com/users/ket4yii/orgs","repos_url":"https://api.github.com/users/ket4yii/repos","events_url":"https://api.github.com/users/ket4yii/events{/privacy}","received_events_url":"https://api.github.com/users/ket4yii/received_events","type":"User","site_admin":false},"body":"Введена проверка кэшей по времени жизни. Включается с помощью перменной окружения NPM_CACHE_EXPIRE_TIME. Время жизни кэша указывается в днях.","created_at":"2016-11-24T16:29:06Z","updated_at":"2016-12-08T17:49:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a2f2250a578ea302e628d8c3c1efb4ba1780c67","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/shuhrat/npm-inject/pulls/1/commits","review_comments_url":"https://api.github.com/repos/shuhrat/npm-inject/pulls/1/comments","review_comment_url":"https://api.github.com/repos/shuhrat/npm-inject/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shuhrat/npm-inject/issues/1/comments","statuses_url":"https://api.github.com/repos/shuhrat/npm-inject/statuses/97421d62fdbd081a39f4b3b9a5fa24677c52fb26","head":{"label":"ket4yii:feature/cache-expire","ref":"feature/cache-expire","sha":"97421d62fdbd081a39f4b3b9a5fa24677c52fb26","user":{"login":"ket4yii","id":8127702,"avatar_url":"https://avatars.githubusercontent.com/u/8127702?v=3","gravatar_id":"","url":"https://api.github.com/users/ket4yii","html_url":"https://github.com/ket4yii","followers_url":"https://api.github.com/users/ket4yii/followers","following_url":"https://api.github.com/users/ket4yii/following{/other_user}","gists_url":"https://api.github.com/users/ket4yii/gists{/gist_id}","starred_url":"https://api.github.com/users/ket4yii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ket4yii/subscriptions","organizations_url":"https://api.github.com/users/ket4yii/orgs","repos_url":"https://api.github.com/users/ket4yii/repos","events_url":"https://api.github.com/users/ket4yii/events{/privacy}","received_events_url":"https://api.github.com/users/ket4yii/received_events","type":"User","site_admin":false},"repo":{"id":74675574,"name":"npm-inject","full_name":"ket4yii/npm-inject","owner":{"login":"ket4yii","id":8127702,"avatar_url":"https://avatars.githubusercontent.com/u/8127702?v=3","gravatar_id":"","url":"https://api.github.com/users/ket4yii","html_url":"https://github.com/ket4yii","followers_url":"https://api.github.com/users/ket4yii/followers","following_url":"https://api.github.com/users/ket4yii/following{/other_user}","gists_url":"https://api.github.com/users/ket4yii/gists{/gist_id}","starred_url":"https://api.github.com/users/ket4yii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ket4yii/subscriptions","organizations_url":"https://api.github.com/users/ket4yii/orgs","repos_url":"https://api.github.com/users/ket4yii/repos","events_url":"https://api.github.com/users/ket4yii/events{/privacy}","received_events_url":"https://api.github.com/users/ket4yii/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ket4yii/npm-inject","description":" Npm inject для кеширования папки node_modules","fork":true,"url":"https://api.github.com/repos/ket4yii/npm-inject","forks_url":"https://api.github.com/repos/ket4yii/npm-inject/forks","keys_url":"https://api.github.com/repos/ket4yii/npm-inject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ket4yii/npm-inject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ket4yii/npm-inject/teams","hooks_url":"https://api.github.com/repos/ket4yii/npm-inject/hooks","issue_events_url":"https://api.github.com/repos/ket4yii/npm-inject/issues/events{/number}","events_url":"https://api.github.com/repos/ket4yii/npm-inject/events","assignees_url":"https://api.github.com/repos/ket4yii/npm-inject/assignees{/user}","branches_url":"https://api.github.com/repos/ket4yii/npm-inject/branches{/branch}","tags_url":"https://api.github.com/repos/ket4yii/npm-inject/tags","blobs_url":"https://api.github.com/repos/ket4yii/npm-inject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ket4yii/npm-inject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ket4yii/npm-inject/git/refs{/sha}","trees_url":"https://api.github.com/repos/ket4yii/npm-inject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ket4yii/npm-inject/statuses/{sha}","languages_url":"https://api.github.com/repos/ket4yii/npm-inject/languages","stargazers_url":"https://api.github.com/repos/ket4yii/npm-inject/stargazers","contributors_url":"https://api.github.com/repos/ket4yii/npm-inject/contributors","subscribers_url":"https://api.github.com/repos/ket4yii/npm-inject/subscribers","subscription_url":"https://api.github.com/repos/ket4yii/npm-inject/subscription","commits_url":"https://api.github.com/repos/ket4yii/npm-inject/commits{/sha}","git_commits_url":"https://api.github.com/repos/ket4yii/npm-inject/git/commits{/sha}","comments_url":"https://api.github.com/repos/ket4yii/npm-inject/comments{/number}","issue_comment_url":"https://api.github.com/repos/ket4yii/npm-inject/issues/comments{/number}","contents_url":"https://api.github.com/repos/ket4yii/npm-inject/contents/{+path}","compare_url":"https://api.github.com/repos/ket4yii/npm-inject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ket4yii/npm-inject/merges","archive_url":"https://api.github.com/repos/ket4yii/npm-inject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ket4yii/npm-inject/downloads","issues_url":"https://api.github.com/repos/ket4yii/npm-inject/issues{/number}","pulls_url":"https://api.github.com/repos/ket4yii/npm-inject/pulls{/number}","milestones_url":"https://api.github.com/repos/ket4yii/npm-inject/milestones{/number}","notifications_url":"https://api.github.com/repos/ket4yii/npm-inject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ket4yii/npm-inject/labels{/name}","releases_url":"https://api.github.com/repos/ket4yii/npm-inject/releases{/id}","deployments_url":"https://api.github.com/repos/ket4yii/npm-inject/deployments","created_at":"2016-11-24T13:26:24Z","updated_at":"2016-11-24T13:26:25Z","pushed_at":"2016-12-07T14:48:02Z","git_url":"git://github.com/ket4yii/npm-inject.git","ssh_url":"git@github.com:ket4yii/npm-inject.git","clone_url":"https://github.com/ket4yii/npm-inject.git","svn_url":"https://github.com/ket4yii/npm-inject","homepage":null,"size":4,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"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":"master"}},"base":{"label":"shuhrat:master","ref":"master","sha":"66826dfc3c3a53f067401ddb1a95dd71b22c4033","user":{"login":"shuhrat","id":104213,"avatar_url":"https://avatars.githubusercontent.com/u/104213?v=3","gravatar_id":"","url":"https://api.github.com/users/shuhrat","html_url":"https://github.com/shuhrat","followers_url":"https://api.github.com/users/shuhrat/followers","following_url":"https://api.github.com/users/shuhrat/following{/other_user}","gists_url":"https://api.github.com/users/shuhrat/gists{/gist_id}","starred_url":"https://api.github.com/users/shuhrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shuhrat/subscriptions","organizations_url":"https://api.github.com/users/shuhrat/orgs","repos_url":"https://api.github.com/users/shuhrat/repos","events_url":"https://api.github.com/users/shuhrat/events{/privacy}","received_events_url":"https://api.github.com/users/shuhrat/received_events","type":"User","site_admin":false},"repo":{"id":74670759,"name":"npm-inject","full_name":"shuhrat/npm-inject","owner":{"login":"shuhrat","id":104213,"avatar_url":"https://avatars.githubusercontent.com/u/104213?v=3","gravatar_id":"","url":"https://api.github.com/users/shuhrat","html_url":"https://github.com/shuhrat","followers_url":"https://api.github.com/users/shuhrat/followers","following_url":"https://api.github.com/users/shuhrat/following{/other_user}","gists_url":"https://api.github.com/users/shuhrat/gists{/gist_id}","starred_url":"https://api.github.com/users/shuhrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shuhrat/subscriptions","organizations_url":"https://api.github.com/users/shuhrat/orgs","repos_url":"https://api.github.com/users/shuhrat/repos","events_url":"https://api.github.com/users/shuhrat/events{/privacy}","received_events_url":"https://api.github.com/users/shuhrat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shuhrat/npm-inject","description":" Npm inject для кеширования папки node_modules","fork":false,"url":"https://api.github.com/repos/shuhrat/npm-inject","forks_url":"https://api.github.com/repos/shuhrat/npm-inject/forks","keys_url":"https://api.github.com/repos/shuhrat/npm-inject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shuhrat/npm-inject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shuhrat/npm-inject/teams","hooks_url":"https://api.github.com/repos/shuhrat/npm-inject/hooks","issue_events_url":"https://api.github.com/repos/shuhrat/npm-inject/issues/events{/number}","events_url":"https://api.github.com/repos/shuhrat/npm-inject/events","assignees_url":"https://api.github.com/repos/shuhrat/npm-inject/assignees{/user}","branches_url":"https://api.github.com/repos/shuhrat/npm-inject/branches{/branch}","tags_url":"https://api.github.com/repos/shuhrat/npm-inject/tags","blobs_url":"https://api.github.com/repos/shuhrat/npm-inject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shuhrat/npm-inject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shuhrat/npm-inject/git/refs{/sha}","trees_url":"https://api.github.com/repos/shuhrat/npm-inject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shuhrat/npm-inject/statuses/{sha}","languages_url":"https://api.github.com/repos/shuhrat/npm-inject/languages","stargazers_url":"https://api.github.com/repos/shuhrat/npm-inject/stargazers","contributors_url":"https://api.github.com/repos/shuhrat/npm-inject/contributors","subscribers_url":"https://api.github.com/repos/shuhrat/npm-inject/subscribers","subscription_url":"https://api.github.com/repos/shuhrat/npm-inject/subscription","commits_url":"https://api.github.com/repos/shuhrat/npm-inject/commits{/sha}","git_commits_url":"https://api.github.com/repos/shuhrat/npm-inject/git/commits{/sha}","comments_url":"https://api.github.com/repos/shuhrat/npm-inject/comments{/number}","issue_comment_url":"https://api.github.com/repos/shuhrat/npm-inject/issues/comments{/number}","contents_url":"https://api.github.com/repos/shuhrat/npm-inject/contents/{+path}","compare_url":"https://api.github.com/repos/shuhrat/npm-inject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shuhrat/npm-inject/merges","archive_url":"https://api.github.com/repos/shuhrat/npm-inject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shuhrat/npm-inject/downloads","issues_url":"https://api.github.com/repos/shuhrat/npm-inject/issues{/number}","pulls_url":"https://api.github.com/repos/shuhrat/npm-inject/pulls{/number}","milestones_url":"https://api.github.com/repos/shuhrat/npm-inject/milestones{/number}","notifications_url":"https://api.github.com/repos/shuhrat/npm-inject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shuhrat/npm-inject/labels{/name}","releases_url":"https://api.github.com/repos/shuhrat/npm-inject/releases{/id}","deployments_url":"https://api.github.com/repos/shuhrat/npm-inject/deployments","created_at":"2016-11-24T12:21:18Z","updated_at":"2016-11-24T13:26:21Z","pushed_at":"2016-12-07T14:48:02Z","git_url":"git://github.com/shuhrat/npm-inject.git","ssh_url":"git@github.com:shuhrat/npm-inject.git","clone_url":"https://github.com/shuhrat/npm-inject.git","svn_url":"https://github.com/shuhrat/npm-inject","homepage":null,"size":2,"stargazers_count":4,"watchers_count":4,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shuhrat/npm-inject/pulls/1"},"html":{"href":"https://github.com/shuhrat/npm-inject/pull/1"},"issue":{"href":"https://api.github.com/repos/shuhrat/npm-inject/issues/1"},"comments":{"href":"https://api.github.com/repos/shuhrat/npm-inject/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/shuhrat/npm-inject/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/shuhrat/npm-inject/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shuhrat/npm-inject/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/shuhrat/npm-inject/statuses/97421d62fdbd081a39f4b3b9a5fa24677c52fb26"}}}}
{"actor":{"display_login":"ket4yii"}}