Skip to content

Add on-call pages list#670

Draft
platinummonkey wants to merge 1 commit into
mainfrom
dd/feat/on-call-pages-list
Draft

Add on-call pages list#670
platinummonkey wants to merge 1 commit into
mainfrom
dd/feat/on-call-pages-list

Conversation

@platinummonkey

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds pup on-call pages list so users can list on-call page records from the CLI. The command wraps the currently usable unstable on-call pages endpoint while the stable v2 collection endpoint remains unavailable for listing.

Motivation

Issue #642 documents that pup on-call pages only supported create and get, leaving users without a programmable CLI path to inspect page volume by team or responder. This addresses the CLI-side gap in this repository while keeping the backend stable-endpoint request tracked separately.

Changes

  • Added an on-call pages list subcommand with --team, --responder, and --page-size options.
  • Fetches pages from /api/unstable/on-call/pages, applies team filtering server-side with filter=team:<handle>, and applies responder filtering client-side against relationships.responders.
  • Validates page size locally as 1..=1000 to match the unstable endpoint cap.
  • Added focused tests for query construction, invalid page-size handling, responder matching/filtering, and read-only command classification.
  • Updated README.md and docs/COMMANDS.md to include on-call page listing.

Testing

  • cargo +stable fmt --check
  • git diff --check
  • cargo +stable test on_call_pages --locked was attempted but blocked before compilation because Cargo could not fetch the pinned datadog-api-client git dependency in this sandbox; the GitHub fetch returned 403.

Additional Notes

This intentionally does not claim stable pagination or time-window support. The unstable endpoint does not provide working pagination, server-side responder filtering, or in-query time filtering, so those remain backend/API limitations.

Checklist

  • The code change follows the project conventions (see CONTRIBUTING.md)
  • Tests have been added/updated (if applicable)
  • Documentation has been updated (if applicable)
  • All CI checks pass
  • Code coverage is maintained or improved

Related Issues

Related to #642.


PR by Bits - View session in Datadog

Comment @DataDog to request changes

@datadog-datadog-us1-prod

Copy link
Copy Markdown

View session in Datadog

Bits Code status: ✅ Done

CI Auto-fix: Disabled | Enable

Comment @DataDog to request changes

@datadog-official

Copy link
Copy Markdown

I can only run on private repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants