peril icon indicating copy to clipboard operation
peril copied to clipboard

Note for updating Danger

Open orta opened this issue 5 years ago • 7 comments

This will require source code changes: https://github.com/danger/danger-js/pull/983

orta avatar Feb 03 '20 22:02 orta

I've taken some time to look into updating Peril to use to latest 10.1.0 release to no success.

I've been using https://github.com/danger/danger-js/pull/983 as a reference guide to see what changes were made their to support the latest OctoKit. I am left with 9 errors each around TypeScript.

source/danger/append_peril.ts:109:75 - error TS2345: Argument of type '{ [x: string]: any; } & { [x: string]: any; } & Octokit & void & { paginate: PaginateInterface; } & RestEndpointMethods' is not assignable to parameter of type 'Octokit'.

109       sandbox.danger.github.utils = GitHubUtils(sandbox.danger.github.pr, api)

Any advice on resolving these?

Here are the changes so far. https://github.com/danger/peril/commit/855ca891e8d1406840e681fb07822361135a8b22

steprescott avatar Apr 06 '20 13:04 steprescott

@gr2m Any advice from you as you did the danger update.

steprescott avatar Apr 16 '20 13:04 steprescott

Would love to help, just give me a day or two please

gr2m avatar Apr 16 '20 21:04 gr2m

I am left with 9 errors each around TypeScript

This is the bane of my existence right now 🤷

How can I reproduce the problem?

gr2m avatar Apr 19 '20 23:04 gr2m

Sorry for the late reply. I'm not a big fan of the new GitHub notifications UI so I miss these a lot.

I have a branch update/danger.

steprescott avatar Apr 23 '20 11:04 steprescott

It's hard to tell what is going on. It looks like different @octokit/rest versions are being used which might cause conflicts:

npm ls @octokit/rest
[email protected] /Users/gregor/Projects/peril/api
├── @octokit/[email protected] 
├─┬ @peril/[email protected]
│ └── @octokit/[email protected] 
└─┬ [email protected]
  └── @octokit/[email protected] 

I'm trying to do my best to provide good TypeScript support with Octokit, but I'm by no means an expert. And all these errors seem to be TypeScript errors. And I haven't seen that one before.

I wish I could help better, but I honestly don't have the time to digg in further right now :( but please ping me if there is something down the road that I could help with

gr2m avatar Apr 23 '20 18:04 gr2m

Yer I’m new to TypeScript myself. Thanks for what you have done this far.

steprescott avatar Apr 23 '20 22:04 steprescott