mmarchini-oss / npm-otp-publish

Action to publish npm pacakges using One-Time Passwords
MIT License
10 stars 1 forks source link

Discord notifier #67

Closed Eomm closed 2 years ago

Eomm commented 3 years ago

Fix #66

I would really appreciate if you @mmarchini could give a check to this PR.

The only issue I didn't solve nicely was the discord-test.js last test that starves and not closes by itself

Here an output of the run ```$ node bin/npm-otp-publish.js --discord-channel-id 795049900911624203 --discord-token xxxx --npm-token foo --notifier discord [1609634053695] INFO (20888 on EOMM-XPS): creating notifier config: { "npmToken": "foo", "notifier": "discord", "templateContext": { "repo": {}, "version": { "name": "0.16.0" } }, "repo": {}, "version": { "name": "0.16.0" }, "octokit": null, "githubIssue": { "releaseTeam": "github-issue" }, "discord": { "token": "xxxxxxxx", "channelId": "795049900911624203" }, "timeout": 900000 } [1609634053831] INFO (20888 on EOMM-XPS): creating Discord notifier repo: {} [1609634054636] INFO (20888 on EOMM-XPS): timeout set timeout: 900000 [1609634054644] WARN (20888 on EOMM-XPS): "root" path "C:\Users\behem\workspace\npm-otp-publish\bin\public" must exist [1609634054719] INFO (20888 on EOMM-XPS): Server listening at http://127.0.0.1:3000 [1609634054720] INFO (20888 on EOMM-XPS): starting ngrok... [1609634056841] INFO (20888 on EOMM-XPS): starting ngrok... done ngrokUrl: "https://fb12be18d9a0.ngrok.io" [1609634056845] INFO (20888 on EOMM-XPS): notifying... [1609634058111] INFO (20888 on EOMM-XPS): notifying... done [1609634058578] INFO (20888 on EOMM-XPS): incoming request req: { "method": "GET", "url": "/", "hostname": "fb12be18d9a0.ngrok.io", "remoteAddress": "127.0.0.1", "remotePort": 51016 } reqId: 1 [1609634058646] INFO (20888 on EOMM-XPS): request completed res: { "statusCode": 200 } responseTime: 9.385800004005432 reqId: 1 [1609634070915] INFO (20888 on EOMM-XPS): incoming request req: { "method": "GET", "url": "/", "hostname": "fb12be18d9a0.ngrok.io", "remoteAddress": "127.0.0.1", "remotePort": 51022 } reqId: 2 [1609634070954] INFO (20888 on EOMM-XPS): request completed res: { "statusCode": 200 } responseTime: 4.613600015640259 reqId: 2 [1609634071765] INFO (20888 on EOMM-XPS): incoming request req: { "method": "GET", "url": "/favicon.ico", "hostname": "fb12be18d9a0.ngrok.io", "remoteAddress": "127.0.0.1", "remotePort": 51022 } reqId: 3 [1609634071843] INFO (20888 on EOMM-XPS): Route GET:/favicon.ico not found reqId: 3 [1609634071858] INFO (20888 on EOMM-XPS): request completed res: { "statusCode": 404 } responseTime: 15.768399953842163 reqId: 3 [1609634076513] INFO (20888 on EOMM-XPS): incoming request req: { "method": "POST", "url": "/", "hostname": "fb12be18d9a0.ngrok.io", "remoteAddress": "127.0.0.1", "remotePort": 51022 } reqId: 4 [1609634076551] ERROR (20888 on EOMM-XPS): otp received, attempting to publish [1609634076580] INFO (20888 on EOMM-XPS): pushing otp to publishing queue... 1 [1609634076581] INFO (20888 on EOMM-XPS): pushing otp to publishing queue... 2 [1609634076583] INFO (20888 on EOMM-XPS): trying to publish... 1 [1609634076610] INFO (20888 on EOMM-XPS): running npm publish [1609634076678] INFO (20888 on EOMM-XPS): pushing otp to publishing queue... done [1609634081883] ERROR (20888 on EOMM-XPS): attempt finished [1609634081884] ERROR (20888 on EOMM-XPS): publish failed [1609634081886] INFO (20888 on EOMM-XPS): request completed res: { "statusCode": 200 } responseTime: 5336.990299940109 reqId: 4 ```
Eomm commented 3 years ago

Friendly ping @mmarchini