• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sgerrand / ex_granola / 34115182425
100%

Build:
DEFAULT BRANCH: main
Ran 07 Sep 2026 11:10AM UTC
Jobs 1
Files 10
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Sep 2026 11:09AM UTC coverage: 100.0% (+3.9%) from 96.094%
34115182425

push

github

web-flow
feat(audit): add Granola.Audit for the workspace audit log (#32)

* refactor(pagination): extract shared cursor paginator

Every list endpoint returns the same envelope: a list under an
endpoint-specific key, plus `hasMore` and `cursor`. Move that loop into
`Granola.Paginator` so new endpoints reuse it instead of copying it.

`Notes.stream/2` now delegates to the paginator. Behaviour is unchanged,
including throwing `{:error, reason}` on failure mid-iteration, except
that a page with `hasMore: true` and no cursor now halts instead of
refetching the first page forever.

* feat(audit): add Granola.Audit for the workspace audit log

Wraps `GET /v1/audit` with `list/2` and `stream/2`, matching the shape of
`Granola.Notes`. Filters: `action`, `occurred_after`, `occurred_before`,
`cursor`, `page_size`.

Events are returned as plain maps rather than structs. The action set is
open and Granola adds fields over time, so passing the decoded body
through keeps unknown actions and fields intact.

The audit log is an Enterprise feature with its own read-only API key, so
it needs a client separate from the one used for notes.

* docs(audit): document the audit log

Adds an Audit log section to the README covering the separate Enterprise
key, filters, event shape and streaming.

Calls out the traps in the API: events are ordered by `collected_at`
rather than `occurred_at`, pages can hold fewer events than asked for,
the action list grows over time, events last a year, `id` is opaque, and
rate limits are shared with every other key in the workspace.

* feat(client): let callers decode JSON keys as strings

`Granola.new/1` takes `keys: :atoms | :strings`, defaulting to `:atoms`
as before.

Atoms are never garbage collected, so decoding a response with atom keys
makes every key the API returns permanent for the life of the VM. Audit
events are the worst case: the action set is open, each action carries
its own `data` fields, and Granola adds more over time, so a collec... (continued)

35 of 35 new or added lines in 5 files covered. (100.0%)

142 of 142 relevant lines covered (100.0%)

23.32 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34115182425.1 07 Sep 2026 11:10AM UTC 10
100.0
GitHub Action Run
Source Files on build 34115182425
  • Tree
  • List 10
  • Changed 6
  • Source Changed 4
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34115182425
  • af0c9524 on github
  • Prev Build on main (#33894672907)
  • Next Build on main (#34115349260)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc