Compare commits

...

11 Commits
v5 ... v4-alpha

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
3 changed files with 28 additions and 4 deletions

24
CHANGELOG.md Normal file
View File

@@ -0,0 +1,24 @@
# Changelog
Starting in version 4.0.0 we will maintain a changelog
## [4.0.0](https://github.com/actions/stale/compare/v3.0.19...v4.0.0) (2021-07-14)
### Features
* **options:** simplify config by removing skip stale message options ([#457](https://github.com/actions/stale/issues/457)) ([6ec637d](https://github.com/actions/stale/commit/6ec637d238067ab8cc96c9289dcdac280bbd3f4a)), closes [#405](https://github.com/actions/stale/issues/405) [#455](https://github.com/actions/stale/issues/455)
* **output:** print output parameters ([#458](https://github.com/actions/stale/issues/458)) ([3e6d35b](https://github.com/actions/stale/commit/3e6d35b685f0b2fa1a69be893fa07d3d85e05ee0))
### Bug Fixes
* **dry-run:** forbid mutations in dry-run ([#500](https://github.com/actions/stale/issues/500)) ([f1017f3](https://github.com/actions/stale/commit/f1017f33dd159ea51366375120c3e6981d7c3097)), closes [#499](https://github.com/actions/stale/issues/499)
* **logs:** coloured logs ([#465](https://github.com/actions/stale/issues/465)) ([5fbbfba](https://github.com/actions/stale/commit/5fbbfba142860ea6512549e96e36e3540c314132))
* **operations:** fail fast the current batch to respect the operations limit ([#474](https://github.com/actions/stale/issues/474)) ([5f6f311](https://github.com/actions/stale/commit/5f6f311ca6aa75babadfc7bac6edf5d85fa3f35d)), closes [#466](https://github.com/actions/stale/issues/466)
* **label comparison**: make label comparison case insensitive [#517](https://github.com/actions/stale/pull/517), closes [#516](https://github.com/actions/stale/pull/516)
* **filtering comments by actor could have strange behavior**: "stale" comments are now detected based on if the message is the stale message not _who_ made the comment([#519](https://github.com/actions/stale/pull/519)), fixes [#441](https://github.com/actions/stale/pull/441), [#509](https://github.com/actions/stale/pull/509), [#518](https://github.com/actions/stale/pull/518)
### 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 `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.

4
dist/index.js vendored
View File

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

View File

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