Closed buffcode closed 10 months ago
CI failed to due to temporary Yarn failure:
An unexpected error occurred: "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.12.0.tgz: Request failed \"502 Bad Gateway\"".
I think the key for the
esModuleInterop had to be enabled for DTS generation because...
Is that the CLI command which is being called needs the --esModuleInterop
arg inline
Is that the CLI command which is being called needs the
--esModuleInterop
arg inline
Indeed, tsc
won't use the tsconfig.json
if the source file is specified directly... (https://github.com/microsoft/TypeScript/issues/6591#issuecomment-174343747)
I'm not wild on:
Because other danger runtimes, and the website use this schema to generate their DSLs/docs (which is why they were hand written before this PR) but all in all, I don't see enough activity in those spaces to really warrant keeping this restriction in place
Deploying this also might cause complications on the website which I'm probably not going to have any time to think about systemically for a long time so I guess we'll see how that goes too
breaking changes. should have written so in the changelog.
#19 3.627 src/rules/assignee.ts:26:66 - error TS2322: Type 'unknown' is not assignable to type 'number | undefined'.
#19 3.627
#19 3.627 26 await gitlab.api.MergeRequests.edit(mr.project_id, mr.iid, { assigneeId: mr.author.id });
#19 3.628 src/utils/is_renovatebot.ts:1:27 - error TS2724: '"danger"' has no exported member named 'GitLabUser'. Did you mean 'GitHubUser'?
#19 3.628
#19 3.628 1 import { GitCommitAuthor, GitLabUser } from "danger";
#19 3.628 ~~~~~~~~~~
My fixes:
- await gitlab.api.MergeRequests.edit(mr.project_id, mr.iid, { assigneeId: mr.author.id });
+ const assigneeId = Number(mr.author.id);
+ await gitlab.api.MergeRequests.edit(mr.project_id, mr.iid, { assigneeId });
And
-import { GitCommitAuthor, GitLabUser } from "danger";
+import { GitCommitAuthor } from "danger";
+import { Types as CoreTypes } from "@gitbeaker/core";
+
+type GitLabUser = Omit<CoreTypes.UserSchema, "created_at">;
maybe danger.js should export such GitLabUser
for downstream projects to use?
This is a follow up to https://github.com/danger/danger-js/pull/1327 by @ivankatliarchuk
@gitbeaker/rest
(see https://github.com/danger/danger-js/issues/1386)esModuleInterop
had to be enabled for DTS generation because of: