Handles the discover-new-conflicts pull request command.
({pr, date}: Arguments<DiscoverNewConflictsOptions>)
| 33 | |
| 34 | /** Handles the discover-new-conflicts pull request command. */ |
| 35 | async function handler({pr, date}: Arguments<DiscoverNewConflictsOptions>) { |
| 36 | // If a provided date is not able to be parsed, yargs provides it as NaN. |
| 37 | if (isNaN(date)) { |
| 38 | Log.error('Unable to parse the value provided via --date flag'); |
| 39 | process.exit(1); |
| 40 | } |
| 41 | await discoverNewConflictsForPr(pr, date); |
| 42 | } |
| 43 | |
| 44 | /** Gets a date object 30 days ago from today. */ |
| 45 | function getThirtyDaysAgoDate() { |
nothing calls this directly
no test coverage detected