Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cressie176 committed Dec 26, 2024
1 parent df741d9 commit f2aa149
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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) => {
Expand Down
8 changes: 5 additions & 3 deletions examples/enterprise/reminders.yaml
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -14,6 +16,6 @@
labels:
- 'chore'
schedule: |
RRULE:FREQ=DAILY
RRULE:FREQ=MONTHLY;BYMONTHDAY=1
repositories:
- 'acuminous/knuff'
17 changes: 14 additions & 3 deletions examples/personal/reminders.yaml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit f2aa149

Please sign in to comment.