Compare commits

..

11 Commits

Author SHA1 Message Date
Luke Tomlinson
5dcf6c7115 Update index.js 2021-07-14 09:50:42 -04:00
Luke Tomlinson
0ca8709f9f Use minutes for debugging 2021-07-14 09:41:34 -04:00
Luke Tomlinson
ddd0bef6c9 Update index.js 2021-07-14 09:31:56 -04:00
Luke Tomlinson
5d43220303 Update CHANGELOG.md 2021-07-14 09:31:34 -04:00
Luke Tomlinson
50125be254 Update CHANGELOG.md
Co-authored-by: Geoffrey Testelin <geoffrey.testelin@gmail.com>
2021-07-14 09:22:44 -04:00
Luke Tomlinson
6f3095b85a Update CHANGELOG.md
Co-authored-by: Geoffrey Testelin <geoffrey.testelin@gmail.com>
2021-07-14 09:22:44 -04:00
Luke Tomlinson
9293853a32 Update CHANGELOG.md
Co-authored-by: Geoffrey Testelin <geoffrey.testelin@gmail.com>
2021-07-14 09:22:44 -04:00
Luke Tomlinson
a0ac568ea2 Update CHANGELOG.md
Co-authored-by: Geoffrey Testelin <geoffrey.testelin@gmail.com>
2021-07-14 09:22:44 -04:00
Luke Tomlinson
513b8c1b30 Update CHANGELOG.md
Co-authored-by: Geoffrey Testelin <geoffrey.testelin@gmail.com>
2021-07-14 09:22:44 -04:00
Luke Tomlinson
2a7354712e Create CHANGELOG.md 2021-07-14 09:22:44 -04:00
Luke Tomlinson
1790671141 Update dist for v4 release 2021-07-14 09:22:44 -04:00
6 changed files with 22 additions and 20 deletions

View File

@@ -20,5 +20,5 @@ Starting in version 4.0.0 we will maintain a changelog
### Breaking Changes ### Breaking Changes
* The options `skip-stale-issue-message` and `skip-stale-pr-message` were removed. Instead, setting the options `stale-issue-message` and `stale-pr-message` will be enough to let the stale workflow add a comment. If the options are unset, a comment will not be added which was the equivalent of setting `skip-stale-issue-message` to `true`. * The options `skip-stale-issue-message` and `skip-stale-pr-message` were removed. Instead, setting the options `stale-issue-message` and `stale-pr-message` will be enough to let the stale workflow add a comment. If the options are unset, a comment will not be added which was the equivalent of setting `skip-stale-issue-message` to `false`.
* The `operations-per-run` option will be more effective. After migrating, you could face a failed-fast process workflow if you let the default value (30) or set it to a small number. In that case, you will see a warning at the end of the logs (if enabled) indicating that the workflow was stopped sooner to avoid consuming too much API calls. In most cases, you can just increase this limit to make sure to process everything in a single run. * The `operations-per-run` option will be more effective. After migrating, you could face a failed-fast process workflow if you let the default value (30) or set it to a small number. In that case, you will see a warning at the end of the logs (if enabled) indicating that the workflow was stopped sooner to avoid consuming too much API calls. In most cases, you can just increase this limit to make sure to process everything in a single run.

View File

@@ -489,7 +489,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v3
with: with:
stale-issue-message: 'Message to comment on stale issues. If none provided, will not mark issues stale' 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' stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale'
@@ -507,7 +507,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v3
with: 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-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 days-before-stale: 30
@@ -526,8 +526,9 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v3
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
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-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.' 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.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
@@ -548,8 +549,9 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v3
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
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-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.' 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.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
@@ -572,7 +574,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v3
with: with:
stale-issue-message: 'Stale issue message' stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message' stale-pr-message: 'Stale pull request message'
@@ -595,7 +597,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v3
with: with:
start-date: '2020-18-04T00:00:00Z' # ISO 8601 or RFC 2822 start-date: '2020-18-04T00:00:00Z' # ISO 8601 or RFC 2822
``` ```
@@ -612,7 +614,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v3
with: with:
exempt-issue-milestones: 'future,alpha,beta' exempt-issue-milestones: 'future,alpha,beta'
exempt-pr-milestones: 'bugfix,improvement' exempt-pr-milestones: 'bugfix,improvement'
@@ -630,7 +632,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v3
with: with:
exempt-all-pr-milestones: true exempt-all-pr-milestones: true
``` ```
@@ -647,7 +649,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v3
with: with:
any-of-labels: 'needs-more-info,needs-demo' any-of-labels: 'needs-more-info,needs-demo'
# You can opt for 'only-labels' instead if your use-case requires all labels # You can opt for 'only-labels' instead if your use-case requires all labels
@@ -666,7 +668,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v3
with: with:
exempt-issue-assignees: 'marco,polo' exempt-issue-assignees: 'marco,polo'
exempt-pr-assignees: 'marco' exempt-pr-assignees: 'marco'
@@ -684,7 +686,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v3
with: with:
exempt-all-pr-assignees: true exempt-all-pr-assignees: true
``` ```

4
dist/index.js vendored
View File

@@ -267,8 +267,8 @@ class IssuesProcessor {
this._statistics = new statistics_1.Statistics(); this._statistics = new statistics_1.Statistics();
} }
} }
static _updatedSince(timestamp, num_minutes) { static _updatedSince(timestamp, num_min) {
const daysInMillis = 1000 * 60 * num_minutes; const daysInMillis = 1000 * 60 * num_min;
const millisSinceLastUpdated = new Date().getTime() - new Date(timestamp).getTime(); const millisSinceLastUpdated = new Date().getTime() - new Date(timestamp).getTime();
return millisSinceLastUpdated <= daysInMillis; return millisSinceLastUpdated <= daysInMillis;
} }

6
package-lock.json generated
View File

@@ -2141,9 +2141,9 @@
} }
}, },
"@vercel/ncc": { "@vercel/ncc": {
"version": "0.28.6", "version": "0.27.0",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.28.6.tgz", "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.27.0.tgz",
"integrity": "sha512-t4BoSSuyK8BZaUE0gV18V6bkFs4st7baumtFGa50dv1tMu2GDBEBF8sUZaKBdKiL6DzJ2D2+XVCwYWWDcQOYdQ==", "integrity": "sha512-DllIJQapnU2YwewIhh/4dYesmMQw3h2cFtabECc/zSJHqUbNa0eJuEkRa6DXbZvh1YPWBtYQoPV17NlDpBw1Vw==",
"dev": true "dev": true
}, },
"JSONStream": { "JSONStream": {

View File

@@ -49,7 +49,7 @@
"@types/semver": "^7.3.5", "@types/semver": "^7.3.5",
"@typescript-eslint/eslint-plugin": "^4.26.0", "@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.1", "@typescript-eslint/parser": "^4.26.1",
"@vercel/ncc": "^0.28.6", "@vercel/ncc": "^0.27.0",
"ansi-styles": "5.2.0", "ansi-styles": "5.2.0",
"eslint": "^7.28.0", "eslint": "^7.28.0",
"eslint-plugin-github": "^4.1.2", "eslint-plugin-github": "^4.1.2",

View File

@@ -29,8 +29,8 @@ import {LoggerService} from '../services/logger.service';
* Handle processing of issues for staleness/closure. * Handle processing of issues for staleness/closure.
*/ */
export class IssuesProcessor { export class IssuesProcessor {
private static _updatedSince(timestamp: string, num_minutes: number): boolean { private static _updatedSince(timestamp: string, num_min: number): boolean {
const daysInMillis = 1000 * 60 * num_minutes; const daysInMillis = 1000 * 60 * num_min;
const millisSinceLastUpdated = const millisSinceLastUpdated =
new Date().getTime() - new Date(timestamp).getTime(); new Date().getTime() - new Date(timestamp).getTime();