Skip to content

chore: add PydanticValidator for EnterpriseCredentialInventory - BED-10126 - #85

Merged
mykeelium merged 1 commit into
mainfrom
fix/add-enterpriseCredentialInventory
Oct 16, 2026
Merged

mykeelium merged 1 commit into
mainfrom
fix/add-enterpriseCredentialInventory

Conversation

@mykeelium

@mykeelium mykeelium commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Add a PydanticValidator for EnterpriseCredentialInventory

Summary by CodeRabbit

  • New Features
    • Added support for representing enterprise credential inventory exports, including export details, column information, and raw credential rows.
    • Export data can retain unrecognized credential types, malformed credential identifiers, and additional columns for later processing.
    • Inventory exports now validate that rows are provided as a list.

@mykeelium mykeelium self-assigned this Oct 16, 2026
@mykeelium mykeelium added the bug Something isn't working label Oct 16, 2026
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 38032132-76c7-4f13-806c-8a1884e3dd0c
📥 Commits

Reviewing files that changed from the base of the PR and between 2d9c526 and 622f063.

📒 Files selected for processing: 4
  • src/openhound_github/models/__init__.py
  • src/openhound_github/models/enterprise_credential_inventory.py
  • src/openhound_github/resources/enterprise.py
  • tests/test_classic_personal_access_tokens.py

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Walkthrough

The change adds and exports an EnterpriseCredentialInventory model. The credential inventory transformer uses it as its schema, and tests check validation of raw rows and parser behavior.

Changes

Credential inventory schema

Layer / File(s) Summary
Define and export the inventory model
src/openhound_github/models/enterprise_credential_inventory.py, src/openhound_github/models/__init__.py
Adds and exports a Pydantic model for export metadata, columns, and raw rows. as_of is optional and defaults to None; other fields are required.
Use and validate the inventory model
src/openhound_github/resources/enterprise.py, tests/test_classic_personal_access_tokens.py
The transformer uses the model as its schema. Tests check that validation preserves raw rows, rejects a non-list rows value, and lets the parser emit only the row with numeric credential ID 42.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: jaredcatkinson

Merge Risk: ⚪ Minimal · up to 622f0

The inventory model preserves the raw credential data and parser behavior covered by the tests. No actionable merge risk remains beyond normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the addition of Pydantic validation for EnterpriseCredentialInventory, which matches the main change.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks each row with care
Raw fields stay just as they were
A model names the columns clear
One numeric token passes here
The inventory’s shape is near
Hop, the tests confirm the gear!

Comment @coderabbitai help to get the list of available commands.

@jaredcatkinson jaredcatkinson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me

@mykeelium
mykeelium merged commit cbf5598 into main Oct 16, 2026
5 of 7 checks passed
@mykeelium
mykeelium deleted the fix/add-enterpriseCredentialInventory branch October 16, 2026 20:05

This branch was successfully deployed

1 active deployment
pypi — 622f063d Deployed Oct 16, 2026 by mykeelium via publish / build #60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants