run = async () => {
  try {
    // Create octokit client.
    const dryRun = process.env.DRY_RUN === "true" || false;
    const staleDays = process.env.STALE_DAYS || 20;
    debug("Creating octokit client...");
    const octokit = github.getOctokit(getGithubToken());
    const { owner, repo } = getRepoInfo(github.context);
    const reviewer = getReviewer();

    // Retrieve all theme pull requests.
    debug("Retrieving all theme pull requests...");
    const prs = await fetchOpenPRs(octokit, owner, repo, reviewer);
    const themePRs = pullsWithLabel(prs, "themes");
    const invalidThemePRs = pullsWithLabel(themePRs, "invalid");
    debug("Retrieving stale theme PRs...");
    const staleThemePRs = invalidThemePRs.filter((pr) =>
      isStale(pr, staleDays),
    );
    const staleThemePRsNumbers = staleThemePRs.map((pr) => pr.number);
    debug(`Found ${staleThemePRs.length} stale theme PRs`);

    // Loop through all stale invalid theme pull requests and close them.
    for (const prNumber of staleThemePRsNumbers) {
      debug(`Closing #${prNumber} because it is stale...`);
      if (dryRun) {
        debug("Dry run enabled, skipping...");
      } else {
        await octokit.rest.issues.createComment({
          owner,
          repo,
          issue_number: prNumber,
          body: CLOSING_COMMENT,
        });
        await octokit.rest.pulls.update({
          owner,
          repo,
          pull_number: prNumber,
          state: "closed",
        });
      }
    }
  } catch (error) {
    setFailed(error.message);
  }
}
Main function.

@returns {Promise<void>} A promise.