Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 55 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter
name-template: v$RESOLVED_VERSION
tag-template: v$RESOLVED_VERSION

template: |
$CHANGES

## OpenAPI spec

<!-- OPENAPI_DIFF -->

categories:
- title: 🚀 New features and improvements
labels:
- enhancement
- title: 🐛 Bug fixes
labels:
- bug
- title: 📝 Documentation updates
labels:
- documentation
- title: 👻 Maintenance
labels:
- chore
- maintenance
- title: 🚦 Tests
labels:
- test
- title: ✍ Other changes
- title: 📦 Dependency updates
labels:
- dependencies
collapse-after: 5
- title: 🔐 Security
labels:
- "🔐 security"
- type: version-resolver
semver-increment: major
when:
label: major
- type: version-resolver
semver-increment: minor
when:
label: minor
- type: version-resolver
semver-increment: patch

exclude-labels:
- skip-changelog
- invalid

autolabeler:
- label: "documentation"
files:
- "*.md"
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
lint:
runs-on: ubuntu-latest
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

Expand All @@ -21,7 +21,7 @@ jobs:
run: pip install uv

- name: Install dependencies
run: uv pip install --system "ruff>=0.15.0"
run: uv pip install --system "ruff==0.16.3"

- name: Ruff check
run: ruff check .
Expand All @@ -30,10 +30,10 @@ jobs:
run: ruff format --check .

test:
runs-on: ubuntu-latest
runs-on: blacksmith-2vcpu-ubuntu-2404
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build-and-publish:
runs-on: ubuntu-latest
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -39,4 +39,4 @@ jobs:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/*
twine upload dist/*
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.0.0] - 2026-08-14

### Added
- Alert retrigger rule endpoints and models
- Status page announcement, component, and component group endpoints and models
- Verified domain endpoints and models
- Freshservice retrospective PDF workflow task support

### Changed
- Regenerated the client from the latest OpenAPI specification
- **BREAKING**: Replaced `AutoAssignRoleRootlyTaskParams` with target-specific variants for escalation policies,
services, users, groups, and schedules

### Fixed
- Applied the nullable enum fix to generated model files

## [1.4.0] - 2026-07-20

### Added
Expand Down Expand Up @@ -176,4 +192,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Previous Releases

Changes before this version were not systematically tracked in a changelog.
Changes before this version were not systematically tracked in a changelog.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ NEW_PATCH := $(MAJOR).$(MINOR).$(shell echo $$(($(PATCH) + 1)))

# Today's date
TODAY := $(shell date +%Y-%m-%d)
RUFF_VERSION := 0.16.3

bump-major:
@echo "Bumping version: $(CURRENT_VERSION) -> $(NEW_MAJOR)"
Expand Down Expand Up @@ -42,9 +43,9 @@ regenerate:
@echo "Applying nullable enum fix..."
@python tools/fix_nullable_enums.py
@echo "Fixing lint errors..."
@ruff check --fix rootly_sdk/
@uvx --from ruff==$(RUFF_VERSION) ruff check --fix .
@echo "Formatting patched files..."
@ruff format rootly_sdk/
@uvx --from ruff==$(RUFF_VERSION) ruff format .

test:
python -c "import rootly_sdk; print('SDK imports successfully')"
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ By default, when you're calling an HTTPS API it will attempt to verify that SSL

```python
client = AuthenticatedClient(
base_url="https://internal_api.example.com",
base_url="https://internal_api.example.com",
token="SuperSecretToken",
verify_ssl="/path/to/certificate_bundle.pem",
)
Expand All @@ -56,11 +56,7 @@ client = AuthenticatedClient(
You can also disable certificate validation altogether, but beware that **this is a security risk**.

```python
client = AuthenticatedClient(
base_url="https://internal_api.example.com",
token="SuperSecretToken",
verify_ssl=False
)
client = AuthenticatedClient(base_url="https://internal_api.example.com", token="SuperSecretToken", verify_ssl=False)
```

Things to know:
Expand All @@ -81,13 +77,16 @@ There are more settings on the generated `Client` class which let you control mo
```python
from rootly_sdk import Client


def log_request(request):
print(f"Request event hook: {request.method} {request.url} - Waiting for response")


def log_response(response):
request = response.request
print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}")


client = Client(
base_url="https://api.example.com",
httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}},
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "rootly"
version = "1.4.0"
version = "2.0.0"
description = "A client library for accessing Rootly API v1"
authors = []
readme = "README.md"
Expand Down
69 changes: 34 additions & 35 deletions rootly_sdk/api/ai_chat/create_ai_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,25 @@
def _get_kwargs(
*,
message: str,
session_id: UUID | Unset = UNSET,
incident_id: UUID | Unset = UNSET,
alert_id: UUID | Unset = UNSET,
session_id: Unset | UUID = UNSET,
incident_id: Unset | UUID = UNSET,
alert_id: Unset | UUID = UNSET,
) -> dict[str, Any]:

params: dict[str, Any] = {}

params["message"] = message

json_session_id: str | Unset = UNSET
json_session_id: Unset | str = UNSET
if not isinstance(session_id, Unset):
json_session_id = str(session_id)
params["session_id"] = json_session_id

json_incident_id: str | Unset = UNSET
json_incident_id: Unset | str = UNSET
if not isinstance(incident_id, Unset):
json_incident_id = str(incident_id)
params["incident_id"] = json_incident_id

json_alert_id: str | Unset = UNSET
json_alert_id: Unset | str = UNSET
if not isinstance(alert_id, Unset):
json_alert_id = str(alert_id)
params["alert_id"] = json_alert_id
Expand Down Expand Up @@ -83,9 +82,9 @@ def sync_detailed(
*,
client: AuthenticatedClient,
message: str,
session_id: UUID | Unset = UNSET,
incident_id: UUID | Unset = UNSET,
alert_id: UUID | Unset = UNSET,
session_id: Unset | UUID = UNSET,
incident_id: Unset | UUID = UNSET,
alert_id: Unset | UUID = UNSET,
) -> Response[AiChatResponse | Any]:
"""Send AI chat message

Expand All @@ -95,16 +94,16 @@ def sync_detailed(

Args:
message (str):
session_id (UUID | Unset):
incident_id (UUID | Unset):
alert_id (UUID | Unset):
session_id (Union[Unset, UUID]):
incident_id (Union[Unset, UUID]):
alert_id (Union[Unset, UUID]):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AiChatResponse | Any]
Response[Union[AiChatResponse, Any]]
"""

kwargs = _get_kwargs(
Expand All @@ -125,9 +124,9 @@ def sync(
*,
client: AuthenticatedClient,
message: str,
session_id: UUID | Unset = UNSET,
incident_id: UUID | Unset = UNSET,
alert_id: UUID | Unset = UNSET,
session_id: Unset | UUID = UNSET,
incident_id: Unset | UUID = UNSET,
alert_id: Unset | UUID = UNSET,
) -> AiChatResponse | Any | None:
"""Send AI chat message

Expand All @@ -137,16 +136,16 @@ def sync(

Args:
message (str):
session_id (UUID | Unset):
incident_id (UUID | Unset):
alert_id (UUID | Unset):
session_id (Union[Unset, UUID]):
incident_id (Union[Unset, UUID]):
alert_id (Union[Unset, UUID]):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AiChatResponse | Any
Union[AiChatResponse, Any]
"""

return sync_detailed(
Expand All @@ -162,9 +161,9 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
message: str,
session_id: UUID | Unset = UNSET,
incident_id: UUID | Unset = UNSET,
alert_id: UUID | Unset = UNSET,
session_id: Unset | UUID = UNSET,
incident_id: Unset | UUID = UNSET,
alert_id: Unset | UUID = UNSET,
) -> Response[AiChatResponse | Any]:
"""Send AI chat message

Expand All @@ -174,16 +173,16 @@ async def asyncio_detailed(

Args:
message (str):
session_id (UUID | Unset):
incident_id (UUID | Unset):
alert_id (UUID | Unset):
session_id (Union[Unset, UUID]):
incident_id (Union[Unset, UUID]):
alert_id (Union[Unset, UUID]):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AiChatResponse | Any]
Response[Union[AiChatResponse, Any]]
"""

kwargs = _get_kwargs(
Expand All @@ -202,9 +201,9 @@ async def asyncio(
*,
client: AuthenticatedClient,
message: str,
session_id: UUID | Unset = UNSET,
incident_id: UUID | Unset = UNSET,
alert_id: UUID | Unset = UNSET,
session_id: Unset | UUID = UNSET,
incident_id: Unset | UUID = UNSET,
alert_id: Unset | UUID = UNSET,
) -> AiChatResponse | Any | None:
"""Send AI chat message

Expand All @@ -214,16 +213,16 @@ async def asyncio(

Args:
message (str):
session_id (UUID | Unset):
incident_id (UUID | Unset):
alert_id (UUID | Unset):
session_id (Union[Unset, UUID]):
incident_id (Union[Unset, UUID]):
alert_id (Union[Unset, UUID]):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AiChatResponse | Any
Union[AiChatResponse, Any]
"""

return (
Expand Down
6 changes: 1 addition & 5 deletions rootly_sdk/api/ai_chat/delete_ai_chat_session.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from http import HTTPStatus
from typing import Any
from urllib.parse import quote
from uuid import UUID

import httpx
Expand All @@ -13,12 +12,9 @@
def _get_kwargs(
id: UUID,
) -> dict[str, Any]:

_kwargs: dict[str, Any] = {
"method": "delete",
"url": "/v1/ai/chat/sessions/{id}".format(
id=quote(str(id), safe=""),
),
"url": f"/v1/ai/chat/sessions/{id}",
}

return _kwargs
Expand Down
Loading