Skip to content

Conversation

miroslavpojer
Copy link
Collaborator

@miroslavpojer miroslavpojer commented Sep 9, 2025

Release Notes:

  • Add support for Release notes on Issue.

Summary by CodeRabbit

  • New Features
    • Release notes now also extract entries from Issue bodies, not just Pull Requests.
  • Refactor
    • Standardized release notes assembly by delegating formatting to a shared base implementation.
  • Tests
    • Expanded fixtures and expectations to validate release notes extracted from Issue bodies.
  • Chores
    • Cleaned up unused imports and refreshed type hints/docstrings (no behavior changes).

Fixes #162

- Add support for Release notes on Issue.
Copy link

coderabbitai bot commented Sep 9, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Refactors to_chapter_row flow by implementing a concrete base in Record and delegating from CommitRecord, IssueRecord, and PullRequestRecord. Extends release-notes extraction to read from Issue bodies as well as PR bodies. Updates tests to include Issue.body and expected bullets. Minor typing import cleanup in GitHub rate limiter.

Changes

Cohort / File(s) Summary of changes
Base to_chapter_row refactor
release_notes_generator/model/record.py
Made Record.to_chapter_row concrete; it calls added_into_chapters() and returns an empty string. Removed @AbstractMethod, added guidance comment.
Subclass delegation to base
release_notes_generator/model/commit_record.py, release_notes_generator/model/pull_request_record.py
In to_chapter_row, replaced direct added_into_chapters() call with super().to_chapter_row(); remaining formatting logic unchanged.
Issue release-notes extraction
release_notes_generator/model/issue_record.py
get_rls_notes now scans Issue.body in addition to PR bodies. Generalized _get_rls_notes_default to accept Issue
Tests: fixtures and expectations
tests/conftest.py, tests/release_notes/test_release_notes_builder.py
Set Issue.body values in fixtures. Updated expected release notes strings to include bullets parsed from Issue bodies.
Misc cleanup
release_notes_generator/utils/github_rate_limiter.py
Removed unused typing import (cast). No behavior changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Builder as ReleaseNotesBuilder
  participant Records as Records (Issue/PR/Commit)
  participant Base as Record.to_chapter_row()
  participant IssueRec as IssueRecord
  participant PRRec as PullRequestRecord

  User->>Builder: build()
  Builder->>Records: iterate and to_chapter_row()
  activate Records
  Records->>Base: super().to_chapter_row()
  activate Base
  Base->>Base: added_into_chapters()  %% side-effect
  Base-->>Records: ""
  deactivate Base

  alt Issue
    Records->>IssueRec: get_rls_notes()
    activate IssueRec
    IssueRec->>IssueRec: _get_rls_notes_default(record=Issue|PR)
    IssueRec-->>Records: extracted notes (from Issue.body if present)
    deactivate IssueRec
  else Pull Request
    Records->>PRRec: get_rls_notes()
    activate PRRec
    PRRec-->>Records: extracted notes (from PR.body)
    deactivate PRRec
  end

  Records-->>Builder: formatted row + optional notes
  deactivate Records
  Builder-->>User: aggregated release notes
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • Zejnilovic
  • benedeki

Poem

A bunny taps notes with a rhythmic thrum,
From issues and PRs the carrots now come.
Super calls whisper, “chapters aligned,”
Bullets hop neatly, in tidy design.
Thump-thump—release lines bloom in the sun,
Another sprint closed—hip-hop, well done! 🥕🐇

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7b0e8c and ec9eecc.

📒 Files selected for processing (7)
  • release_notes_generator/model/commit_record.py (1 hunks)
  • release_notes_generator/model/issue_record.py (3 hunks)
  • release_notes_generator/model/pull_request_record.py (1 hunks)
  • release_notes_generator/model/record.py (1 hunks)
  • release_notes_generator/utils/github_rate_limiter.py (1 hunks)
  • tests/conftest.py (4 hunks)
  • tests/release_notes/test_release_notes_builder.py (4 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/162-Introduce-presence-of-Release-Notes-to-Issues

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@miroslavpojer miroslavpojer self-assigned this Sep 9, 2025
@miroslavpojer miroslavpojer merged commit ed943b5 into master Sep 9, 2025
5 of 6 checks passed
@miroslavpojer miroslavpojer deleted the feature/162-Introduce-presence-of-Release-Notes-to-Issues branch September 9, 2025 09:36
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.

Introduce presence of Release Notes to Issues

1 participant