peril
peril copied to clipboard
Note for updating Danger
This will require source code changes: https://github.com/danger/danger-js/pull/983
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
@gr2m Any advice from you as you did the danger update.
Would love to help, just give me a day or two please
I am left with 9 errors each around TypeScript
This is the bane of my existence right now 🤷
How can I reproduce the problem?
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
.
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
Yer I’m new to TypeScript myself. Thanks for what you have done this far.