Skip to content

Conversation

@PSthelyBlog
Copy link
Owner

Summary

  • Add ChangelogEntry Pydantic model with version, date, description fields
  • Add SupportLink Pydantic model with label, url fields
  • Update VersionInfo.changelog to use list[ChangelogEntry] instead of list[dict[str, str]]
  • Update SupportInfo.links to use list[SupportLink] instead of list[dict[str, str]]
  • Export new models from agents/__init__.py

Test plan

  • CI passes (lint, format, type check, tests)
  • Verify template rendering works with the new models

Closes #33

🤖 Generated with Claude Code

Add ChangelogEntry and SupportLink Pydantic models to properly type
the nested structures in VersionInfo and SupportInfo. This fixes the
Jinja2 template error where dict objects don't have expected attributes.

- Add ChangelogEntry model with version, date, description fields
- Add SupportLink model with label, url fields
- Update VersionInfo.changelog to use list[ChangelogEntry]
- Update SupportInfo.links to use list[SupportLink]
- Export new models from agents/__init__.py

Closes #33

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @PSthelyBlog, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the data structures used for publishing information by introducing dedicated Pydantic models for ChangelogEntry and SupportLink. This change enhances type safety and data validation for nested structures within VersionInfo and SupportInfo, making the data handling more robust and explicit, and aligning with Pydantic's strong typing benefits.

Highlights

  • New Pydantic Models: Introduced ChangelogEntry and SupportLink Pydantic models to provide structured validation for nested data related to version changelogs and support information.
  • Type-Safe Changelog: Updated the VersionInfo.changelog field to use list[ChangelogEntry], replacing the less specific list[dict[str, str]] for improved type safety and data integrity.
  • Structured Support Links: Modified the SupportInfo.links field to utilize list[SupportLink], enhancing type safety and clarity for support link data.
  • Module Export: The newly created Pydantic models (ChangelogEntry, SupportInfo, SupportLink) are now exported from the agents/__init__.py module, making them accessible throughout the package.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the data models for changelog entries and support links to use dedicated Pydantic models (ChangelogEntry and SupportLink) instead of generic dictionaries. This is a great improvement for type safety and code clarity. The changes are well-implemented. I've added a couple of suggestions to further enhance data validation by using more specific Pydantic and standard library types for dates and URLs. Overall, this is a solid contribution.

"""A changelog entry for version history."""

version: str = Field(..., description="Version number (e.g., '1.0.0')")
date: str = Field(..., description="Release date (e.g., '2026-01-20')")

Choose a reason for hiding this comment

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

medium

For improved type safety and automatic validation, consider changing the type of date from str to datetime.date. Pydantic can automatically parse date strings in 'YYYY-MM-DD' format into date objects. This would require adding from datetime import date at the top of the file.

"""A support link entry."""

label: str = Field(..., description="Link label (e.g., 'Bug Reports')")
url: str = Field(..., description="Link URL")

Choose a reason for hiding this comment

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

medium

For robust URL validation, consider using one of Pydantic's URL types, like AnyUrl or HttpUrl, instead of str. This will automatically validate that the provided string is a valid URL. You would need to import it from pydantic, for example: from pydantic import AnyUrl.

Refs #33

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@PSthelyBlog PSthelyBlog merged commit 1d32260 into main Jan 20, 2026
4 checks passed
@PSthelyBlog PSthelyBlog deleted the fix/33-publish-template-error branch January 20, 2026 07:01
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.

fix: Publish phase template error - dict objects missing expected attributes

2 participants