Skip to content

Cli sr create impact#31

Merged
thibaultleouay merged 9 commits into
mainfrom
cli-sr-create-impact
Jun 11, 2026
Merged

Cli sr create impact#31
thibaultleouay merged 9 commits into
mainfrom
cli-sr-create-impact

Conversation

@thibaultleouay

Copy link
Copy Markdown
Member

No description provided.

@thibaultleouay

Copy link
Copy Markdown
Member Author

@claude review this

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the status-report (alias sr) workflows to support per-component impact on create and add-update, and surfaces impact details in interactive wizards and report output.

Changes:

  • Add --impact COMPONENT_ID=LEVEL (repeatable) to sr create and sr add-update, plus parsing/validation utilities.
  • Enhance the interactive wizards to select and review per-component impacts, and show impact diffs after updates.
  • Extend status-report info output (table + JSON) to include current impacts and per-update impact changes; bump CLI version and update generated docs.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Adds examples for per-component impact usage.
internal/statusreport/testhelpers_test.go Adds shared helpers for capturing/decoding request bodies in tests.
internal/statusreport/statusreport.go Adds impact enum/string conversion and helper functions for impact aggregation & ordering.
internal/statusreport/statusreport_wizard.go Updates create/add-update wizards to collect and summarize per-component impacts.
internal/statusreport/statusreport_info.go Adds “Affected” section + JSON fields for current impacts and per-update impacts.
internal/statusreport/statusreport_impact_test.go Adds unit tests for impact parsing and conversion helpers.
internal/statusreport/statusreport_create.go Refactors create API to params struct; adds --impact flag and request wiring.
internal/statusreport/statusreport_create_test.go Updates tests for new params struct and verifies request bodies with impacts.
internal/statusreport/statusreport_add_update.go Refactors add-update API to params struct; adds --impact flag and prints impact diffs.
internal/statusreport/statusreport_add_update_test.go Updates tests for new params struct and verifies request bodies with impacts.
internal/statusreport/impact_flag.go Implements --impact flag parsing and validation.
internal/cmd/app.go Bumps CLI version to v1.2.1.
internal/cmd/app_test.go Updates version assertion.
go.mod Updates protobuf/connect dependencies.
go.sum Updates module checksums for dependency bumps.
docs/openstatus.1 Updates man page for new flags (but currently mangles the --impact placeholder text).
docs/openstatus-docs.md Updates markdown docs for new flags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md

# Update an incident and change impact
openstatus sr add-update sr_42 --status monitoring --message "Recovering" \
--impact comp_api=degraded,comp_db=operational
Comment on lines +100 to 103
&cli.StringSliceFlag{
Name: "impact",
Usage: "Per-component impact, repeatable: --impact <component_id>=<level> (level: operational, degraded, partial_outage, major_outage). Mutually exclusive with --component-ids.",
},
Comment on lines +159 to +162
&cli.StringSliceFlag{
Name: "impact",
Usage: "Per-component impact, repeatable: --impact <component_id>=<level> (level: operational, degraded, partial_outage, major_outage). Can also add new affected components.",
},
}
}
}

@thibaultleouay
thibaultleouay merged commit 2889b42 into main Jun 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants