Moya / moya-peril

Moya's peril settings
3 stars 0 forks source link

Make peril submit a PR updating all copyright years #19

Open SD10 opened 6 years ago

SD10 commented 6 years ago

Would be pretty crazy if... You could schedule peril to lint a source directory + license file and send a PR with the updated dates

sunshinejr commented 6 years ago

Can you actually schedule a peril job without any webhook? 😮

SD10 commented 6 years ago

I was thinking there would be a specific setup event and then the job gets scheduled for > 1 year in the future:

  /**
   * Scheduled tasks to run using a cron-like syntax.
   *
   * This uses [node-schedule](https://github.com/node-schedule/node-schedule) under the hood. The
   * object is similar to the rules section, in that you define a cron-string with the following format:
   *
   *    *    *    *    *    *    *
   *    ┬    ┬    ┬    ┬    ┬    ┬
   *    │    │    │    │    │    |
   *    │    │    │    │    │    └ day of week (0 - 7) (0 or 7 is Sun)
   *    │    │    │    │    └───── month (1 - 12)
   *    │    │    │    └────────── day of month (1 - 31)
   *    │    │    └─────────────── hour (0 - 23)
   *    │    └──────────────────── minute (0 - 59)
   *    └───────────────────────── second (0 - 59, OPTIONAL)
   *
   * Which would look something like:
   *
   *    "scheduler": {
   *      "0 0 12 * * ?": "schedule/daily_at_twelve.ts",
   *      "0 9 * * 1-5": "schedule/weekday_wakeup_email.ts"
   *    }
   *
   * in practice. There's a lot of great resources on the net showing the general syntax.
   */

https://github.com/danger/peril/blob/78312185e13b0d7ece81752fb4239ad8dff3f6b7/source/db/index.ts#L36-L60

sunshinejr commented 6 years ago

Omg this is awesome, I need to spend some time on updating my peril setup.