Skip to content

Commit

Permalink
Update handleReminder.js (#3139)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm1957 authored Dec 27, 2023
1 parent bbb7e7b commit d79e1fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/handleReminder.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {
async function cleanupLabels(){
let labels = await getLabels('');
labels.forEach( (l)=> {
const result = /^(\d\d)\.(\d\d)\.(\d\d\d\d)$/g.exec(l.name);
const result = /^(\d?\d)\.(\d?\d)\.(\d\d\d\d)$/g.exec(l.name);
if (result) {
let targetTs=new Date(result[3], result[2]-1, result[1], 0, 0, 0).getTime();
const nowTs = new Date().getTime();
Expand All @@ -29,7 +29,7 @@ async function cleanupIssueLabels(){
for (const issue of issues ) {
console.log(`cleanup PR ${issue.number}`);
issue.labels.forEach((l) => {
const result = /^(\d\d)\.(\d\d)\.(\d\d\d\d)$/g.exec(l.name);
const result = /^(\d?\d)\.(\d?\d)\.(\d\d\d\d)$/g.exec(l.name);
if (result) {
console.log(` ${l.name} will be removed`);
deleteLabel(issue.number, l.name);
Expand Down

0 comments on commit d79e1fe

Please sign in to comment.