mirror of
https://github.com/github/codeql-action.git
synced 2026-05-10 15:50:28 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4869139f44 | |||
| 712b51a568 | |||
| 0d61442a70 | |||
| c4b6a67406 | |||
| 90b2d28dad |
+4
-1
@@ -78,7 +78,7 @@ export default [
|
|||||||
|
|
||||||
typescript: {},
|
typescript: {},
|
||||||
},
|
},
|
||||||
"import/ignore": ["sinon", "uuid", "@octokit/plugin-retry", "del", "get-folder-size"],
|
"import/ignore": ["sinon", "uuid", "@octokit/plugin-retry", "del", "get-folder-size", "@actions/github"],
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
@@ -152,9 +152,12 @@ export default [
|
|||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-unsafe-argument": "off",
|
||||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||||
|
"@typescript-eslint/no-unsafe-call": "off",
|
||||||
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
||||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||||
|
"@typescript-eslint/no-unsafe-return": "off",
|
||||||
"@typescript-eslint/no-var-requires": "off",
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
"@typescript-eslint/prefer-regexp-exec": "off",
|
"@typescript-eslint/prefer-regexp-exec": "off",
|
||||||
"@typescript-eslint/require-await": "off",
|
"@typescript-eslint/require-await": "off",
|
||||||
|
|||||||
Generated
+23461
-4999
File diff suppressed because one or more lines are too long
Generated
+23068
-4607
File diff suppressed because one or more lines are too long
Generated
+23060
-4598
File diff suppressed because one or more lines are too long
Generated
+23403
-4943
File diff suppressed because one or more lines are too long
Generated
+23020
-4559
File diff suppressed because one or more lines are too long
Generated
+23060
-4598
File diff suppressed because one or more lines are too long
Generated
+23060
-4598
File diff suppressed because one or more lines are too long
Generated
+23461
-4999
File diff suppressed because one or more lines are too long
Generated
+23048
-4586
File diff suppressed because one or more lines are too long
Generated
+23059
-4598
File diff suppressed because one or more lines are too long
Generated
+23461
-4999
File diff suppressed because one or more lines are too long
Generated
+23062
-4601
File diff suppressed because one or more lines are too long
Generated
+25
-6
@@ -14,7 +14,7 @@
|
|||||||
"@actions/cache": "^5.0.3",
|
"@actions/cache": "^5.0.3",
|
||||||
"@actions/core": "^2.0.2",
|
"@actions/core": "^2.0.2",
|
||||||
"@actions/exec": "^2.0.0",
|
"@actions/exec": "^2.0.0",
|
||||||
"@actions/github": "^8.0.0",
|
"@actions/github": "^9.0.0",
|
||||||
"@actions/glob": "^0.5.0",
|
"@actions/glob": "^0.5.0",
|
||||||
"@actions/http-client": "^3.0.0",
|
"@actions/http-client": "^3.0.0",
|
||||||
"@actions/io": "^2.0.0",
|
"@actions/io": "^2.0.0",
|
||||||
@@ -395,18 +395,28 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/github": {
|
"node_modules/@actions/github": {
|
||||||
"version": "8.0.0",
|
"version": "9.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/github/-/github-8.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/github/-/github-9.0.0.tgz",
|
||||||
"integrity": "sha512-bBukvVRvIf7NshWEXFVnBaXs/ZyGzDvx+jbB5AdJij9CUG4VFEYJJD6T6y06dDkuULalQQUNvKXIH71yqw7SoQ==",
|
"integrity": "sha512-yJ0RoswsAaKcvkmpCE4XxBRiy/whH2SdTBHWzs0gi4wkqTDhXMChjSdqBz/F4AeiDlP28rQqL33iHb+kjAMX6w==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/http-client": "^3.0.1",
|
"@actions/http-client": "^3.0.2",
|
||||||
"@octokit/core": "^7.0.6",
|
"@octokit/core": "^7.0.6",
|
||||||
"@octokit/plugin-paginate-rest": "^14.0.0",
|
"@octokit/plugin-paginate-rest": "^14.0.0",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^17.0.0",
|
"@octokit/plugin-rest-endpoint-methods": "^17.0.0",
|
||||||
"@octokit/request": "^10.0.7",
|
"@octokit/request": "^10.0.7",
|
||||||
"@octokit/request-error": "^7.1.0",
|
"@octokit/request-error": "^7.1.0",
|
||||||
"undici": "^5.28.5"
|
"undici": "^6.23.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@actions/github/node_modules/@actions/http-client": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"tunnel": "^0.0.6",
|
||||||
|
"undici": "^6.23.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest": {
|
"node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest": {
|
||||||
@@ -439,6 +449,15 @@
|
|||||||
"@octokit/core": ">=6"
|
"@octokit/core": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@actions/github/node_modules/undici": {
|
||||||
|
"version": "6.23.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz",
|
||||||
|
"integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.17"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@actions/glob": {
|
"node_modules/@actions/glob": {
|
||||||
"version": "0.5.0",
|
"version": "0.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.5.0.tgz",
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@
|
|||||||
"@actions/cache": "^5.0.3",
|
"@actions/cache": "^5.0.3",
|
||||||
"@actions/core": "^2.0.2",
|
"@actions/core": "^2.0.2",
|
||||||
"@actions/exec": "^2.0.0",
|
"@actions/exec": "^2.0.0",
|
||||||
"@actions/github": "^8.0.0",
|
"@actions/github": "^9.0.0",
|
||||||
"@actions/glob": "^0.5.0",
|
"@actions/glob": "^0.5.0",
|
||||||
"@actions/http-client": "^3.0.0",
|
"@actions/http-client": "^3.0.0",
|
||||||
"@actions/io": "^2.0.0",
|
"@actions/io": "^2.0.0",
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ function mockGetMetaVersionHeader(
|
|||||||
};
|
};
|
||||||
const spyGetContents = sinon
|
const spyGetContents = sinon
|
||||||
.stub(client.rest.meta, "get")
|
.stub(client.rest.meta, "get")
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
||||||
.resolves(response as any);
|
.resolves(response as any);
|
||||||
sinon.stub(api, "getApiClient").value(() => client);
|
sinon.stub(api, "getApiClient").value(() => client);
|
||||||
return spyGetContents;
|
return spyGetContents;
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ export async function getGitHubVersionFromApi(
|
|||||||
|
|
||||||
// Doesn't strictly have to be the meta endpoint as we're only
|
// Doesn't strictly have to be the meta endpoint as we're only
|
||||||
// using the response headers which are available on every request.
|
// using the response headers which are available on every request.
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
||||||
const response = await apiClient.rest.meta.get();
|
const response = await apiClient.rest.meta.get();
|
||||||
|
|
||||||
// This happens on dotcom, although we expect to have already returned in that
|
// This happens on dotcom, although we expect to have already returned in that
|
||||||
|
|||||||
@@ -115,7 +115,6 @@ function mockGetContents(
|
|||||||
};
|
};
|
||||||
const spyGetContents = sinon
|
const spyGetContents = sinon
|
||||||
.stub(client.rest.repos, "getContent")
|
.stub(client.rest.repos, "getContent")
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
||||||
.resolves(response as any);
|
.resolves(response as any);
|
||||||
sinon.stub(api, "getApiClient").value(() => client);
|
sinon.stub(api, "getApiClient").value(() => client);
|
||||||
sinon.stub(api, "getApiClientWithExternalAuth").value(() => client);
|
sinon.stub(api, "getApiClientWithExternalAuth").value(() => client);
|
||||||
@@ -131,7 +130,6 @@ function mockListLanguages(languages: string[]) {
|
|||||||
for (const language of languages) {
|
for (const language of languages) {
|
||||||
response.data[language] = 123;
|
response.data[language] = 123;
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
||||||
sinon.stub(client.rest.repos, "listLanguages").resolves(response as any);
|
sinon.stub(client.rest.repos, "listLanguages").resolves(response as any);
|
||||||
sinon.stub(api, "getApiClient").value(() => client);
|
sinon.stub(api, "getApiClient").value(() => client);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,17 +259,13 @@ for (const feature of Object.keys(featureConfig)) {
|
|||||||
|
|
||||||
// The type system should prevent this happening, but test that if we
|
// The type system should prevent this happening, but test that if we
|
||||||
// bypass it we get the expected error.
|
// bypass it we get the expected error.
|
||||||
await t.throwsAsync(
|
await t.throwsAsync(async () => features.getValue(feature as any), {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
message: `Internal error: A ${
|
||||||
async () => features.getValue(feature as any),
|
featureConfig[feature].minimumVersion !== undefined
|
||||||
{
|
? "minimum version"
|
||||||
message: `Internal error: A ${
|
: "required tools feature"
|
||||||
featureConfig[feature].minimumVersion !== undefined
|
} is specified for feature ${feature}, but no instance of CodeQL was provided.`,
|
||||||
? "minimum version"
|
});
|
||||||
: "required tools feature"
|
|
||||||
} is specified for feature ${feature}, but no instance of CodeQL was provided.`,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ const expectedFeatureEnablement: FeatureEnablement = initializeFeatures(
|
|||||||
true,
|
true,
|
||||||
) as FeatureEnablement;
|
) as FeatureEnablement;
|
||||||
expectedFeatureEnablement.getValue = function (feature: Feature) {
|
expectedFeatureEnablement.getValue = function (feature: Feature) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
||||||
return expectedFeatureEnablement[feature];
|
return expectedFeatureEnablement[feature];
|
||||||
};
|
};
|
||||||
test.beforeEach(() => {
|
test.beforeEach(() => {
|
||||||
|
|||||||
@@ -249,7 +249,6 @@ function mockGetReleaseByTag(assets?: Array<{ name: string; url?: string }>) {
|
|||||||
url: "GET /repos/:owner/:repo/releases/tags/:tag",
|
url: "GET /repos/:owner/:repo/releases/tags/:tag",
|
||||||
});
|
});
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
||||||
mockClient.returns({
|
mockClient.returns({
|
||||||
rest: {
|
rest: {
|
||||||
repos: {
|
repos: {
|
||||||
|
|||||||
@@ -269,7 +269,6 @@ export function mockLanguagesInRepo(languages: string[]) {
|
|||||||
url: "GET /repos/:owner/:repo/languages",
|
url: "GET /repos/:owner/:repo/languages",
|
||||||
});
|
});
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
||||||
mockClient.returns({
|
mockClient.returns({
|
||||||
rest: {
|
rest: {
|
||||||
repos: {
|
repos: {
|
||||||
|
|||||||
@@ -1057,7 +1057,6 @@ function handleProcessingResultForUnsuccessfulExecution(
|
|||||||
status === "failed" &&
|
status === "failed" &&
|
||||||
Array.isArray(response.data.errors) &&
|
Array.isArray(response.data.errors) &&
|
||||||
response.data.errors.length === 1 &&
|
response.data.errors.length === 1 &&
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
||||||
response.data.errors[0].toString().startsWith("unsuccessful execution")
|
response.data.errors[0].toString().startsWith("unsuccessful execution")
|
||||||
) {
|
) {
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|||||||
@@ -25,8 +25,12 @@
|
|||||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||||
|
|
||||||
/* Module Resolution Options */
|
/* Module Resolution Options */
|
||||||
|
"baseUrl": ".", /* Base directory to resolve non-absolute module names. */
|
||||||
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
|
"paths": {
|
||||||
|
"@octokit/core/types": ["./node_modules/@octokit/core/dist-types/types.d.ts"]
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user