From f2aa149681d0dda8f5ee15afe61f0671231eba40 Mon Sep 17 00:00:00 2001 From: Stephen Cresswell <229672+cressie176@users.noreply.github.com> Date: Thu, 26 Dec 2024 21:44:57 +0000 Subject: [PATCH] Improve docs --- README.md | 12 ++++-------- examples/enterprise/reminders.yaml | 8 +++++--- examples/personal/reminders.yaml | 17 ++++++++++++++--- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index cf531dc..4ca36ab 100644 --- a/README.md +++ b/README.md @@ -51,15 +51,13 @@ Knuff works with JSON, but since it's so easy to convert YAML to JSON, and becau # Required. This will be the body of the reminder body: | The CMS API key expires on the 1st August 2025. + - [ ] Regenerate the API Key - - [ ] Update AWS Secrets Manager - - [ ] Redeploy the website - - [ ] Update the reminder for next year + - [ ] Reset knuff reminder # Optional. Knuff will append the reminder id to the reminder labels and use it prevent creating duplicates labels: - 'reminder' - - 'critical' # Required. Supports a single string or list of strings # See https://datatracker.ietf.org/doc/html/rfc5545 and https://www.npmjs.com/package/rrule @@ -70,7 +68,7 @@ Knuff works with JSON, but since it's so easy to convert YAML to JSON, and becau # Required. The list of repositories to post the reminder to repositories: - - 'acuminous/foo' + - 'acuminous/knuff' ``` ### Generating Reminders @@ -103,9 +101,7 @@ const config = { const octokit = new Octokit({ auth: GITHUB_TOKEN }); const drivers = { github: new GitHubDriver(octokit) }; -const knuff = new Knuff(config, drivers) - .on('error', console.error) - .on('progress', console.log); +const knuff = new Knuff(config, drivers).on('error', console.error) const reminders = yaml.parse(fs.readFileSync(PATH_TO_REMINDERS, 'utf8')); knuff.process(reminders).then((stats) => { diff --git a/examples/enterprise/reminders.yaml b/examples/enterprise/reminders.yaml index 3ad72cb..bcd6a74 100644 --- a/examples/enterprise/reminders.yaml +++ b/examples/enterprise/reminders.yaml @@ -1,10 +1,12 @@ - title: 'Regenerate API Key' body: | - [ ] Regenerate the API Key + - [ ] Reset knuff reminder labels: - - 'Critical' + - 'reminder' schedule: | - RRULE:FREQ=DAILY + DTSTART;TZID=Europe/London:20250701T080000 + RRULE:FREQ=DAILY;COUNT=1 repositories: - 'acuminous/knuff' @@ -14,6 +16,6 @@ labels: - 'chore' schedule: | - RRULE:FREQ=DAILY + RRULE:FREQ=MONTHLY;BYMONTHDAY=1 repositories: - 'acuminous/knuff' diff --git a/examples/personal/reminders.yaml b/examples/personal/reminders.yaml index 7d9f4b0..bcd6a74 100644 --- a/examples/personal/reminders.yaml +++ b/examples/personal/reminders.yaml @@ -1,10 +1,21 @@ - title: 'Regenerate API Key' body: | - [ ] Regenerate the API Key + - [ ] Reset knuff reminder labels: - - 'Reminder' - - 'Critical' + - 'reminder' schedule: | - RRULE:FREQ=DAILY + DTSTART;TZID=Europe/London:20250701T080000 + RRULE:FREQ=DAILY;COUNT=1 + repositories: + - 'acuminous/knuff' + +- title: 'Update dependencies' + body: | + - [ ] Update dependencies + labels: + - 'chore' + schedule: | + RRULE:FREQ=MONTHLY;BYMONTHDAY=1 repositories: - 'acuminous/knuff'