{"action":"created","issue":{"url":"https://api.github.com/repos/IBM/audit-ci/issues/89","repository_url":"https://api.github.com/repos/IBM/audit-ci","labels_url":"https://api.github.com/repos/IBM/audit-ci/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/IBM/audit-ci/issues/89/comments","events_url":"https://api.github.com/repos/IBM/audit-ci/issues/89/events","html_url":"https://github.com/IBM/audit-ci/pull/89","id":452567191,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg1NDI4NjE2","number":89,"title":"Fix retry mechanism for other version of NPM error message.","user":{"login":"clement-escolano","id":11637509,"node_id":"MDQ6VXNlcjExNjM3NTA5","avatar_url":"https://avatars2.githubusercontent.com/u/11637509?v=4","gravatar_id":"","url":"https://api.github.com/users/clement-escolano","html_url":"https://github.com/clement-escolano","followers_url":"https://api.github.com/users/clement-escolano/followers","following_url":"https://api.github.com/users/clement-escolano/following{/other_user}","gists_url":"https://api.github.com/users/clement-escolano/gists{/gist_id}","starred_url":"https://api.github.com/users/clement-escolano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clement-escolano/subscriptions","organizations_url":"https://api.github.com/users/clement-escolano/orgs","repos_url":"https://api.github.com/users/clement-escolano/repos","events_url":"https://api.github.com/users/clement-escolano/events{/privacy}","received_events_url":"https://api.github.com/users/clement-escolano/received_events","type":"User","site_admin":false},"labels":[{"id":1126532035,"node_id":"MDU6TGFiZWwxMTI2NTMyMDM1","url":"https://api.github.com/repos/IBM/audit-ci/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-06-05T15:27:36Z","updated_at":"2019-06-05T16:18:10Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/IBM/audit-ci/pulls/89","html_url":"https://github.com/IBM/audit-ci/pull/89","diff_url":"https://github.com/IBM/audit-ci/pull/89.diff","patch_url":"https://github.com/IBM/audit-ci/pull/89.patch"},"body":"Hello!\r\nIn a previous comment https://github.com/IBM/audit-ci/issues/86#issuecomment-496798003 I talked about the retry mechanism that seemed broken for my project using NPM.\r\nAfter taking a quick look, I saw that the error message given by NPM is not the same for me:\r\n\r\n```\r\nnpm ERR! code ENOAUDIT\r\nnpm ERR! audit Your configured registry (https://registry.npmjs.org/) does not support audit requests, or the audit endpoint is temporarily unavailable.\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR!     /home/circleci/.npm/_logs/2019-05-20T12_16_22_839Z-debug.log\r\n```\r\n\r\nAt the end of the second line, `, or the audit endpoint is temporarily unavailable` is added compared to what is compared in the retry mechanism. To make it work for both cases, I just removed the dot at the end.\r\n\r\nWhat do you think?\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/IBM/audit-ci/issues/comments/499153440","html_url":"https://github.com/IBM/audit-ci/pull/89#issuecomment-499153440","issue_url":"https://api.github.com/repos/IBM/audit-ci/issues/89","id":499153440,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5OTE1MzQ0MA==","user":{"login":"clement-escolano","id":11637509,"node_id":"MDQ6VXNlcjExNjM3NTA5","avatar_url":"https://avatars2.githubusercontent.com/u/11637509?v=4","gravatar_id":"","url":"https://api.github.com/users/clement-escolano","html_url":"https://github.com/clement-escolano","followers_url":"https://api.github.com/users/clement-escolano/followers","following_url":"https://api.github.com/users/clement-escolano/following{/other_user}","gists_url":"https://api.github.com/users/clement-escolano/gists{/gist_id}","starred_url":"https://api.github.com/users/clement-escolano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clement-escolano/subscriptions","organizations_url":"https://api.github.com/users/clement-escolano/orgs","repos_url":"https://api.github.com/users/clement-escolano/repos","events_url":"https://api.github.com/users/clement-escolano/events{/privacy}","received_events_url":"https://api.github.com/users/clement-escolano/received_events","type":"User","site_admin":false},"created_at":"2019-06-05T16:18:10Z","updated_at":"2019-06-05T16:18:10Z","author_association":"NONE","body":"Thank you for pointing the exact error message. I looked for it in the repo but the GitHub search did not reveal anything 😄\r\nTo handle the `401` as well, the beginning of the message (`Your configured registry`) should be removed too because the NPM error starts with `Either your login credentials are invalid or your registry`. However, the 401 should appear only if the credentials are wrong or if the audit feature is not supported so I don't think it is important to handle this case.\r\nWhat do you think?"}}
{"actor":{"display_login":"clement-escolano"}}