Skip to content

Commit

Permalink
Update StalePRs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sekyondaMeta authored Oct 23, 2024
1 parent fac78f0 commit 59c9045
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/StalePRs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ jobs:
const STALE_CLOSE_THRESHOLD_MS = 1000 * 60 * 60 * 24 * 30;
const STALE_MESSAGE =
"Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as `Stale`. <br>" +
"Feel free to remove the `Stale` label if you feel this was a mistake. <br>" +
"If you are unable to remove the `Stale` label please contact a maintainer in order to do so. <br>" +
"Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as `stale`. <br>" +
"Feel free to remove the `stale` label if you feel this was a mistake. <br>" +
"If you are unable to remove the `stale` label please contact a maintainer in order to do so. <br>" +
"If you want the bot to never mark this PR stale again, add the `no-stale` label.<br>" +
"`Stale` pull requests will automatically be closed after 30 days of inactivity.<br>";
"`stale` pull requests will automatically be closed after 30 days of inactivity.<br>";
let numAPIRequests = 0;
let numProcessed = 0;
Expand All @@ -79,7 +79,7 @@ jobs:
// Check if the PR is stale, according to our configured thresholds.
let staleThresholdMillis;
if (labels.includes("Stale")) {
if (labels.includes("stale")) {
core.info(`[${pull.number}] PR is labeled stale, checking whether we should close it.`);
staleThresholdMillis = STALE_CLOSE_THRESHOLD_MS;
} else {
Expand All @@ -97,7 +97,7 @@ jobs:
// At this point, we know we should do something.
// For PRs already labeled stale, close them.
if (labels.includes("Stale")) {
if (labels.includes("stale")) {
core.info(`[${pull.number}] Closing PR.`);
numAPIRequests += 1;
await github.rest.issues.update({
Expand All @@ -123,7 +123,7 @@ jobs:
owner: "pytorch",
repo: "tutorials",
issue_number: pull.number,
labels: ["Stale"],
labels: ["stale"],
});
}
}
Expand Down

0 comments on commit 59c9045

Please sign in to comment.