mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
only mark deprecations as old after 14 months
This commit is contained in:
@@ -36,8 +36,8 @@ function* deprecationMessages(dir) {
|
|||||||
try {
|
try {
|
||||||
const [_, sha, time, lineNumber] = line.match(blameRegExp);
|
const [_, sha, time, lineNumber] = line.match(blameRegExp);
|
||||||
const date = new Date(time);
|
const date = new Date(time);
|
||||||
// check if it's within the last year
|
// check if it's within the last 14 months (a year, plus 2 months for safety, in case a PR was delayed)
|
||||||
if (date.getTime() >= Date.now() - 365 * 24 * 60 * 60 * 1000) {
|
if (date.getTime() >= Date.now() - 14 * 31 * 24 * 60 * 60 * 1000) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const message = `${file}:${lineNumber} was last updated on ${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;
|
const message = `${file}:${lineNumber} was last updated on ${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user