diff --git a/__mocks__/@octokit/rest.js b/__mocks__/@octokit/rest.js new file mode 100644 index 00000000..3a27f7fb --- /dev/null +++ b/__mocks__/@octokit/rest.js @@ -0,0 +1,54 @@ +module.exports = { + __esModule: true, + Octokit: jest.fn().mockImplementation(() => { + return { + actions: { + listWorkflowRuns: jest.fn().mockResolvedValue({ + data: { + workflow_runs: [ + { + head_sha: 'mock_sha' + } + ] + } + }), + listWorkflowRunArtifacts: jest.fn().mockResolvedValue({ + data: { + artifacts: [ + { + name: 'git-sdk-64-build-installers', + id: 12345, + created_at: '2025-08-12T12:00:00Z' + } + ] + } + }), + downloadArtifact: jest.fn().mockResolvedValue({ + data: 'mock artifact content' + }) + }, + repos: { + getBranch: jest.fn().mockResolvedValue({ + data: { + commit: { + sha: 'mock_sha' + } + } + }), + listReleases: jest.fn().mockResolvedValue({ + data: [ + { + tag_name: 'v2.41.0.windows.1', + assets: [ + { + name: 'git-sdk-64-build-installers.7z', + browser_download_url: 'https://example.com/git-sdk-64-build-installers.7z' + } + ] + } + ] + }) + } + } + }) +} diff --git a/eslint.config.mjs b/eslint.config.mjs index 1b8153dd..87df9545 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -74,7 +74,7 @@ export default tseslint.config([ "eslint-comments/no-use": "off", "github/filenames-match-regex": ["error", "^[a-z_]+(\\.test|\\.d)?$"], "i18n-text/no-en": "off", - "importPlugin/no-namespace": "off", + "import/no-namespace": "off", "no-unused-vars": "off", semi: "off", }, diff --git a/package-lock.json b/package-lock.json index 1bcff3fe..143d6408 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@vercel/ncc": "^0.38.3", "eslint": "^9.29.0", "eslint-plugin-anti-trojan-source": "^1.1.1", - "eslint-plugin-github": "^5.1.5", + "eslint-plugin-github": "^6.0.0", "eslint-plugin-jest": "^29.0.1", "eslint-plugin-prettier": "^5.4.1", "globals": "^16.2.0", @@ -5008,9 +5008,9 @@ } }, "node_modules/eslint-plugin-github": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.1.5.tgz", - "integrity": "sha512-vRgIVJ88FfESAGGYsJlf7SQhQlFEJaa7/I9z/5K5vKbWEQ3DnRkg8cvoj8LZA30MFb2uW1SltOcEj+Q8UR8LxA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-6.0.0.tgz", + "integrity": "sha512-J8MvUoiR/TU/Y9NnEmg1AnbvMUj9R6IO260z47zymMLLvso7B4c80IKjd8diqmqtSmeXXlbIus4i0SvK84flag==", "dev": true, "dependencies": { "@eslint/compat": "^1.2.3", @@ -5025,15 +5025,16 @@ "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-i18n-text": "^1.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jsx-a11y": "^6.7.1", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-no-only-tests": "^3.0.0", "eslint-plugin-prettier": "^5.2.1", "eslint-rule-documentation": ">=1.0.0", - "globals": "^15.12.0", + "globals": "^16.0.0", "jsx-ast-utils": "^3.3.2", "prettier": "^3.0.0", "svg-element-attributes": "^1.3.1", + "typescript": "^5.7.3", "typescript-eslint": "^8.14.0" }, "bin": { @@ -5043,19 +5044,6 @@ "eslint": "^8 || ^9" } }, - "node_modules/eslint-plugin-github/node_modules/globals": { - "version": "15.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", - "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/eslint-plugin-i18n-text": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz", @@ -14315,9 +14303,9 @@ } }, "eslint-plugin-github": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.1.5.tgz", - "integrity": "sha512-vRgIVJ88FfESAGGYsJlf7SQhQlFEJaa7/I9z/5K5vKbWEQ3DnRkg8cvoj8LZA30MFb2uW1SltOcEj+Q8UR8LxA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-6.0.0.tgz", + "integrity": "sha512-J8MvUoiR/TU/Y9NnEmg1AnbvMUj9R6IO260z47zymMLLvso7B4c80IKjd8diqmqtSmeXXlbIus4i0SvK84flag==", "dev": true, "requires": { "@eslint/compat": "^1.2.3", @@ -14332,24 +14320,17 @@ "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-i18n-text": "^1.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jsx-a11y": "^6.7.1", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-no-only-tests": "^3.0.0", "eslint-plugin-prettier": "^5.2.1", "eslint-rule-documentation": ">=1.0.0", - "globals": "^15.12.0", + "globals": "^16.0.0", "jsx-ast-utils": "^3.3.2", "prettier": "^3.0.0", "svg-element-attributes": "^1.3.1", + "typescript": "^5.7.3", "typescript-eslint": "^8.14.0" - }, - "dependencies": { - "globals": { - "version": "15.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", - "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", - "dev": true - } } }, "eslint-plugin-i18n-text": { diff --git a/package.json b/package.json index 6b5b6e0e..4f9b863a 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@vercel/ncc": "^0.38.3", "eslint": "^9.29.0", "eslint-plugin-anti-trojan-source": "^1.1.1", - "eslint-plugin-github": "^5.1.5", + "eslint-plugin-github": "^6.0.0", "eslint-plugin-jest": "^29.0.1", "eslint-plugin-prettier": "^5.4.1", "globals": "^16.2.0",