mirror of
https://github.com/actions/stale.git
synced 2026-01-06 23:38:17 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
997185467f | ||
|
|
5611b9defa | ||
|
|
fad0de84e5 | ||
|
|
39bea7de61 | ||
|
|
e46bbabb3e | ||
|
|
65d1d4804d |
2
.github/workflows/e2e-tests.yml
vendored
2
.github/workflows/e2e-tests.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
dry-run-test: # make sure the action works on a clean machine without building
|
dry-run-test: # make sure the action works on a clean machine without building
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: ./
|
- uses: ./
|
||||||
id: stale
|
id: stale
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checking out
|
- name: Checking out
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
- name: Publish
|
- name: Publish
|
||||||
id: publish
|
id: publish
|
||||||
uses: actions/publish-immutable-action@v0.0.4
|
uses: actions/publish-immutable-action@v0.0.4
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update the ${{ env.TAG_NAME }} tag
|
- name: Update the ${{ env.TAG_NAME }} tag
|
||||||
uses: actions/publish-action@v0.3.0
|
uses: actions/publish-action@v0.4.0
|
||||||
with:
|
with:
|
||||||
source-tag: ${{ env.TAG_NAME }}
|
source-tag: ${{ env.TAG_NAME }}
|
||||||
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
||||||
|
|||||||
2
.licenses/npm/@types/node.dep.yml
generated
2
.licenses/npm/@types/node.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@types/node"
|
name: "@types/node"
|
||||||
version: 24.1.0
|
version: 24.3.1
|
||||||
type: npm
|
type: npm
|
||||||
summary: TypeScript definitions for node
|
summary: TypeScript definitions for node
|
||||||
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
||||||
|
|||||||
2
.licenses/npm/undici-types.dep.yml
generated
2
.licenses/npm/undici-types.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: undici-types
|
name: undici-types
|
||||||
version: 7.8.0
|
version: 7.10.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: A stand-alone types package for Undici
|
summary: A stand-alone types package for Undici
|
||||||
homepage: https://undici.nodejs.org
|
homepage: https://undici.nodejs.org
|
||||||
|
|||||||
30
CHANGELOG.md
30
CHANGELOG.md
@@ -1,5 +1,35 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
# [10.1.0]
|
||||||
|
|
||||||
|
## What's Changed
|
||||||
|
|
||||||
|
* Add only-issue-types option to filter issues by type by @Bibo-Joshi in https://github.com/actions/stale/pull/1255
|
||||||
|
|
||||||
|
# [10.0.0]
|
||||||
|
|
||||||
|
## What's Changed
|
||||||
|
|
||||||
|
## Breaking Changes
|
||||||
|
* Upgrade to node 24 by @salmanmkc in https://github.com/actions/stale/pull/1279
|
||||||
|
Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
|
||||||
|
|
||||||
|
## Enhancement
|
||||||
|
- Introducing sort-by option by @suyashgaonkar in https://github.com/actions/stale/pull/1254
|
||||||
|
|
||||||
|
## Dependency Upgrades
|
||||||
|
* Upgrade actions/publish-immutable-action from 0.0.3 to 0.0.4 by @dependabot[bot] in https://github.com/actions/stale/pull/1186
|
||||||
|
* Upgrade undici from 5.28.4 to 5.28.5 by @dependabot[bot] in https://github.com/actions/stale/pull/1201
|
||||||
|
* Upgrade @action/cache from 4.0.0 to 4.0.2 by @aparnajyothi-y in https://github.com/actions/stale/pull/1226
|
||||||
|
* Upgrade @action/cache from 4.0.2 to 4.0.3 by @suyashgaonkar in https://github.com/actions/stale/pull/1233
|
||||||
|
* Upgrade undici from 5.28.5 to 5.29.0 by @dependabot[bot] in https://github.com/actions/stale/pull/1251
|
||||||
|
* Upgrade form-data to bring in fix for critical vulnerability by @gowridurgad in https://github.com/actions/stale/pull/1277
|
||||||
|
|
||||||
|
## Documentation changes
|
||||||
|
|
||||||
|
- Changelog update for recent releases by @suyashgaonkar in https://github.com/actions/stale/pull/1224
|
||||||
|
- Permissions update in Readme by @ghadimir in https://github.com/actions/stale/pull/1248
|
||||||
|
|
||||||
# [9.1.0]
|
# [9.1.0]
|
||||||
|
|
||||||
## What's Changed
|
## What's Changed
|
||||||
|
|||||||
@@ -3,6 +3,13 @@
|
|||||||
[](https://github.com/actions/stale/actions/workflows/basic-validation.yml)
|
[](https://github.com/actions/stale/actions/workflows/basic-validation.yml)
|
||||||
[](https://github.com/actions/stale/actions/workflows/e2e-tests.yml)
|
[](https://github.com/actions/stale/actions/workflows/e2e-tests.yml)
|
||||||
|
|
||||||
|
## Breaking changes in V10
|
||||||
|
|
||||||
|
- Upgraded action from node20 to node 24
|
||||||
|
> Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
|
||||||
|
|
||||||
|
For more details, see the full release notes on the [release page](https://github.com/actions/stale/releases/tag/v10.0.0)
|
||||||
|
|
||||||
Warns and then closes issues and PRs that have had no activity for a specified amount of time.
|
Warns and then closes issues and PRs that have had no activity for a specified amount of time.
|
||||||
|
|
||||||
The configuration must be on the default branch and the default values will:
|
The configuration must be on the default branch and the default values will:
|
||||||
|
|||||||
12
dist/index.js
vendored
12
dist/index.js
vendored
@@ -761,6 +761,7 @@ class IssuesProcessor {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
getRateLimit() {
|
getRateLimit() {
|
||||||
|
var _a;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const logger = new logger_1.Logger();
|
const logger = new logger_1.Logger();
|
||||||
try {
|
try {
|
||||||
@@ -768,7 +769,13 @@ class IssuesProcessor {
|
|||||||
return new rate_limit_1.RateLimit(rateLimitResult.data.rate);
|
return new rate_limit_1.RateLimit(rateLimitResult.data.rate);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
logger.error(`Error when getting rateLimit: ${error.message}`);
|
const status = error === null || error === void 0 ? void 0 : error.status;
|
||||||
|
const message = (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : String(error);
|
||||||
|
if (status === 404 && message.includes('Rate limiting is not enabled')) {
|
||||||
|
logger.warning('Rate limiting is not enabled on this instance. Proceeding without rate limit checks.');
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
logger.error(`Error when getting rateLimit: ${message}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2610,7 +2617,8 @@ function _getAndValidateArgs() {
|
|||||||
ignorePrUpdates: _toOptionalBoolean('ignore-pr-updates'),
|
ignorePrUpdates: _toOptionalBoolean('ignore-pr-updates'),
|
||||||
exemptDraftPr: core.getInput('exempt-draft-pr') === 'true',
|
exemptDraftPr: core.getInput('exempt-draft-pr') === 'true',
|
||||||
closeIssueReason: core.getInput('close-issue-reason'),
|
closeIssueReason: core.getInput('close-issue-reason'),
|
||||||
includeOnlyAssigned: core.getInput('include-only-assigned') === 'true'
|
includeOnlyAssigned: core.getInput('include-only-assigned') === 'true',
|
||||||
|
onlyIssueTypes: core.getInput('only-issue-types')
|
||||||
};
|
};
|
||||||
for (const numberInput of ['days-before-stale']) {
|
for (const numberInput of ['days-before-stale']) {
|
||||||
if (isNaN(parseFloat(core.getInput(numberInput)))) {
|
if (isNaN(parseFloat(core.getInput(numberInput)))) {
|
||||||
|
|||||||
28
package-lock.json
generated
28
package-lock.json
generated
@@ -20,14 +20,14 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.14",
|
"@types/jest": "^29.5.14",
|
||||||
"@types/lodash.deburr": "^4.1.6",
|
"@types/lodash.deburr": "^4.1.6",
|
||||||
"@types/node": "^24.1.0",
|
"@types/node": "^24.3.1",
|
||||||
"@types/semver": "^7.5.0",
|
"@types/semver": "^7.5.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
||||||
"@typescript-eslint/parser": "^6.2.1",
|
"@typescript-eslint/parser": "^6.2.1",
|
||||||
"@vercel/ncc": "^0.36.1",
|
"@vercel/ncc": "^0.36.1",
|
||||||
"ansi-styles": "5.2.0",
|
"ansi-styles": "5.2.0",
|
||||||
"eslint": "^8.46.0",
|
"eslint": "^8.46.0",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-plugin-jest": "^27.2.3",
|
"eslint-plugin-jest": "^27.2.3",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"jest": "^29.6.2",
|
"jest": "^29.6.2",
|
||||||
@@ -1854,12 +1854,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "24.1.0",
|
"version": "24.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.1.tgz",
|
||||||
"integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==",
|
"integrity": "sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~7.8.0"
|
"undici-types": "~7.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/node-fetch": {
|
"node_modules/@types/node-fetch": {
|
||||||
@@ -3477,13 +3477,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-config-prettier": {
|
"node_modules/eslint-config-prettier": {
|
||||||
"version": "8.10.0",
|
"version": "10.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz",
|
||||||
"integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==",
|
"integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
"eslint-config-prettier": "bin/cli.js"
|
"eslint-config-prettier": "bin/cli.js"
|
||||||
},
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/eslint-config-prettier"
|
||||||
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"eslint": ">=7.0.0"
|
"eslint": ">=7.0.0"
|
||||||
}
|
}
|
||||||
@@ -7522,9 +7526,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
"version": "7.8.0",
|
"version": "7.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz",
|
||||||
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
|
"integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/universal-user-agent": {
|
"node_modules/universal-user-agent": {
|
||||||
|
|||||||
@@ -48,14 +48,14 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.14",
|
"@types/jest": "^29.5.14",
|
||||||
"@types/lodash.deburr": "^4.1.6",
|
"@types/lodash.deburr": "^4.1.6",
|
||||||
"@types/node": "^24.1.0",
|
"@types/node": "^24.3.1",
|
||||||
"@types/semver": "^7.5.0",
|
"@types/semver": "^7.5.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
||||||
"@typescript-eslint/parser": "^6.2.1",
|
"@typescript-eslint/parser": "^6.2.1",
|
||||||
"@vercel/ncc": "^0.36.1",
|
"@vercel/ncc": "^0.36.1",
|
||||||
"ansi-styles": "5.2.0",
|
"ansi-styles": "5.2.0",
|
||||||
"eslint": "^8.46.0",
|
"eslint": "^8.46.0",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-plugin-jest": "^27.2.3",
|
"eslint-plugin-jest": "^27.2.3",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"jest": "^29.6.2",
|
"jest": "^29.6.2",
|
||||||
|
|||||||
@@ -660,11 +660,22 @@ export class IssuesProcessor {
|
|||||||
|
|
||||||
async getRateLimit(): Promise<IRateLimit | undefined> {
|
async getRateLimit(): Promise<IRateLimit | undefined> {
|
||||||
const logger: Logger = new Logger();
|
const logger: Logger = new Logger();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const rateLimitResult = await this.client.rest.rateLimit.get();
|
const rateLimitResult = await this.client.rest.rateLimit.get();
|
||||||
return new RateLimit(rateLimitResult.data.rate);
|
return new RateLimit(rateLimitResult.data.rate);
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
logger.error(`Error when getting rateLimit: ${error.message}`);
|
const status = (error as {status?: number})?.status;
|
||||||
|
const message = (error as {message?: string})?.message ?? String(error);
|
||||||
|
|
||||||
|
if (status === 404 && message.includes('Rate limiting is not enabled')) {
|
||||||
|
logger.warning(
|
||||||
|
'Rate limiting is not enabled on this instance. Proceeding without rate limit checks.'
|
||||||
|
);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.error(`Error when getting rateLimit: ${message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,8 @@ function _getAndValidateArgs(): IIssuesProcessorOptions {
|
|||||||
ignorePrUpdates: _toOptionalBoolean('ignore-pr-updates'),
|
ignorePrUpdates: _toOptionalBoolean('ignore-pr-updates'),
|
||||||
exemptDraftPr: core.getInput('exempt-draft-pr') === 'true',
|
exemptDraftPr: core.getInput('exempt-draft-pr') === 'true',
|
||||||
closeIssueReason: core.getInput('close-issue-reason'),
|
closeIssueReason: core.getInput('close-issue-reason'),
|
||||||
includeOnlyAssigned: core.getInput('include-only-assigned') === 'true'
|
includeOnlyAssigned: core.getInput('include-only-assigned') === 'true',
|
||||||
|
onlyIssueTypes: core.getInput('only-issue-types')
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const numberInput of ['days-before-stale']) {
|
for (const numberInput of ['days-before-stale']) {
|
||||||
|
|||||||
Reference in New Issue
Block a user