mirror of
https://github.com/astral-sh/ruff-action.git
synced 2026-08-08 02:07:02 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57714a7c8a | ||
|
|
f46fd74e35 | ||
|
|
6afcb280fd | ||
|
|
232c1eca56 | ||
|
|
6b45781b82 | ||
|
|
a099b88c70 | ||
|
|
b63c059bc7 |
@@ -4,12 +4,12 @@
|
||||
"owner": "ruff-check",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^Error: (.*):(\\d+):(\\d+): (\\w+) (.*)$",
|
||||
"code": 4,
|
||||
"column": 3,
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
"message": 5,
|
||||
"regexp": "^Error: (.*):(\\d+):(\\d+): (\\w+) (.*)$"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
"owner": "ruff-format",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(Would reformat):\\s*(.+)$",
|
||||
"file": 2,
|
||||
"message": 1,
|
||||
"file": 2
|
||||
"regexp": "^(Would reformat):\\s*(.+)$"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
+19
-19
@@ -14,7 +14,7 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Actionlint
|
||||
uses: eifinger/actionlint-action@23c85443d840cd73bbecb9cddfc933cc21649a38 # v1.9.1
|
||||
- uses: actions/setup-node@v4
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use latest version
|
||||
uses: ./
|
||||
with:
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
ruff-version: ["0.1.7", "0.1.8", "0.4.7", "0.4.10", "0.7", "0.7.x", ">=0.7.0"]
|
||||
os: [ ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-14, windows-latest ]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use version ${{ matrix.ruff-version }}
|
||||
uses: ./
|
||||
with:
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
test-unsupported-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Try install old version
|
||||
id: install
|
||||
continue-on-error: true
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
test-version-from-version-file-pyproject:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use version from pyproject.toml
|
||||
id: ruff-action
|
||||
uses: ./
|
||||
@@ -93,7 +93,7 @@ jobs:
|
||||
test-default-version-from-pyproject:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use default version from pyproject.toml
|
||||
id: ruff-action
|
||||
uses: ./
|
||||
@@ -109,7 +109,7 @@ jobs:
|
||||
test-default-version-from-pyproject-dev-group:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use default version from pyproject.toml dev group
|
||||
id: ruff-action
|
||||
uses: ./
|
||||
@@ -126,7 +126,7 @@ jobs:
|
||||
test-default-version-from-pyproject-dependency-groups:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use default version from pyproject.toml dependency groups
|
||||
id: ruff-action
|
||||
uses: ./
|
||||
@@ -143,7 +143,7 @@ jobs:
|
||||
test-default-version-from-pyproject-poetry-groups:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use default version from pyproject.toml poetry group dependencies
|
||||
id: ruff-action
|
||||
uses: ./
|
||||
@@ -160,7 +160,7 @@ jobs:
|
||||
test-default-version-from-pyproject-poetry:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use default version from pyproject.toml poetry dependencies
|
||||
id: ruff-action
|
||||
uses: ./
|
||||
@@ -177,7 +177,7 @@ jobs:
|
||||
test-default-version-from-pyproject-optional-dependencies:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use default version from pyproject.toml optional dependencies
|
||||
id: ruff-action
|
||||
uses: ./
|
||||
@@ -194,7 +194,7 @@ jobs:
|
||||
test-default-version-from-requirements:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use default version from requirements.txt
|
||||
id: ruff-action
|
||||
uses: ./
|
||||
@@ -211,7 +211,7 @@ jobs:
|
||||
test-semver-range:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use version 0.7
|
||||
id: ruff-action
|
||||
uses: ./
|
||||
@@ -228,7 +228,7 @@ jobs:
|
||||
test-pep440-version-specifier:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install version 0.9.10
|
||||
id: ruff-action
|
||||
uses: ./
|
||||
@@ -252,7 +252,7 @@ jobs:
|
||||
- os: macos-latest
|
||||
checksum: "af9583bff12afbca5d5670334e0187dd60c4d91bc71317d1b2dde70cb1200ba9"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Checksum matches expected
|
||||
uses: ./
|
||||
with:
|
||||
@@ -262,7 +262,7 @@ jobs:
|
||||
test-with-explicit-token:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use default version
|
||||
uses: ./
|
||||
with:
|
||||
@@ -274,7 +274,7 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use args
|
||||
uses: ./
|
||||
with:
|
||||
@@ -283,7 +283,7 @@ jobs:
|
||||
test-failure:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Format should fail
|
||||
id: format-should-fail
|
||||
continue-on-error: true
|
||||
@@ -313,7 +313,7 @@ jobs:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest ]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use args
|
||||
uses: ./
|
||||
with:
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Update Major Minor Tags
|
||||
run: |
|
||||
set -x
|
||||
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["biomejs.biome"]
|
||||
}
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.action.useSortedAttributes.biome": "explicit",
|
||||
"source.action.useSortedKeys.biome": "explicit",
|
||||
"source.fixAll.biome": "explicit"
|
||||
},
|
||||
"editor.defaultFormatter": "biomejs.biome",
|
||||
"editor.formatOnSave": true,
|
||||
"explorer.excludeGitIgnore": false,
|
||||
"search.defaultViewMode": "list",
|
||||
"search.exclude": {
|
||||
"**/node_modules": true
|
||||
},
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||
"typescript.tsdk": "node_modules/typescript/lib"
|
||||
}
|
||||
+26
-13
@@ -1,20 +1,34 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
|
||||
"vcs": {
|
||||
"enabled": true,
|
||||
"clientKind": "git",
|
||||
"useIgnoreFile": false
|
||||
"$schema": "https://biomejs.dev/schemas/2.1.4/schema.json",
|
||||
"assist": {
|
||||
"actions": {
|
||||
"source": {
|
||||
"organizeImports": "on",
|
||||
"useSortedAttributes": "on",
|
||||
"useSortedKeys": "on"
|
||||
}
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"ignoreUnknown": false,
|
||||
"ignore": ["dist", "lib", "node_modules"]
|
||||
"includes": [
|
||||
"**",
|
||||
"!**/dist",
|
||||
"!**/lib",
|
||||
"!**/node_modules",
|
||||
"!**/package*.json",
|
||||
"!**/known-checksums.*"
|
||||
]
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
"indentStyle": "space"
|
||||
},
|
||||
"organizeImports": {
|
||||
"enabled": true
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"quoteStyle": "double",
|
||||
"trailingCommas": "all"
|
||||
}
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
@@ -22,10 +36,9 @@
|
||||
"recommended": true
|
||||
}
|
||||
},
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"quoteStyle": "double",
|
||||
"trailingCommas": "all"
|
||||
}
|
||||
"vcs": {
|
||||
"clientKind": "git",
|
||||
"enabled": true,
|
||||
"useIgnoreFile": false
|
||||
}
|
||||
}
|
||||
|
||||
+107
-19
@@ -29014,12 +29014,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.validateChecksum = validateChecksum;
|
||||
exports.isknownVersion = isknownVersion;
|
||||
const fs = __importStar(__nccwpck_require__(3024));
|
||||
const crypto = __importStar(__nccwpck_require__(7598));
|
||||
const fs = __importStar(__nccwpck_require__(3024));
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const known_checksums_1 = __nccwpck_require__(2764);
|
||||
async function validateChecksum(checkSum, downloadPath, arch, platform, version) {
|
||||
let isValid = undefined;
|
||||
let isValid;
|
||||
if (checkSum !== undefined && checkSum !== "") {
|
||||
isValid = await validateFileCheckSum(downloadPath, checkSum);
|
||||
}
|
||||
@@ -29071,6 +29071,74 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KNOWN_CHECKSUMS = void 0;
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
exports.KNOWN_CHECKSUMS = {
|
||||
"aarch64-apple-darwin-0.12.8": "d7ddfc029858b97452e728c229b0378e3dde5300b23df5cc5c77296025971379",
|
||||
"aarch64-pc-windows-msvc-0.12.8": "99cedac1f9b7a321a0e2b81ded68bbaf5dbff6aedac528766eda50d3871ccce9",
|
||||
"aarch64-unknown-linux-gnu-0.12.8": "fc4a79cfe90c8e4f7bfdad2198e939b70416916a7e90f687f30490b25e2171d6",
|
||||
"aarch64-unknown-linux-musl-0.12.8": "6840915d3f11a32ac00368206d7a4c957d2d499bc324ab39a3a0a851fda07dc2",
|
||||
"arm-unknown-linux-musleabihf-0.12.8": "cf549a91db1de22bde9562725d748625a23d41050f2e3ef9a6dca0b6abaa3ca3",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.8": "b69472a32bc355f7cbc61d939d3ea1cbf1ab42f1bddd56f4ad53af1a372dab55",
|
||||
"armv7-unknown-linux-musleabihf-0.12.8": "0de514e00cfccff21fd52315f439e52ac95f02539487a78ea864df5d8627e77e",
|
||||
"i686-pc-windows-msvc-0.12.8": "50bd0eea8f4dc8a94a96cc64f3f61163421f02230672e12b5a91068c7585f7e1",
|
||||
"i686-unknown-linux-gnu-0.12.8": "3363c9c7b41fec9ad680f9bb32b65fffb30bd582e0fc2ae5d3ee8c51e3fc8347",
|
||||
"i686-unknown-linux-musl-0.12.8": "73dbe5b0718322479e7e78abf598c626d7ffc8cf10a2ebc54524fb0e0118fa37",
|
||||
"powerpc64-unknown-linux-gnu-0.12.8": "570dda0a1f5683eb2124491356694fcd2d5b13efc43f2b2f7315fe187fc2add5",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.8": "73bab12d97b6ecd54d8e338f57ab90b3c06e6bdb965bd9ea1613a2c11eb24256",
|
||||
"s390x-unknown-linux-gnu-0.12.8": "001f98c87871a617fda8addc74954b79b8c10875feade4a187de79daf8613fcc",
|
||||
"x86_64-apple-darwin-0.12.8": "5c795cae1956a1d1c84e1d93c952b627da1541311fdbb09885bf9d80b0e2cc42",
|
||||
"x86_64-pc-windows-msvc-0.12.8": "223d7691fc68bfcfb0bbefa35e5d63998721367404573d883e97583fe73a7682",
|
||||
"x86_64-unknown-linux-gnu-0.12.8": "ac0edfd0935dfedc884f2ddeab6705b4875e7e84aa9f1c7af78233492ebecdb0",
|
||||
"x86_64-unknown-linux-musl-0.12.8": "0062142b6277177f196a9dd7cf1bcf10f536f8a33c458d258525504f94760227",
|
||||
"aarch64-apple-darwin-0.12.7": "86b39b4002bb12588af972ad56cfddc1eaa0879c4badb07f0021fae77b5cd958",
|
||||
"aarch64-pc-windows-msvc-0.12.7": "35b51d47463eebfc2d39863222a19540e73ddda5b1662b88e774580a7ac526a4",
|
||||
"aarch64-unknown-linux-gnu-0.12.7": "0d4bb492a02cf191a2e1e058cf819c2ed86c05ea444de5e3895ba75c890a9804",
|
||||
"aarch64-unknown-linux-musl-0.12.7": "5f97261a334af4f4ba41baa5cea0f0dfd8d732d9ab22beb5bf0639804389bfa3",
|
||||
"arm-unknown-linux-musleabihf-0.12.7": "ec0d3cf0c6721b1c4c7480995d8a538b217c9dcf37f64389f05a0bea7ff308b9",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.7": "59f8f6d19faa61f3ca6e7127a3e34470028bed90e40bebacf7c8be48d3080140",
|
||||
"armv7-unknown-linux-musleabihf-0.12.7": "6ce861317f812b69c68a92c6f6afbb68b99bab4525758b9bad659f94a6fd2429",
|
||||
"i686-pc-windows-msvc-0.12.7": "becca8cf66388f2532477ad28fae2bd3ccfda8635f4fd68d7139914020203ff6",
|
||||
"i686-unknown-linux-gnu-0.12.7": "65bbeba7444f62cc403591999d7bfbf3aec0e2ecae869c969c9faf096a737279",
|
||||
"i686-unknown-linux-musl-0.12.7": "0fd4cc8e5f2f02acd208482da316fdb4ecc2179d11bf0aa61d7622ba7100e889",
|
||||
"powerpc64-unknown-linux-gnu-0.12.7": "81efd82ed616aa951499cf4012420adfbc4cac0b39375623bbecbf79a4d08098",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.7": "46360fc4d0b498a3ebfc9ee73ee6b2b59db3ace21dbf12ba41e5fb15dfb71364",
|
||||
"s390x-unknown-linux-gnu-0.12.7": "ef03f40de21e9eed3e66626d3af768b3f9a82cd2e8cd62bc887bcd206a2ccdce",
|
||||
"x86_64-apple-darwin-0.12.7": "f0179a587d5509f32ab16bd95cdf64ddcebc80d653e3674161d366312a4eaf7a",
|
||||
"x86_64-pc-windows-msvc-0.12.7": "12a239698d4f0926523cb51a9b00a560615d6237e9a748c563a74f4708f4abdf",
|
||||
"x86_64-unknown-linux-gnu-0.12.7": "65b1ec7ba8feda6cbe52aec168f32e5c276577065914fca922b9a8b3f42db433",
|
||||
"x86_64-unknown-linux-musl-0.12.7": "58aeb49137d0a9df810ba26c778d10d612f8c1439439527a6a95c90ea318c7c5",
|
||||
"aarch64-apple-darwin-0.12.5": "8819b61cff645c1d1671df331bb57c1ab230094b686942bccedde1f888feb522",
|
||||
"aarch64-pc-windows-msvc-0.12.5": "b5f06365b87c4d90de76dbd17379db937faa49cd37a931f1908e7c94a604dcd4",
|
||||
"aarch64-unknown-linux-gnu-0.12.5": "6d00576ccef50b5627ded90879430acd40d590bbc7b354af0549f41fe2f58fcf",
|
||||
"aarch64-unknown-linux-musl-0.12.5": "f147ccdbe26d35f2752c6d97d158bc8e3b4d1833d283748fc48f350c698a6f7b",
|
||||
"arm-unknown-linux-musleabihf-0.12.5": "c6aaa6d90cd2abad0650e968defa8e30dd065ea05ef6391716302cc8e6e34287",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.5": "e479a5f64160f814b44415ccdc834b0f85b539bc286eb8c09199a7aeefa6bf06",
|
||||
"armv7-unknown-linux-musleabihf-0.12.5": "04b7b507752e6f62fffefa3d02d31e96a7e8fb31f699dbc83fb814d7c3c4bb15",
|
||||
"i686-pc-windows-msvc-0.12.5": "a0c5b5be39841055fa7b4255cbcc9e8761a1328f461d2335dd53cc195b7c51bb",
|
||||
"i686-unknown-linux-gnu-0.12.5": "0c95dc3c5711fccccf26a1aef9a620d6a1fd2faa8485e38ec91d836f7d2200e1",
|
||||
"i686-unknown-linux-musl-0.12.5": "d223f9db886191de0c80c5e2519f413dce0281080f6bc9eecbaff18e2c474d52",
|
||||
"powerpc64-unknown-linux-gnu-0.12.5": "c436a319fec80a7b23591fbd15b2c224a3b30a5c0dc257d150f684a8c45dc147",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.5": "26ccf69bb0a6b98b8ad0d7e566acacbd86e2fbbd734ea98b854e40237905a9c9",
|
||||
"s390x-unknown-linux-gnu-0.12.5": "c8f8ef8f4ce2930085f7e3e17ee58936938b41c9753c2a9aeab0a6473138887a",
|
||||
"x86_64-apple-darwin-0.12.5": "5af0b2931581a5ed91743c9f669c23cb0db9bb1f0c49f8695ad1443dbc6a9e50",
|
||||
"x86_64-pc-windows-msvc-0.12.5": "91b88d365f60e3b641d5204a87d56275cd1b4a869f939b637b06e1d6e9fd38e1",
|
||||
"x86_64-unknown-linux-gnu-0.12.5": "1ef5e978c41c67feaa5447d97a4400f5f0136c92d6507a876d81f1a2fd64d154",
|
||||
"x86_64-unknown-linux-musl-0.12.5": "79beb4eac07beaea24774709eeb88a87115f1b53f857dcc1155431e642e01ade",
|
||||
"aarch64-apple-darwin-0.12.4": "be7dc64e69a31b1bb9e875274778c1b65c9470ff18214232aa35fc843e5a6826",
|
||||
"aarch64-pc-windows-msvc-0.12.4": "859739ae8f64f39512f637ecc56ca12adfdc0d45f79f2ce1ba53d5111d92e753",
|
||||
"aarch64-unknown-linux-gnu-0.12.4": "8ce8faaeeb277f7481eb6fb21d1073365f1e633513f67542d245fad2aeebabca",
|
||||
"aarch64-unknown-linux-musl-0.12.4": "adab1c084dbe508c134a354e277b6706da98e89c84aee619cbff37fff5f0b8fc",
|
||||
"arm-unknown-linux-musleabihf-0.12.4": "0357e038b60ef8c879d625474f0c93e31601a3e648836ccf4dfcf85ffa7897d3",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.4": "dd6f50075a6b02878d35b21a192ba6ec1a7b43be21b882f6363cceac19e457f7",
|
||||
"armv7-unknown-linux-musleabihf-0.12.4": "1286d7520f616f797427a492e51f2f53248505661c86ed30d141379f595ad049",
|
||||
"i686-pc-windows-msvc-0.12.4": "5f6a09e123059e7b434edc68b5ed5e8d2af8156cf10506a3587c51ecc1ffcab1",
|
||||
"i686-unknown-linux-gnu-0.12.4": "a19cc2babc73065184e60ee41a1157e94f290261175cbc51b11038ebb0dde84a",
|
||||
"i686-unknown-linux-musl-0.12.4": "c230fe5125497ba667bbe554759bdbd43d7e45855762ce35afc7e1bccd4300ed",
|
||||
"powerpc64-unknown-linux-gnu-0.12.4": "d8f029b295985aeb0ec877e232d43f56e452792e8edabcc82b1094ac2d07c006",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.4": "60ac64921ff538beb3cbe8d91b56bda14dffaa7f4c398ebbedb0ff358b1c71c8",
|
||||
"s390x-unknown-linux-gnu-0.12.4": "78319ca0b164c84cb8a0f8bbe13372c9dd4d26cbc286b78c34bb5e947695fe08",
|
||||
"x86_64-apple-darwin-0.12.4": "2c829e3128354900495ad91d0401e2284e70121bae67cfcb264eea3a639381a5",
|
||||
"x86_64-pc-windows-msvc-0.12.4": "0fcadba5764177cc79d3b1bdf56481e71977dd167efd1073f9db9b719e34ed38",
|
||||
"x86_64-unknown-linux-gnu-0.12.4": "bc783b6b4b4a253ec2d9baf5ce559aa3a41570a14ae865cac3cdd11ef28403a7",
|
||||
"x86_64-unknown-linux-musl-0.12.4": "41117fc1c67eb9572c50403297bd5fcb8cec99d8a1566badec7ff1a03f8a356d",
|
||||
"aarch64-apple-darwin-0.12.3": "5769e4841870d1f7c17f12a7d1437222e8035eded52f93c54c035c770dbffebb",
|
||||
"aarch64-pc-windows-msvc-0.12.3": "25056f8a5ca19f87e4d8e13b744077ad47e122dbef454a6ecf572d9d92d5dbf1",
|
||||
"aarch64-unknown-linux-gnu-0.12.3": "d63a773c9e2854d4d726bc8ac0d919736e8f8e683b5a54caea0ad470ce233f0c",
|
||||
@@ -31482,17 +31550,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.tryGetFromToolCache = tryGetFromToolCache;
|
||||
exports.downloadVersion = downloadVersion;
|
||||
exports.resolveVersion = resolveVersion;
|
||||
const node_fs_1 = __nccwpck_require__(3024);
|
||||
const path = __importStar(__nccwpck_require__(6760));
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const tc = __importStar(__nccwpck_require__(3472));
|
||||
const path = __importStar(__nccwpck_require__(6760));
|
||||
const node_fs_1 = __nccwpck_require__(3024);
|
||||
const semver = __importStar(__nccwpck_require__(9318));
|
||||
const pep440 = __importStar(__nccwpck_require__(3297));
|
||||
const constants_1 = __nccwpck_require__(6156);
|
||||
const checksum_1 = __nccwpck_require__(5391);
|
||||
const core_1 = __nccwpck_require__(767);
|
||||
const plugin_paginate_rest_1 = __nccwpck_require__(3779);
|
||||
const plugin_rest_endpoint_methods_1 = __nccwpck_require__(9210);
|
||||
const pep440 = __importStar(__nccwpck_require__(3297));
|
||||
const semver = __importStar(__nccwpck_require__(9318));
|
||||
const constants_1 = __nccwpck_require__(6156);
|
||||
const checksum_1 = __nccwpck_require__(5391);
|
||||
const PaginatingOctokit = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.restEndpointMethods);
|
||||
function tryGetFromToolCache(arch, version) {
|
||||
core.debug(`Trying to get ruff from tool cache for ${version}...`);
|
||||
@@ -31503,7 +31571,7 @@ function tryGetFromToolCache(arch, version) {
|
||||
resolvedVersion = version;
|
||||
}
|
||||
const installedPath = tc.find(constants_1.TOOL_CACHE_NAME, resolvedVersion, arch);
|
||||
return { version: resolvedVersion, installedPath };
|
||||
return { installedPath, version: resolvedVersion };
|
||||
}
|
||||
async function downloadVersion(platform, arch, version, checkSum, githubToken) {
|
||||
const artifact = `ruff-${arch}-${platform}`;
|
||||
@@ -31518,7 +31586,7 @@ async function downloadVersion(platform, arch, version, checkSum, githubToken) {
|
||||
await (0, checksum_1.validateChecksum)(checkSum, downloadPath, arch, platform, version);
|
||||
const extractedDir = await extractDownloadedArtifact(version, downloadPath, extension, platform, artifact);
|
||||
const cachedToolDir = await tc.cacheDir(extractedDir, constants_1.TOOL_CACHE_NAME, version, arch);
|
||||
return { version: version, cachedToolDir };
|
||||
return { cachedToolDir, version: version };
|
||||
}
|
||||
function constructDownloadUrl(version, platform, arch) {
|
||||
const artifactVersionSuffix = semver.lte(version, "v0.4.10") && semver.gte(version, "v0.1.8")
|
||||
@@ -31589,6 +31657,10 @@ async function getReleaseTagNames(octokit) {
|
||||
owner: constants_1.OWNER,
|
||||
repo: constants_1.REPO,
|
||||
});
|
||||
const releaseTagNames = response.map((release) => release.tag_name);
|
||||
if (releaseTagNames.length === 0) {
|
||||
throw Error("Github API request failed while getting releases. Check the GitHub status page for outages. Try again later.");
|
||||
}
|
||||
return response.map((release) => release.tag_name);
|
||||
}
|
||||
async function getLatestVersion(githubToken) {
|
||||
@@ -31606,6 +31678,7 @@ async function getLatestVersion(githubToken) {
|
||||
latestRelease = await getLatestRelease(octokit);
|
||||
}
|
||||
else {
|
||||
core.error("Github API request failed while getting latest release. Check the GitHub status page for outages. Try again later.");
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
@@ -31677,15 +31750,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const fs = __importStar(__nccwpck_require__(3024));
|
||||
const path = __importStar(__nccwpck_require__(6760));
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const exec = __importStar(__nccwpck_require__(5236));
|
||||
const path = __importStar(__nccwpck_require__(6760));
|
||||
const download_version_1 = __nccwpck_require__(8255);
|
||||
const platforms_1 = __nccwpck_require__(8361);
|
||||
const inputs_1 = __nccwpck_require__(9612);
|
||||
const pyproject_1 = __nccwpck_require__(3929);
|
||||
const fs = __importStar(__nccwpck_require__(3024));
|
||||
const semver = __importStar(__nccwpck_require__(9318));
|
||||
const download_version_1 = __nccwpck_require__(8255);
|
||||
const inputs_1 = __nccwpck_require__(9612);
|
||||
const platforms_1 = __nccwpck_require__(8361);
|
||||
const pyproject_1 = __nccwpck_require__(3929);
|
||||
async function run() {
|
||||
const platform = (0, platforms_1.getPlatform)();
|
||||
const arch = (0, platforms_1.getArch)();
|
||||
@@ -31851,9 +31924,9 @@ exports.getPlatform = getPlatform;
|
||||
function getArch() {
|
||||
const arch = process.arch;
|
||||
const archMapping = {
|
||||
arm64: "aarch64",
|
||||
ia32: "i686",
|
||||
x64: "x86_64",
|
||||
arm64: "aarch64",
|
||||
};
|
||||
if (arch in archMapping) {
|
||||
return archMapping[arch];
|
||||
@@ -31862,8 +31935,8 @@ function getArch() {
|
||||
function getPlatform() {
|
||||
const platform = process.platform;
|
||||
const platformMapping = {
|
||||
linux: "unknown-linux-gnu",
|
||||
darwin: "apple-darwin",
|
||||
linux: "unknown-linux-gnu",
|
||||
win32: "pc-windows-msvc",
|
||||
};
|
||||
if (platform in platformMapping) {
|
||||
@@ -36057,14 +36130,16 @@ function normalizePaginatedListResponse(response) {
|
||||
data: []
|
||||
};
|
||||
}
|
||||
const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
|
||||
const responseNeedsNormalization = ("total_count" in response.data || "total_commits" in response.data) && !("url" in response.data);
|
||||
if (!responseNeedsNormalization) return response;
|
||||
const incompleteResults = response.data.incomplete_results;
|
||||
const repositorySelection = response.data.repository_selection;
|
||||
const totalCount = response.data.total_count;
|
||||
const totalCommits = response.data.total_commits;
|
||||
delete response.data.incomplete_results;
|
||||
delete response.data.repository_selection;
|
||||
delete response.data.total_count;
|
||||
delete response.data.total_commits;
|
||||
const namespaceKey = Object.keys(response.data)[0];
|
||||
const data = response.data[namespaceKey];
|
||||
response.data = data;
|
||||
@@ -36075,6 +36150,7 @@ function normalizePaginatedListResponse(response) {
|
||||
response.data.repository_selection = repositorySelection;
|
||||
}
|
||||
response.data.total_count = totalCount;
|
||||
response.data.total_commits = totalCommits;
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -36095,6 +36171,16 @@ function iterator(octokit, route, parameters) {
|
||||
url = ((normalizedResponse.headers.link || "").match(
|
||||
/<([^<>]+)>;\s*rel="next"/
|
||||
) || [])[1];
|
||||
if (!url && "total_commits" in normalizedResponse.data) {
|
||||
const parsedUrl = new URL(normalizedResponse.url);
|
||||
const params = parsedUrl.searchParams;
|
||||
const page = parseInt(params.get("page") || "1", 10);
|
||||
const per_page = parseInt(params.get("per_page") || "250", 10);
|
||||
if (page * per_page < normalizedResponse.data.total_commits) {
|
||||
params.set("page", String(page + 1));
|
||||
url = parsedUrl.toString();
|
||||
}
|
||||
}
|
||||
return { value: normalizedResponse };
|
||||
} catch (error) {
|
||||
if (error.status !== 409) throw error;
|
||||
@@ -36289,6 +36375,8 @@ var paginatingEndpoints = [
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/check-suites",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/status",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/statuses",
|
||||
"GET /repos/{owner}/{repo}/compare/{basehead}",
|
||||
"GET /repos/{owner}/{repo}/compare/{base}...{head}",
|
||||
"GET /repos/{owner}/{repo}/contributors",
|
||||
"GET /repos/{owner}/{repo}/dependabot/alerts",
|
||||
"GET /repos/{owner}/{repo}/dependabot/secrets",
|
||||
|
||||
+86
-3
@@ -28205,6 +28205,74 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KNOWN_CHECKSUMS = void 0;
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
exports.KNOWN_CHECKSUMS = {
|
||||
"aarch64-apple-darwin-0.12.8": "d7ddfc029858b97452e728c229b0378e3dde5300b23df5cc5c77296025971379",
|
||||
"aarch64-pc-windows-msvc-0.12.8": "99cedac1f9b7a321a0e2b81ded68bbaf5dbff6aedac528766eda50d3871ccce9",
|
||||
"aarch64-unknown-linux-gnu-0.12.8": "fc4a79cfe90c8e4f7bfdad2198e939b70416916a7e90f687f30490b25e2171d6",
|
||||
"aarch64-unknown-linux-musl-0.12.8": "6840915d3f11a32ac00368206d7a4c957d2d499bc324ab39a3a0a851fda07dc2",
|
||||
"arm-unknown-linux-musleabihf-0.12.8": "cf549a91db1de22bde9562725d748625a23d41050f2e3ef9a6dca0b6abaa3ca3",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.8": "b69472a32bc355f7cbc61d939d3ea1cbf1ab42f1bddd56f4ad53af1a372dab55",
|
||||
"armv7-unknown-linux-musleabihf-0.12.8": "0de514e00cfccff21fd52315f439e52ac95f02539487a78ea864df5d8627e77e",
|
||||
"i686-pc-windows-msvc-0.12.8": "50bd0eea8f4dc8a94a96cc64f3f61163421f02230672e12b5a91068c7585f7e1",
|
||||
"i686-unknown-linux-gnu-0.12.8": "3363c9c7b41fec9ad680f9bb32b65fffb30bd582e0fc2ae5d3ee8c51e3fc8347",
|
||||
"i686-unknown-linux-musl-0.12.8": "73dbe5b0718322479e7e78abf598c626d7ffc8cf10a2ebc54524fb0e0118fa37",
|
||||
"powerpc64-unknown-linux-gnu-0.12.8": "570dda0a1f5683eb2124491356694fcd2d5b13efc43f2b2f7315fe187fc2add5",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.8": "73bab12d97b6ecd54d8e338f57ab90b3c06e6bdb965bd9ea1613a2c11eb24256",
|
||||
"s390x-unknown-linux-gnu-0.12.8": "001f98c87871a617fda8addc74954b79b8c10875feade4a187de79daf8613fcc",
|
||||
"x86_64-apple-darwin-0.12.8": "5c795cae1956a1d1c84e1d93c952b627da1541311fdbb09885bf9d80b0e2cc42",
|
||||
"x86_64-pc-windows-msvc-0.12.8": "223d7691fc68bfcfb0bbefa35e5d63998721367404573d883e97583fe73a7682",
|
||||
"x86_64-unknown-linux-gnu-0.12.8": "ac0edfd0935dfedc884f2ddeab6705b4875e7e84aa9f1c7af78233492ebecdb0",
|
||||
"x86_64-unknown-linux-musl-0.12.8": "0062142b6277177f196a9dd7cf1bcf10f536f8a33c458d258525504f94760227",
|
||||
"aarch64-apple-darwin-0.12.7": "86b39b4002bb12588af972ad56cfddc1eaa0879c4badb07f0021fae77b5cd958",
|
||||
"aarch64-pc-windows-msvc-0.12.7": "35b51d47463eebfc2d39863222a19540e73ddda5b1662b88e774580a7ac526a4",
|
||||
"aarch64-unknown-linux-gnu-0.12.7": "0d4bb492a02cf191a2e1e058cf819c2ed86c05ea444de5e3895ba75c890a9804",
|
||||
"aarch64-unknown-linux-musl-0.12.7": "5f97261a334af4f4ba41baa5cea0f0dfd8d732d9ab22beb5bf0639804389bfa3",
|
||||
"arm-unknown-linux-musleabihf-0.12.7": "ec0d3cf0c6721b1c4c7480995d8a538b217c9dcf37f64389f05a0bea7ff308b9",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.7": "59f8f6d19faa61f3ca6e7127a3e34470028bed90e40bebacf7c8be48d3080140",
|
||||
"armv7-unknown-linux-musleabihf-0.12.7": "6ce861317f812b69c68a92c6f6afbb68b99bab4525758b9bad659f94a6fd2429",
|
||||
"i686-pc-windows-msvc-0.12.7": "becca8cf66388f2532477ad28fae2bd3ccfda8635f4fd68d7139914020203ff6",
|
||||
"i686-unknown-linux-gnu-0.12.7": "65bbeba7444f62cc403591999d7bfbf3aec0e2ecae869c969c9faf096a737279",
|
||||
"i686-unknown-linux-musl-0.12.7": "0fd4cc8e5f2f02acd208482da316fdb4ecc2179d11bf0aa61d7622ba7100e889",
|
||||
"powerpc64-unknown-linux-gnu-0.12.7": "81efd82ed616aa951499cf4012420adfbc4cac0b39375623bbecbf79a4d08098",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.7": "46360fc4d0b498a3ebfc9ee73ee6b2b59db3ace21dbf12ba41e5fb15dfb71364",
|
||||
"s390x-unknown-linux-gnu-0.12.7": "ef03f40de21e9eed3e66626d3af768b3f9a82cd2e8cd62bc887bcd206a2ccdce",
|
||||
"x86_64-apple-darwin-0.12.7": "f0179a587d5509f32ab16bd95cdf64ddcebc80d653e3674161d366312a4eaf7a",
|
||||
"x86_64-pc-windows-msvc-0.12.7": "12a239698d4f0926523cb51a9b00a560615d6237e9a748c563a74f4708f4abdf",
|
||||
"x86_64-unknown-linux-gnu-0.12.7": "65b1ec7ba8feda6cbe52aec168f32e5c276577065914fca922b9a8b3f42db433",
|
||||
"x86_64-unknown-linux-musl-0.12.7": "58aeb49137d0a9df810ba26c778d10d612f8c1439439527a6a95c90ea318c7c5",
|
||||
"aarch64-apple-darwin-0.12.5": "8819b61cff645c1d1671df331bb57c1ab230094b686942bccedde1f888feb522",
|
||||
"aarch64-pc-windows-msvc-0.12.5": "b5f06365b87c4d90de76dbd17379db937faa49cd37a931f1908e7c94a604dcd4",
|
||||
"aarch64-unknown-linux-gnu-0.12.5": "6d00576ccef50b5627ded90879430acd40d590bbc7b354af0549f41fe2f58fcf",
|
||||
"aarch64-unknown-linux-musl-0.12.5": "f147ccdbe26d35f2752c6d97d158bc8e3b4d1833d283748fc48f350c698a6f7b",
|
||||
"arm-unknown-linux-musleabihf-0.12.5": "c6aaa6d90cd2abad0650e968defa8e30dd065ea05ef6391716302cc8e6e34287",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.5": "e479a5f64160f814b44415ccdc834b0f85b539bc286eb8c09199a7aeefa6bf06",
|
||||
"armv7-unknown-linux-musleabihf-0.12.5": "04b7b507752e6f62fffefa3d02d31e96a7e8fb31f699dbc83fb814d7c3c4bb15",
|
||||
"i686-pc-windows-msvc-0.12.5": "a0c5b5be39841055fa7b4255cbcc9e8761a1328f461d2335dd53cc195b7c51bb",
|
||||
"i686-unknown-linux-gnu-0.12.5": "0c95dc3c5711fccccf26a1aef9a620d6a1fd2faa8485e38ec91d836f7d2200e1",
|
||||
"i686-unknown-linux-musl-0.12.5": "d223f9db886191de0c80c5e2519f413dce0281080f6bc9eecbaff18e2c474d52",
|
||||
"powerpc64-unknown-linux-gnu-0.12.5": "c436a319fec80a7b23591fbd15b2c224a3b30a5c0dc257d150f684a8c45dc147",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.5": "26ccf69bb0a6b98b8ad0d7e566acacbd86e2fbbd734ea98b854e40237905a9c9",
|
||||
"s390x-unknown-linux-gnu-0.12.5": "c8f8ef8f4ce2930085f7e3e17ee58936938b41c9753c2a9aeab0a6473138887a",
|
||||
"x86_64-apple-darwin-0.12.5": "5af0b2931581a5ed91743c9f669c23cb0db9bb1f0c49f8695ad1443dbc6a9e50",
|
||||
"x86_64-pc-windows-msvc-0.12.5": "91b88d365f60e3b641d5204a87d56275cd1b4a869f939b637b06e1d6e9fd38e1",
|
||||
"x86_64-unknown-linux-gnu-0.12.5": "1ef5e978c41c67feaa5447d97a4400f5f0136c92d6507a876d81f1a2fd64d154",
|
||||
"x86_64-unknown-linux-musl-0.12.5": "79beb4eac07beaea24774709eeb88a87115f1b53f857dcc1155431e642e01ade",
|
||||
"aarch64-apple-darwin-0.12.4": "be7dc64e69a31b1bb9e875274778c1b65c9470ff18214232aa35fc843e5a6826",
|
||||
"aarch64-pc-windows-msvc-0.12.4": "859739ae8f64f39512f637ecc56ca12adfdc0d45f79f2ce1ba53d5111d92e753",
|
||||
"aarch64-unknown-linux-gnu-0.12.4": "8ce8faaeeb277f7481eb6fb21d1073365f1e633513f67542d245fad2aeebabca",
|
||||
"aarch64-unknown-linux-musl-0.12.4": "adab1c084dbe508c134a354e277b6706da98e89c84aee619cbff37fff5f0b8fc",
|
||||
"arm-unknown-linux-musleabihf-0.12.4": "0357e038b60ef8c879d625474f0c93e31601a3e648836ccf4dfcf85ffa7897d3",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.4": "dd6f50075a6b02878d35b21a192ba6ec1a7b43be21b882f6363cceac19e457f7",
|
||||
"armv7-unknown-linux-musleabihf-0.12.4": "1286d7520f616f797427a492e51f2f53248505661c86ed30d141379f595ad049",
|
||||
"i686-pc-windows-msvc-0.12.4": "5f6a09e123059e7b434edc68b5ed5e8d2af8156cf10506a3587c51ecc1ffcab1",
|
||||
"i686-unknown-linux-gnu-0.12.4": "a19cc2babc73065184e60ee41a1157e94f290261175cbc51b11038ebb0dde84a",
|
||||
"i686-unknown-linux-musl-0.12.4": "c230fe5125497ba667bbe554759bdbd43d7e45855762ce35afc7e1bccd4300ed",
|
||||
"powerpc64-unknown-linux-gnu-0.12.4": "d8f029b295985aeb0ec877e232d43f56e452792e8edabcc82b1094ac2d07c006",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.4": "60ac64921ff538beb3cbe8d91b56bda14dffaa7f4c398ebbedb0ff358b1c71c8",
|
||||
"s390x-unknown-linux-gnu-0.12.4": "78319ca0b164c84cb8a0f8bbe13372c9dd4d26cbc286b78c34bb5e947695fe08",
|
||||
"x86_64-apple-darwin-0.12.4": "2c829e3128354900495ad91d0401e2284e70121bae67cfcb264eea3a639381a5",
|
||||
"x86_64-pc-windows-msvc-0.12.4": "0fcadba5764177cc79d3b1bdf56481e71977dd167efd1073f9db9b719e34ed38",
|
||||
"x86_64-unknown-linux-gnu-0.12.4": "bc783b6b4b4a253ec2d9baf5ce559aa3a41570a14ae865cac3cdd11ef28403a7",
|
||||
"x86_64-unknown-linux-musl-0.12.4": "41117fc1c67eb9572c50403297bd5fcb8cec99d8a1566badec7ff1a03f8a356d",
|
||||
"aarch64-apple-darwin-0.12.3": "5769e4841870d1f7c17f12a7d1437222e8035eded52f93c54c035c770dbffebb",
|
||||
"aarch64-pc-windows-msvc-0.12.3": "25056f8a5ca19f87e4d8e13b744077ad47e122dbef454a6ecf572d9d92d5dbf1",
|
||||
"aarch64-unknown-linux-gnu-0.12.3": "d63a773c9e2854d4d726bc8ac0d919736e8f8e683b5a54caea0ad470ce233f0c",
|
||||
@@ -30711,13 +30779,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const core_1 = __nccwpck_require__(767);
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const core_1 = __nccwpck_require__(767);
|
||||
const plugin_paginate_rest_1 = __nccwpck_require__(3779);
|
||||
const plugin_rest_endpoint_methods_1 = __nccwpck_require__(9210);
|
||||
const constants_1 = __nccwpck_require__(6156);
|
||||
const semver = __importStar(__nccwpck_require__(9318));
|
||||
const update_known_checksums_1 = __nccwpck_require__(6182);
|
||||
const constants_1 = __nccwpck_require__(6156);
|
||||
const PaginatingOctokit = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.restEndpointMethods);
|
||||
async function run() {
|
||||
const checksumFilePath = process.argv.slice(2)[0];
|
||||
@@ -33922,14 +33990,16 @@ function normalizePaginatedListResponse(response) {
|
||||
data: []
|
||||
};
|
||||
}
|
||||
const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
|
||||
const responseNeedsNormalization = ("total_count" in response.data || "total_commits" in response.data) && !("url" in response.data);
|
||||
if (!responseNeedsNormalization) return response;
|
||||
const incompleteResults = response.data.incomplete_results;
|
||||
const repositorySelection = response.data.repository_selection;
|
||||
const totalCount = response.data.total_count;
|
||||
const totalCommits = response.data.total_commits;
|
||||
delete response.data.incomplete_results;
|
||||
delete response.data.repository_selection;
|
||||
delete response.data.total_count;
|
||||
delete response.data.total_commits;
|
||||
const namespaceKey = Object.keys(response.data)[0];
|
||||
const data = response.data[namespaceKey];
|
||||
response.data = data;
|
||||
@@ -33940,6 +34010,7 @@ function normalizePaginatedListResponse(response) {
|
||||
response.data.repository_selection = repositorySelection;
|
||||
}
|
||||
response.data.total_count = totalCount;
|
||||
response.data.total_commits = totalCommits;
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -33960,6 +34031,16 @@ function iterator(octokit, route, parameters) {
|
||||
url = ((normalizedResponse.headers.link || "").match(
|
||||
/<([^<>]+)>;\s*rel="next"/
|
||||
) || [])[1];
|
||||
if (!url && "total_commits" in normalizedResponse.data) {
|
||||
const parsedUrl = new URL(normalizedResponse.url);
|
||||
const params = parsedUrl.searchParams;
|
||||
const page = parseInt(params.get("page") || "1", 10);
|
||||
const per_page = parseInt(params.get("per_page") || "250", 10);
|
||||
if (page * per_page < normalizedResponse.data.total_commits) {
|
||||
params.set("page", String(page + 1));
|
||||
url = parsedUrl.toString();
|
||||
}
|
||||
}
|
||||
return { value: normalizedResponse };
|
||||
} catch (error) {
|
||||
if (error.status !== 409) throw error;
|
||||
@@ -34154,6 +34235,8 @@ var paginatingEndpoints = [
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/check-suites",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/status",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/statuses",
|
||||
"GET /repos/{owner}/{repo}/compare/{basehead}",
|
||||
"GET /repos/{owner}/{repo}/compare/{base}...{head}",
|
||||
"GET /repos/{owner}/{repo}/contributors",
|
||||
"GET /repos/{owner}/{repo}/dependabot/alerts",
|
||||
"GET /repos/{owner}/{repo}/dependabot/secrets",
|
||||
|
||||
Generated
+61
-53
@@ -13,19 +13,19 @@
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/tool-cache": "^2.0.2",
|
||||
"@octokit/core": "^7.0.3",
|
||||
"@octokit/plugin-paginate-rest": "^13.0.1",
|
||||
"@octokit/plugin-paginate-rest": "^13.1.1",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^16.0.0",
|
||||
"@renovatebot/pep440": "^4.1.0",
|
||||
"smol-toml": "^1.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.9.4",
|
||||
"@biomejs/biome": "2.1.4",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^24.0.13",
|
||||
"@types/node": "^24.2.1",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"typescript": "^5.8.3"
|
||||
"typescript": "^5.9.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
@@ -72,11 +72,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/biome": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.9.4.tgz",
|
||||
"integrity": "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==",
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.1.4.tgz",
|
||||
"integrity": "sha512-QWlrqyxsU0FCebuMnkvBIkxvPqH89afiJzjMl+z67ybutse590jgeaFdDurE9XYtzpjRGTI1tlUZPGWmbKsElA==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"bin": {
|
||||
"biome": "bin/biome"
|
||||
},
|
||||
@@ -88,24 +88,25 @@
|
||||
"url": "https://opencollective.com/biome"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@biomejs/cli-darwin-arm64": "1.9.4",
|
||||
"@biomejs/cli-darwin-x64": "1.9.4",
|
||||
"@biomejs/cli-linux-arm64": "1.9.4",
|
||||
"@biomejs/cli-linux-arm64-musl": "1.9.4",
|
||||
"@biomejs/cli-linux-x64": "1.9.4",
|
||||
"@biomejs/cli-linux-x64-musl": "1.9.4",
|
||||
"@biomejs/cli-win32-arm64": "1.9.4",
|
||||
"@biomejs/cli-win32-x64": "1.9.4"
|
||||
"@biomejs/cli-darwin-arm64": "2.1.4",
|
||||
"@biomejs/cli-darwin-x64": "2.1.4",
|
||||
"@biomejs/cli-linux-arm64": "2.1.4",
|
||||
"@biomejs/cli-linux-arm64-musl": "2.1.4",
|
||||
"@biomejs/cli-linux-x64": "2.1.4",
|
||||
"@biomejs/cli-linux-x64-musl": "2.1.4",
|
||||
"@biomejs/cli-win32-arm64": "2.1.4",
|
||||
"@biomejs/cli-win32-x64": "2.1.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-darwin-arm64": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.9.4.tgz",
|
||||
"integrity": "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==",
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.1.4.tgz",
|
||||
"integrity": "sha512-sCrNENE74I9MV090Wq/9Dg7EhPudx3+5OiSoQOkIe3DLPzFARuL1dOwCWhKCpA3I5RHmbrsbNSRfZwCabwd8Qg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
@@ -115,13 +116,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-darwin-x64": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.9.4.tgz",
|
||||
"integrity": "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==",
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.1.4.tgz",
|
||||
"integrity": "sha512-gOEICJbTCy6iruBywBDcG4X5rHMbqCPs3clh3UQ+hRKlgvJTk4NHWQAyHOXvaLe+AxD1/TNX1jbZeffBJzcrOw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
@@ -131,13 +133,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-linux-arm64": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.9.4.tgz",
|
||||
"integrity": "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==",
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.1.4.tgz",
|
||||
"integrity": "sha512-juhEkdkKR4nbUi5k/KRp1ocGPNWLgFRD4NrHZSveYrD6i98pyvuzmS9yFYgOZa5JhaVqo0HPnci0+YuzSwT2fw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -147,13 +150,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-linux-arm64-musl": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.9.4.tgz",
|
||||
"integrity": "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==",
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.1.4.tgz",
|
||||
"integrity": "sha512-nYr7H0CyAJPaLupFE2cH16KZmRC5Z9PEftiA2vWxk+CsFkPZQ6dBRdcC6RuS+zJlPc/JOd8xw3uCCt9Pv41WvQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -163,13 +167,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-linux-x64": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.9.4.tgz",
|
||||
"integrity": "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==",
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.1.4.tgz",
|
||||
"integrity": "sha512-Eoy9ycbhpJVYuR+LskV9s3uyaIkp89+qqgqhGQsWnp/I02Uqg2fXFblHJOpGZR8AxdB9ADy87oFVxn9MpFKUrw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -179,13 +184,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-linux-x64-musl": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.9.4.tgz",
|
||||
"integrity": "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==",
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.1.4.tgz",
|
||||
"integrity": "sha512-lvwvb2SQQHctHUKvBKptR6PLFCM7JfRjpCCrDaTmvB7EeZ5/dQJPhTYBf36BE/B4CRWR2ZiBLRYhK7hhXBCZAg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -195,13 +201,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-win32-arm64": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.9.4.tgz",
|
||||
"integrity": "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==",
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.1.4.tgz",
|
||||
"integrity": "sha512-3WRYte7orvyi6TRfIZkDN9Jzoogbv+gSvR+b9VOXUg1We1XrjBg6WljADeVEaKTvOcpVdH0a90TwyOQ6ue4fGw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
@@ -211,13 +218,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-win32-x64": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.9.4.tgz",
|
||||
"integrity": "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==",
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.1.4.tgz",
|
||||
"integrity": "sha512-tBc+W7anBPSFXGAoQW+f/+svkpt8/uXfRwDzN1DvnatkRMt16KIYpEi/iw8u9GahJlFv98kgHcIrSsZHZTR0sw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
@@ -295,9 +303,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@octokit/plugin-paginate-rest": {
|
||||
"version": "13.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-13.0.1.tgz",
|
||||
"integrity": "sha512-m1KvHlueScy4mQJWvFDCxFBTIdXS0K1SgFGLmqHyX90mZdCIv6gWBbKRhatxRjhGlONuTK/hztYdaqrTXcFZdQ==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-13.1.1.tgz",
|
||||
"integrity": "sha512-q9iQGlZlxAVNRN2jDNskJW/Cafy7/XE52wjZ5TTvyhyOD904Cvx//DNyoO3J/MXJ0ve3rPoNWKEg5iZrisQSuw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^14.1.0"
|
||||
@@ -379,13 +387,13 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "24.0.13",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.13.tgz",
|
||||
"integrity": "sha512-Qm9OYVOFHFYg3wJoTSrz80hoec5Lia/dPp84do3X7dZvLikQvM1YpmvTBEdIr/e+U8HTkFjLHLnl78K/qjf+jQ==",
|
||||
"version": "24.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz",
|
||||
"integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~7.8.0"
|
||||
"undici-types": "~7.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/semver": {
|
||||
@@ -473,9 +481,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.8.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
|
||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
||||
"version": "5.9.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz",
|
||||
"integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
@@ -499,9 +507,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
|
||||
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
|
||||
"version": "7.10.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz",
|
||||
"integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
||||
+6
-8
@@ -6,13 +6,11 @@
|
||||
"main": "dist/ruff-action/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"format": "biome format --fix",
|
||||
"format-check": "biome format",
|
||||
"lint": "biome lint --fix",
|
||||
"check": "biome check --write",
|
||||
"package": "ncc build -o dist/ruff-action src/ruff-action.ts && ncc build -o dist/update-known-checksums src/update-known-checksums.ts",
|
||||
"act": "act pull_request -W .github/workflows/test.yml --container-architecture linux/amd64 -s GITHUB_TOKEN=\"$(gh auth token)\"",
|
||||
"update-known-checksums": "RUNNER_TEMP=known_checksums node dist/update-known-checksums/index.js src/download/checksum/known-checksums.ts \"$(gh auth token)\"",
|
||||
"all": "npm install && npm run build && npm run format && npm run lint && npm run package"
|
||||
"all": "npm install && npm run build && npm run check && npm run package"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -26,18 +24,18 @@
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/tool-cache": "^2.0.2",
|
||||
"@octokit/core": "^7.0.3",
|
||||
"@octokit/plugin-paginate-rest": "^13.0.1",
|
||||
"@octokit/plugin-paginate-rest": "^13.1.1",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^16.0.0",
|
||||
"@renovatebot/pep440": "^4.1.0",
|
||||
"smol-toml": "^1.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.9.4",
|
||||
"@biomejs/biome": "2.1.4",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^24.0.13",
|
||||
"@types/node": "^24.2.1",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"typescript": "^5.8.3"
|
||||
"typescript": "^5.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as fs from "node:fs";
|
||||
import * as crypto from "node:crypto";
|
||||
import * as fs from "node:fs";
|
||||
|
||||
import * as core from "@actions/core";
|
||||
import { KNOWN_CHECKSUMS } from "./known-checksums";
|
||||
import type { Architecture, Platform } from "../../utils/platforms";
|
||||
import { KNOWN_CHECKSUMS } from "./known-checksums";
|
||||
|
||||
export async function validateChecksum(
|
||||
checkSum: string | undefined,
|
||||
@@ -12,7 +12,7 @@ export async function validateChecksum(
|
||||
platform: Platform,
|
||||
version: string,
|
||||
): Promise<void> {
|
||||
let isValid: boolean | undefined = undefined;
|
||||
let isValid: boolean | undefined;
|
||||
if (checkSum !== undefined && checkSum !== "") {
|
||||
isValid = await validateFileCheckSum(downloadPath, checkSum);
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,141 @@
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
||||
"aarch64-apple-darwin-0.12.8":
|
||||
"d7ddfc029858b97452e728c229b0378e3dde5300b23df5cc5c77296025971379",
|
||||
"aarch64-pc-windows-msvc-0.12.8":
|
||||
"99cedac1f9b7a321a0e2b81ded68bbaf5dbff6aedac528766eda50d3871ccce9",
|
||||
"aarch64-unknown-linux-gnu-0.12.8":
|
||||
"fc4a79cfe90c8e4f7bfdad2198e939b70416916a7e90f687f30490b25e2171d6",
|
||||
"aarch64-unknown-linux-musl-0.12.8":
|
||||
"6840915d3f11a32ac00368206d7a4c957d2d499bc324ab39a3a0a851fda07dc2",
|
||||
"arm-unknown-linux-musleabihf-0.12.8":
|
||||
"cf549a91db1de22bde9562725d748625a23d41050f2e3ef9a6dca0b6abaa3ca3",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.8":
|
||||
"b69472a32bc355f7cbc61d939d3ea1cbf1ab42f1bddd56f4ad53af1a372dab55",
|
||||
"armv7-unknown-linux-musleabihf-0.12.8":
|
||||
"0de514e00cfccff21fd52315f439e52ac95f02539487a78ea864df5d8627e77e",
|
||||
"i686-pc-windows-msvc-0.12.8":
|
||||
"50bd0eea8f4dc8a94a96cc64f3f61163421f02230672e12b5a91068c7585f7e1",
|
||||
"i686-unknown-linux-gnu-0.12.8":
|
||||
"3363c9c7b41fec9ad680f9bb32b65fffb30bd582e0fc2ae5d3ee8c51e3fc8347",
|
||||
"i686-unknown-linux-musl-0.12.8":
|
||||
"73dbe5b0718322479e7e78abf598c626d7ffc8cf10a2ebc54524fb0e0118fa37",
|
||||
"powerpc64-unknown-linux-gnu-0.12.8":
|
||||
"570dda0a1f5683eb2124491356694fcd2d5b13efc43f2b2f7315fe187fc2add5",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.8":
|
||||
"73bab12d97b6ecd54d8e338f57ab90b3c06e6bdb965bd9ea1613a2c11eb24256",
|
||||
"s390x-unknown-linux-gnu-0.12.8":
|
||||
"001f98c87871a617fda8addc74954b79b8c10875feade4a187de79daf8613fcc",
|
||||
"x86_64-apple-darwin-0.12.8":
|
||||
"5c795cae1956a1d1c84e1d93c952b627da1541311fdbb09885bf9d80b0e2cc42",
|
||||
"x86_64-pc-windows-msvc-0.12.8":
|
||||
"223d7691fc68bfcfb0bbefa35e5d63998721367404573d883e97583fe73a7682",
|
||||
"x86_64-unknown-linux-gnu-0.12.8":
|
||||
"ac0edfd0935dfedc884f2ddeab6705b4875e7e84aa9f1c7af78233492ebecdb0",
|
||||
"x86_64-unknown-linux-musl-0.12.8":
|
||||
"0062142b6277177f196a9dd7cf1bcf10f536f8a33c458d258525504f94760227",
|
||||
"aarch64-apple-darwin-0.12.7":
|
||||
"86b39b4002bb12588af972ad56cfddc1eaa0879c4badb07f0021fae77b5cd958",
|
||||
"aarch64-pc-windows-msvc-0.12.7":
|
||||
"35b51d47463eebfc2d39863222a19540e73ddda5b1662b88e774580a7ac526a4",
|
||||
"aarch64-unknown-linux-gnu-0.12.7":
|
||||
"0d4bb492a02cf191a2e1e058cf819c2ed86c05ea444de5e3895ba75c890a9804",
|
||||
"aarch64-unknown-linux-musl-0.12.7":
|
||||
"5f97261a334af4f4ba41baa5cea0f0dfd8d732d9ab22beb5bf0639804389bfa3",
|
||||
"arm-unknown-linux-musleabihf-0.12.7":
|
||||
"ec0d3cf0c6721b1c4c7480995d8a538b217c9dcf37f64389f05a0bea7ff308b9",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.7":
|
||||
"59f8f6d19faa61f3ca6e7127a3e34470028bed90e40bebacf7c8be48d3080140",
|
||||
"armv7-unknown-linux-musleabihf-0.12.7":
|
||||
"6ce861317f812b69c68a92c6f6afbb68b99bab4525758b9bad659f94a6fd2429",
|
||||
"i686-pc-windows-msvc-0.12.7":
|
||||
"becca8cf66388f2532477ad28fae2bd3ccfda8635f4fd68d7139914020203ff6",
|
||||
"i686-unknown-linux-gnu-0.12.7":
|
||||
"65bbeba7444f62cc403591999d7bfbf3aec0e2ecae869c969c9faf096a737279",
|
||||
"i686-unknown-linux-musl-0.12.7":
|
||||
"0fd4cc8e5f2f02acd208482da316fdb4ecc2179d11bf0aa61d7622ba7100e889",
|
||||
"powerpc64-unknown-linux-gnu-0.12.7":
|
||||
"81efd82ed616aa951499cf4012420adfbc4cac0b39375623bbecbf79a4d08098",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.7":
|
||||
"46360fc4d0b498a3ebfc9ee73ee6b2b59db3ace21dbf12ba41e5fb15dfb71364",
|
||||
"s390x-unknown-linux-gnu-0.12.7":
|
||||
"ef03f40de21e9eed3e66626d3af768b3f9a82cd2e8cd62bc887bcd206a2ccdce",
|
||||
"x86_64-apple-darwin-0.12.7":
|
||||
"f0179a587d5509f32ab16bd95cdf64ddcebc80d653e3674161d366312a4eaf7a",
|
||||
"x86_64-pc-windows-msvc-0.12.7":
|
||||
"12a239698d4f0926523cb51a9b00a560615d6237e9a748c563a74f4708f4abdf",
|
||||
"x86_64-unknown-linux-gnu-0.12.7":
|
||||
"65b1ec7ba8feda6cbe52aec168f32e5c276577065914fca922b9a8b3f42db433",
|
||||
"x86_64-unknown-linux-musl-0.12.7":
|
||||
"58aeb49137d0a9df810ba26c778d10d612f8c1439439527a6a95c90ea318c7c5",
|
||||
"aarch64-apple-darwin-0.12.5":
|
||||
"8819b61cff645c1d1671df331bb57c1ab230094b686942bccedde1f888feb522",
|
||||
"aarch64-pc-windows-msvc-0.12.5":
|
||||
"b5f06365b87c4d90de76dbd17379db937faa49cd37a931f1908e7c94a604dcd4",
|
||||
"aarch64-unknown-linux-gnu-0.12.5":
|
||||
"6d00576ccef50b5627ded90879430acd40d590bbc7b354af0549f41fe2f58fcf",
|
||||
"aarch64-unknown-linux-musl-0.12.5":
|
||||
"f147ccdbe26d35f2752c6d97d158bc8e3b4d1833d283748fc48f350c698a6f7b",
|
||||
"arm-unknown-linux-musleabihf-0.12.5":
|
||||
"c6aaa6d90cd2abad0650e968defa8e30dd065ea05ef6391716302cc8e6e34287",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.5":
|
||||
"e479a5f64160f814b44415ccdc834b0f85b539bc286eb8c09199a7aeefa6bf06",
|
||||
"armv7-unknown-linux-musleabihf-0.12.5":
|
||||
"04b7b507752e6f62fffefa3d02d31e96a7e8fb31f699dbc83fb814d7c3c4bb15",
|
||||
"i686-pc-windows-msvc-0.12.5":
|
||||
"a0c5b5be39841055fa7b4255cbcc9e8761a1328f461d2335dd53cc195b7c51bb",
|
||||
"i686-unknown-linux-gnu-0.12.5":
|
||||
"0c95dc3c5711fccccf26a1aef9a620d6a1fd2faa8485e38ec91d836f7d2200e1",
|
||||
"i686-unknown-linux-musl-0.12.5":
|
||||
"d223f9db886191de0c80c5e2519f413dce0281080f6bc9eecbaff18e2c474d52",
|
||||
"powerpc64-unknown-linux-gnu-0.12.5":
|
||||
"c436a319fec80a7b23591fbd15b2c224a3b30a5c0dc257d150f684a8c45dc147",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.5":
|
||||
"26ccf69bb0a6b98b8ad0d7e566acacbd86e2fbbd734ea98b854e40237905a9c9",
|
||||
"s390x-unknown-linux-gnu-0.12.5":
|
||||
"c8f8ef8f4ce2930085f7e3e17ee58936938b41c9753c2a9aeab0a6473138887a",
|
||||
"x86_64-apple-darwin-0.12.5":
|
||||
"5af0b2931581a5ed91743c9f669c23cb0db9bb1f0c49f8695ad1443dbc6a9e50",
|
||||
"x86_64-pc-windows-msvc-0.12.5":
|
||||
"91b88d365f60e3b641d5204a87d56275cd1b4a869f939b637b06e1d6e9fd38e1",
|
||||
"x86_64-unknown-linux-gnu-0.12.5":
|
||||
"1ef5e978c41c67feaa5447d97a4400f5f0136c92d6507a876d81f1a2fd64d154",
|
||||
"x86_64-unknown-linux-musl-0.12.5":
|
||||
"79beb4eac07beaea24774709eeb88a87115f1b53f857dcc1155431e642e01ade",
|
||||
"aarch64-apple-darwin-0.12.4":
|
||||
"be7dc64e69a31b1bb9e875274778c1b65c9470ff18214232aa35fc843e5a6826",
|
||||
"aarch64-pc-windows-msvc-0.12.4":
|
||||
"859739ae8f64f39512f637ecc56ca12adfdc0d45f79f2ce1ba53d5111d92e753",
|
||||
"aarch64-unknown-linux-gnu-0.12.4":
|
||||
"8ce8faaeeb277f7481eb6fb21d1073365f1e633513f67542d245fad2aeebabca",
|
||||
"aarch64-unknown-linux-musl-0.12.4":
|
||||
"adab1c084dbe508c134a354e277b6706da98e89c84aee619cbff37fff5f0b8fc",
|
||||
"arm-unknown-linux-musleabihf-0.12.4":
|
||||
"0357e038b60ef8c879d625474f0c93e31601a3e648836ccf4dfcf85ffa7897d3",
|
||||
"armv7-unknown-linux-gnueabihf-0.12.4":
|
||||
"dd6f50075a6b02878d35b21a192ba6ec1a7b43be21b882f6363cceac19e457f7",
|
||||
"armv7-unknown-linux-musleabihf-0.12.4":
|
||||
"1286d7520f616f797427a492e51f2f53248505661c86ed30d141379f595ad049",
|
||||
"i686-pc-windows-msvc-0.12.4":
|
||||
"5f6a09e123059e7b434edc68b5ed5e8d2af8156cf10506a3587c51ecc1ffcab1",
|
||||
"i686-unknown-linux-gnu-0.12.4":
|
||||
"a19cc2babc73065184e60ee41a1157e94f290261175cbc51b11038ebb0dde84a",
|
||||
"i686-unknown-linux-musl-0.12.4":
|
||||
"c230fe5125497ba667bbe554759bdbd43d7e45855762ce35afc7e1bccd4300ed",
|
||||
"powerpc64-unknown-linux-gnu-0.12.4":
|
||||
"d8f029b295985aeb0ec877e232d43f56e452792e8edabcc82b1094ac2d07c006",
|
||||
"powerpc64le-unknown-linux-gnu-0.12.4":
|
||||
"60ac64921ff538beb3cbe8d91b56bda14dffaa7f4c398ebbedb0ff358b1c71c8",
|
||||
"s390x-unknown-linux-gnu-0.12.4":
|
||||
"78319ca0b164c84cb8a0f8bbe13372c9dd4d26cbc286b78c34bb5e947695fe08",
|
||||
"x86_64-apple-darwin-0.12.4":
|
||||
"2c829e3128354900495ad91d0401e2284e70121bae67cfcb264eea3a639381a5",
|
||||
"x86_64-pc-windows-msvc-0.12.4":
|
||||
"0fcadba5764177cc79d3b1bdf56481e71977dd167efd1073f9db9b719e34ed38",
|
||||
"x86_64-unknown-linux-gnu-0.12.4":
|
||||
"bc783b6b4b4a253ec2d9baf5ce559aa3a41570a14ae865cac3cdd11ef28403a7",
|
||||
"x86_64-unknown-linux-musl-0.12.4":
|
||||
"41117fc1c67eb9572c50403297bd5fcb8cec99d8a1566badec7ff1a03f8a356d",
|
||||
"aarch64-apple-darwin-0.12.3":
|
||||
"5769e4841870d1f7c17f12a7d1437222e8035eded52f93c54c035c770dbffebb",
|
||||
"aarch64-pc-windows-msvc-0.12.3":
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { promises as fs } from "node:fs";
|
||||
import * as path from "node:path";
|
||||
import * as core from "@actions/core";
|
||||
import * as tc from "@actions/tool-cache";
|
||||
import * as path from "node:path";
|
||||
import { promises as fs } from "node:fs";
|
||||
import * as semver from "semver";
|
||||
import * as pep440 from "@renovatebot/pep440";
|
||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
||||
import type { Architecture, Platform } from "../utils/platforms";
|
||||
import { validateChecksum } from "./checksum/checksum";
|
||||
import { Octokit } from "@octokit/core";
|
||||
import { paginateRest } from "@octokit/plugin-paginate-rest";
|
||||
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
||||
import * as pep440 from "@renovatebot/pep440";
|
||||
import * as semver from "semver";
|
||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
||||
import type { Architecture, Platform } from "../utils/platforms";
|
||||
import { validateChecksum } from "./checksum/checksum";
|
||||
|
||||
const PaginatingOctokit = Octokit.plugin(paginateRest, restEndpointMethods);
|
||||
|
||||
@@ -25,7 +25,7 @@ export function tryGetFromToolCache(
|
||||
resolvedVersion = version;
|
||||
}
|
||||
const installedPath = tc.find(TOOL_CACHE_NAME, resolvedVersion, arch);
|
||||
return { version: resolvedVersion, installedPath };
|
||||
return { installedPath, version: resolvedVersion };
|
||||
}
|
||||
|
||||
export async function downloadVersion(
|
||||
@@ -65,7 +65,7 @@ export async function downloadVersion(
|
||||
version,
|
||||
arch,
|
||||
);
|
||||
return { version: version, cachedToolDir };
|
||||
return { cachedToolDir, version: version };
|
||||
}
|
||||
|
||||
function constructDownloadUrl(
|
||||
@@ -158,6 +158,12 @@ async function getReleaseTagNames(
|
||||
owner: OWNER,
|
||||
repo: REPO,
|
||||
});
|
||||
const releaseTagNames = response.map((release) => release.tag_name);
|
||||
if (releaseTagNames.length === 0) {
|
||||
throw Error(
|
||||
"Github API request failed while getting releases. Check the GitHub status page for outages. Try again later.",
|
||||
);
|
||||
}
|
||||
return response.map((release) => release.tag_name);
|
||||
}
|
||||
|
||||
@@ -177,6 +183,9 @@ async function getLatestVersion(githubToken: string) {
|
||||
const octokit = new PaginatingOctokit();
|
||||
latestRelease = await getLatestRelease(octokit);
|
||||
} else {
|
||||
core.error(
|
||||
"Github API request failed while getting latest release. Check the GitHub status page for outages. Try again later.",
|
||||
);
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
+9
-10
@@ -1,18 +1,13 @@
|
||||
import * as fs from "node:fs";
|
||||
import * as path from "node:path";
|
||||
import * as core from "@actions/core";
|
||||
import * as exec from "@actions/exec";
|
||||
import * as path from "node:path";
|
||||
import * as semver from "semver";
|
||||
import {
|
||||
downloadVersion,
|
||||
resolveVersion,
|
||||
tryGetFromToolCache,
|
||||
} from "./download/download-version";
|
||||
|
||||
import {
|
||||
type Architecture,
|
||||
getArch,
|
||||
getPlatform,
|
||||
type Platform,
|
||||
} from "./utils/platforms";
|
||||
import {
|
||||
args,
|
||||
checkSum,
|
||||
@@ -21,9 +16,13 @@ import {
|
||||
version,
|
||||
versionFile as versionFileInput,
|
||||
} from "./utils/inputs";
|
||||
import {
|
||||
type Architecture,
|
||||
getArch,
|
||||
getPlatform,
|
||||
type Platform,
|
||||
} from "./utils/platforms";
|
||||
import { getRuffVersionFromRequirementsFile } from "./utils/pyproject";
|
||||
import * as fs from "node:fs";
|
||||
import * as semver from "semver";
|
||||
|
||||
async function run(): Promise<void> {
|
||||
const platform = getPlatform();
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import { Octokit } from "@octokit/core";
|
||||
import * as core from "@actions/core";
|
||||
import { Octokit } from "@octokit/core";
|
||||
import { paginateRest } from "@octokit/plugin-paginate-rest";
|
||||
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
||||
|
||||
import { OWNER, REPO } from "./utils/constants";
|
||||
import * as semver from "semver";
|
||||
|
||||
import { updateChecksums } from "./download/checksum/update-known-checksums";
|
||||
import { OWNER, REPO } from "./utils/constants";
|
||||
|
||||
const PaginatingOctokit = Octokit.plugin(paginateRest, restEndpointMethods);
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ export type Architecture = "i686" | "x86_64" | "aarch64";
|
||||
export function getArch(): Architecture | undefined {
|
||||
const arch = process.arch;
|
||||
const archMapping: { [key: string]: Architecture } = {
|
||||
arm64: "aarch64",
|
||||
ia32: "i686",
|
||||
x64: "x86_64",
|
||||
arm64: "aarch64",
|
||||
};
|
||||
|
||||
if (arch in archMapping) {
|
||||
@@ -22,8 +22,8 @@ export function getArch(): Architecture | undefined {
|
||||
export function getPlatform(): Platform | undefined {
|
||||
const platform = process.platform;
|
||||
const platformMapping: { [key: string]: Platform } = {
|
||||
linux: "unknown-linux-gnu",
|
||||
darwin: "apple-darwin",
|
||||
linux: "unknown-linux-gnu",
|
||||
win32: "pc-windows-msvc",
|
||||
};
|
||||
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
|
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
||||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
||||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
||||
"outDir": "./lib" /* Redirect output structure to the directory. */,
|
||||
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||
"target": "ES2022" /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||
},
|
||||
"exclude": ["node_modules", "**/*.test.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user