mirror of
https://github.com/actions/stale.git
synced 2025-12-24 01:18:17 +00:00
Compare commits
12 Commits
v8
...
tool-confi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
922822c753 | ||
|
|
03af7c36d3 | ||
|
|
72afbce2b0 | ||
|
|
d3a9a26482 | ||
|
|
1e4ad12a86 | ||
|
|
a75fa1fffe | ||
|
|
85ee69fc85 | ||
|
|
9e8e0c1f8a | ||
|
|
52ce0899f7 | ||
|
|
55b9bcbbaf | ||
|
|
90557a0ac5 | ||
|
|
232f2c7ee8 |
@@ -7,7 +7,7 @@ module.exports = {
|
||||
'eslint-config-prettier'
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['@typescript-eslint', 'eslint-plugin-jest'],
|
||||
plugins: ['@typescript-eslint', 'eslint-plugin-node', 'eslint-plugin-jest'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-require-imports': 'error',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
@@ -28,7 +28,8 @@ module.exports = {
|
||||
}
|
||||
],
|
||||
'no-control-regex': 'off',
|
||||
'no-constant-condition': ['error', {checkLoops: false}]
|
||||
'no-constant-condition': ['error', {checkLoops: false}],
|
||||
'node/no-extraneous-import': 'error'
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
|
||||
2
.licenses/npm/@octokit/plugin-retry.dep.yml
generated
2
.licenses/npm/@octokit/plugin-retry.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@octokit/plugin-retry"
|
||||
version: 4.1.1
|
||||
version: 4.1.3
|
||||
type: npm
|
||||
summary: Automatic retry plugin for octokit
|
||||
homepage:
|
||||
|
||||
22
README.md
22
README.md
@@ -553,7 +553,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
stale-issue-message: 'Message to comment on stale issues. If none provided, will not mark issues stale'
|
||||
stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale'
|
||||
@@ -571,7 +571,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
|
||||
days-before-stale: 30
|
||||
@@ -590,7 +590,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
|
||||
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
|
||||
@@ -612,7 +612,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
|
||||
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
|
||||
@@ -636,7 +636,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
stale-issue-message: 'Stale issue message'
|
||||
stale-pr-message: 'Stale pull request message'
|
||||
@@ -659,7 +659,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
start-date: '2020-04-18T00:00:00Z' # ISO 8601 or RFC 2822
|
||||
```
|
||||
@@ -676,7 +676,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
exempt-issue-milestones: 'future,alpha,beta'
|
||||
exempt-pr-milestones: 'bugfix,improvement'
|
||||
@@ -694,7 +694,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
exempt-all-pr-milestones: true
|
||||
```
|
||||
@@ -711,7 +711,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
any-of-labels: 'needs-more-info,needs-demo'
|
||||
# You can opt for 'only-labels' instead if your use-case requires all labels
|
||||
@@ -730,7 +730,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
exempt-issue-assignees: 'marco,polo'
|
||||
exempt-pr-assignees: 'marco'
|
||||
@@ -748,7 +748,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
exempt-all-pr-assignees: true
|
||||
```
|
||||
|
||||
21
dist/index.js
vendored
21
dist/index.js
vendored
@@ -7405,7 +7405,7 @@ var Bottleneck = _interopDefault(__nccwpck_require__(1174));
|
||||
var requestError = __nccwpck_require__(537);
|
||||
|
||||
// @ts-ignore
|
||||
async function errorRequest(octokit, state, error, options) {
|
||||
async function errorRequest(state, octokit, error, options) {
|
||||
if (!error.request || !error.request.request) {
|
||||
// address https://github.com/octokit/plugin-retry.js/issues/8
|
||||
throw error;
|
||||
@@ -7420,11 +7420,9 @@ async function errorRequest(octokit, state, error, options) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
// @ts-ignore
|
||||
async function wrapRequest(state, request, options) {
|
||||
// @ts-nocheck
|
||||
async function wrapRequest(state, octokit, request, options) {
|
||||
const limiter = new Bottleneck();
|
||||
// @ts-ignore
|
||||
limiter.on("failed", function (error, info) {
|
||||
const maxRetries = ~~error.request.request.retries;
|
||||
const after = ~~error.request.request.retryAfter;
|
||||
@@ -7435,10 +7433,9 @@ async function wrapRequest(state, request, options) {
|
||||
return after * state.retryAfterBaseValue;
|
||||
}
|
||||
});
|
||||
return limiter.schedule(requestWithGraphqlErrorHandling.bind(null, request), options);
|
||||
return limiter.schedule(requestWithGraphqlErrorHandling.bind(null, state, octokit, request), options);
|
||||
}
|
||||
// @ts-ignore
|
||||
async function requestWithGraphqlErrorHandling(request, options) {
|
||||
async function requestWithGraphqlErrorHandling(state, octokit, request, options) {
|
||||
const response = await request(request, options);
|
||||
if (response.data && response.data.errors && /Something went wrong while executing your query/.test(response.data.errors[0].message)) {
|
||||
// simulate 500 request error for retry handling
|
||||
@@ -7446,12 +7443,12 @@ async function requestWithGraphqlErrorHandling(request, options) {
|
||||
request: options,
|
||||
response
|
||||
});
|
||||
throw error;
|
||||
return errorRequest(state, octokit, error, options);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
const VERSION = "4.1.1";
|
||||
const VERSION = "4.1.3";
|
||||
function retry(octokit, octokitOptions) {
|
||||
const state = Object.assign({
|
||||
enabled: true,
|
||||
@@ -7460,8 +7457,8 @@ function retry(octokit, octokitOptions) {
|
||||
retries: 3
|
||||
}, octokitOptions.retry);
|
||||
if (state.enabled) {
|
||||
octokit.hook.error("request", errorRequest.bind(null, octokit, state));
|
||||
octokit.hook.wrap("request", wrapRequest.bind(null, state));
|
||||
octokit.hook.error("request", errorRequest.bind(null, state, octokit));
|
||||
octokit.hook.wrap("request", wrapRequest.bind(null, state, octokit));
|
||||
}
|
||||
return {
|
||||
retry: {
|
||||
|
||||
6521
package-lock.json
generated
6521
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@@ -6,10 +6,10 @@
|
||||
"main": "lib/main.js",
|
||||
"scripts": {
|
||||
"build": "tsc --project tsconfig.app.json && ncc build",
|
||||
"format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write **/*.{ts,yml,yaml}",
|
||||
"format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check **/*.{ts,yml,yaml}",
|
||||
"lint": "eslint --config ./.eslintrc.js **/*.ts",
|
||||
"lint:fix": "eslint --config ./.eslintrc.js **/*.ts --fix",
|
||||
"format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"",
|
||||
"format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"",
|
||||
"lint": "eslint --config ./.eslintrc.js \"**/*.ts\"",
|
||||
"lint:fix": "eslint --config ./.eslintrc.js \"**/*.ts\" --fix",
|
||||
"lint:all": "npm run format-check && npm run lint",
|
||||
"lint:all:fix": "npm run format && npm run lint:fix",
|
||||
"test": "jest --config ./jest.config.js",
|
||||
@@ -47,23 +47,23 @@
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.0",
|
||||
"@types/lodash.deburr": "^4.1.6",
|
||||
"@types/node": "^18.15.3",
|
||||
"@types/node": "^18.15.11",
|
||||
"@types/semver": "^7.3.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||
"@typescript-eslint/parser": "^5.54.0",
|
||||
"@typescript-eslint/parser": "^5.56.0",
|
||||
"@vercel/ncc": "^0.36.1",
|
||||
"ansi-styles": "5.2.0",
|
||||
"eslint": "^8.35.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-jest": "^27.2.1",
|
||||
"jest": "^29.5.0",
|
||||
"jest-circus": "^29.3.1",
|
||||
"jest-circus": "^29.5.0",
|
||||
"jest-silent-reporter": "^0.5.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"prettier": "^2.8.6",
|
||||
"prettier": "^2.8.7",
|
||||
"standard-version": "^9.3.1",
|
||||
"terminal-link": "^2.1.1",
|
||||
"ts-jest": "^29.0.5",
|
||||
"typescript": "^5.0.2"
|
||||
"typescript": "^5.0.4"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user