Skip to content

Commit

Permalink
tsc errors...
Browse files Browse the repository at this point in the history
  • Loading branch information
underrobyn committed Dec 31, 2023
1 parent 3c91de3 commit 90b5e12
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 13 deletions.
19 changes: 11 additions & 8 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@
"homepage": "https://github.com/underrobyn/dependabot-fail-task#readme",
"dependencies": {
"@octokit/auth-token": "^4.0.0",
"@octokit/core": "^5.0.2",
"@octokit/plugin-paginate-rest": "^9.1.5",
"@octokit/rest": "^20.0.2",
"@octokit/types": "^12.4.0",
"azure-devops-extension-sdk": "^4.0.2",
"azure-pipelines-task-lib": "^5.0.1-preview.0"
},
"devDependencies": {
"tfx-cli": "^0.16.0",
"typescript": "^5.3.3"
"typescript": "^4.9.5"
}
}
7 changes: 5 additions & 2 deletions src/task/common/github.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as tl from 'azure-pipelines-task-lib/task';
import {Octokit} from "@octokit/rest";
import {Octokit} from "@octokit/core";
import {paginateRest} from "@octokit/plugin-paginate-rest";
import {createTokenAuth} from "@octokit/auth-token";

export interface DependabotAlert {
Expand All @@ -17,10 +18,12 @@ export interface DependabotAlert {
async function getGitHubInstance() {
tl.debug('Fetching GitHub instance');

const OktokitPaginate = Octokit.plugin(paginateRest);

const auth = createTokenAuth(getGitHubToken());
const authentication = await auth();

return new Octokit({
return new OktokitPaginate({
auth: authentication.token,
});
}
Expand Down
13 changes: 11 additions & 2 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
"compilerOptions": {
/* Visit https://aka.ms/tsconfig.json to read more about this file */
"target": "es2020",
"module": "commonjs"
}
"module": "commonjs",
"moduleResolution": "Node",
"skipLibCheck": true,
"types": []
},
"include": [
"task/*"
],
"exclude": [
"node_modules/*"
]
}

0 comments on commit 90b5e12

Please sign in to comment.