Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make peril submit a PR updating all copyright years #19

Open
SD10 opened this issue Apr 27, 2018 · 3 comments
Open

Make peril submit a PR updating all copyright years #19

SD10 opened this issue Apr 27, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@SD10
Copy link
Member

SD10 commented Apr 27, 2018

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

@SD10 SD10 added the enhancement New feature or request label Apr 27, 2018
@sunshinejr
Copy link
Member

sunshinejr commented Apr 27, 2018

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

@SD10
Copy link
Member Author

SD10 commented Apr 27, 2018

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants