Skip to content

Commit

Permalink
Skip marking issue as stale if the stale message is empty. (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishdhingra authored Apr 8, 2022
1 parent cd68c8d commit e1cf8a5
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,18 @@ async function processIssues(client, args) {
}
} else {
if (currentTime >= rrTime) {
log.debug(`time expired on this issue, need to label it stale`);
if (args.dryrun) {
log.info(
`dry run: would mark #${issue.number} as ${staleLabel} due to ${responseRequestedLabel} age`
);
} else {
await markStale(client, issue, staleMessage, staleLabel);
if (staleMessage) {
log.debug(`time expired on this issue, need to label it stale`);
if (args.dryrun) {
log.info(
`dry run: would mark #${issue.number} as ${staleLabel} due to ${responseRequestedLabel} age`
);
} else {
await markStale(client, issue, staleMessage, staleLabel);
}
}
else {
log.debug(`stale message is null/empty, doing nothing`);
}
} else {
// else ignore it because we need to wait longer before staleing
Expand Down

0 comments on commit e1cf8a5

Please sign in to comment.