function getAndValidateInputs()

in src/entrypoint.js [28:60]


function getAndValidateInputs() {
  const args = {
    repoToken: process.env.REPO_TOKEN,
    ancientIssueMessage: process.env.ANCIENT_ISSUE_MESSAGE,
    ancientPrMessage: process.env.ANCIENT_PR_MESSAGE,
    staleIssueMessage: process.env.STALE_ISSUE_MESSAGE,
    stalePrMessage: process.env.STALE_PR_MESSAGE,
    daysBeforeStale: parseFloat(process.env.DAYS_BEFORE_STALE),
    daysBeforeClose: parseFloat(process.env.DAYS_BEFORE_CLOSE),
    daysBeforeAncient: parseFloat(process.env.DAYS_BEFORE_ANCIENT),
    staleIssueLabel: process.env.STALE_ISSUE_LABEL,
    exemptIssueLabels: process.env.EXEMPT_ISSUE_LABELS,
    stalePrLabel: process.env.STALE_PR_LABEL,
    exemptPrLabels: process.env.EXEMPT_PR_LABELS,
    cfsLabel: process.env.CFS_LABEL,
    issueTypes: process.env.ISSUE_TYPES.split(','),
    responseRequestedLabel: process.env.RESPONSE_REQUESTED_LABEL,
    minimumUpvotesToExempt: parseInt(process.env.MINIMUM_UPVOTES_TO_EXEMPT),
    dryrun: String(process.env.DRYRUN).toLowerCase() === 'true',
  };

  for (const numberInput of [
    args.daysBeforeAncient,
    args.daysBeforeClose,
    args.daysBeforeStale,
  ]) {
    if (isNaN(numberInput)) {
      throw Error(`input ${numberInput} did not parse to a valid integer`);
    }
  }

  return args;
}