Skip to content

Conversation

@joamatab
Copy link
Contributor

@joamatab joamatab commented Feb 10, 2026

  • add gdsfactoryplus
  • add_version
  • add_code_owners
  • update_gdsfactory9.34
  • update_gdsfactory_9.34
  • remove_required_label
  • remove_dependabot
  • add_agents

Summary by Sourcery

Update dependencies and CI workflows while introducing AI-assisted code review and coding standards documentation.

New Features:

  • Introduce a Claude-based PR review workflow for automated code review assistance.

Enhancements:

  • Bump gdsfactory dependency to version 9.34.0.
  • Document required pre-commit checks and coding standards for contributors in AGENTS.md.

CI:

  • Simplify the release-drafter workflow by removing required-label enforcement from it.
  • Remove the standalone required-labels workflow.
  • Add a Claude PR review GitHub Actions workflow for AI-assisted reviews.

Documentation:

  • Add AGENTS.md documenting required pre-commit usage and quality checks.

Chores:

  • Remove Dependabot configuration from the repository.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 10, 2026

Reviewer's Guide

Updates the project to gdsfactory 9.34, introduces an automated Claude-based PR review workflow and AGENTS guidelines, and removes legacy GitHub automation for required labels and Dependabot.

Sequence diagram for Claude PR review workflow triggers and interactions

sequenceDiagram
    actor Developer
    participant GitHub
    participant Claude_PR_Workflow
    participant Claude_Code_Action
    participant Anthropic_API

    Developer->>GitHub: Open or update pull_request
    GitHub-->>Claude_PR_Workflow: Trigger claude-pr-review (pull_request event)
    Claude_PR_Workflow->>Claude_Code_Action: Run anthropics/claude-code-action@beta
    Claude_Code_Action->>GitHub: Read PR diff, files, comments
    Claude_Code_Action->>Anthropic_API: Send review request (model claude-sonnet-4-20250514)
    Anthropic_API-->>Claude_Code_Action: Return review feedback
    Claude_Code_Action->>GitHub: Post PR review comments

    Developer->>GitHub: Add issue_comment with @claude on PR
    GitHub-->>Claude_PR_Workflow: Trigger claude-pr-review (issue_comment event)
    Claude_PR_Workflow->>Claude_Code_Action: Run anthropics/claude-code-action@beta
    Claude_Code_Action->>GitHub: Read PR context for comment
    Claude_Code_Action->>Anthropic_API: Send follow-up review request
    Anthropic_API-->>Claude_Code_Action: Return updated feedback
    Claude_Code_Action->>GitHub: Post additional comments on PR
Loading

Flow diagram for PR lifecycle with Claude review and removed label requirement

flowchart TD
    A["Developer opens or updates PR"] --> B["GitHub triggers claude-pr-review workflow"]
    B --> C["Checkout repository (actions/checkout@v4)"]
    C --> D["Run anthropics/claude-code-action@beta"]
    D --> E["Claude reads PR changes and AGENTS.md guidelines"]
    E --> F["Claude sends analysis request to Anthropic API"]
    F --> G["Anthropic returns review feedback"]
    G --> H["Claude posts review comments on PR"]

    H --> I{"Developer updates code?"}
    I -->|Yes| A
    I -->|No| J["PR ready for human maintainer review and merge"]

    %% Removed legacy steps
    J --> K["No automatic required-label check (require-labels.yml removed)"]
    J --> L["No Dependabot automation (dependabot.yml removed)"]
Loading

File-Level Changes

Change Details Files
Upgrade core gdsfactory dependency version used by the project.
  • Bump gdsfactory dependency from ~=9.31.0 to ~=9.34.0 in project dependencies
pyproject.toml
Add Claude-based automated pull request review workflow for this repository.
  • Create a GitHub Actions workflow that triggers on PR events and @claude issue comments
  • Configure anthropics/claude-code-action with project-specific review focus areas and allowed tools
  • Grant required permissions for the action to read contents and write PR and issue comments
.github/workflows/claude-pr-review.yml
Introduce AGENTS documentation with required pre-commit practices for contributors and AI agents.
  • Add AGENTS.md describing required pre-commit usage before commits
  • Document reliance on ruff and other pre-commit hooks as mandatory quality gates
AGENTS.md
Simplify the Release Drafter workflow by removing label-enforcement logic.
  • Rename workflow to focus solely on Release Drafter
  • Remove pull_request trigger so workflow only runs on pushes to main
  • Delete the require_label job that enforced required labels on PRs
.github/workflows/release-drafter.yml
Remove obsolete repository automation for Dependabot and label requirements now handled elsewhere or no longer needed.
  • Delete Dependabot configuration file
  • Delete separate GitHub Actions workflow that enforced required labels on PRs
.github/dependabot.yml
.github/workflows/require-labels.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Consider pinning anthropics/claude-code-action to a specific version or tag instead of @beta to avoid unexpected behavior changes from upstream updates.
  • The claude-pr-review job currently has issues: write and id-token: write permissions; if the action doesn’t actually need these capabilities, tightening the permissions to the minimum required would reduce the workflow’s security surface.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider pinning `anthropics/claude-code-action` to a specific version or tag instead of `@beta` to avoid unexpected behavior changes from upstream updates.
- The `claude-pr-review` job currently has `issues: write` and `id-token: write` permissions; if the action doesn’t actually need these capabilities, tightening the permissions to the minimum required would reduce the workflow’s security surface.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ThomasPluck ThomasPluck merged commit 9001c84 into main Feb 10, 2026
6 checks passed
@ThomasPluck ThomasPluck deleted the add_agents branch February 10, 2026 11:40
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