GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — support writing the review to other output locations by andrew8088 · Pull Request #2 · classdojo/claude-code-action

Conversation

@andrew8088

@andrew8088 andrew8088 commented Jul 4, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

We want to be able to write the clod code review to multiple locations, not just commenting on a pull request, but also commenting directly on a commit or even just writing the review to stdout.

Claude Code's summary after writing the code:

New Features Added:

  1. Action Inputs (action.yml):
  • output_mode: Comma-separated list supporting pr_comment, commit_comment, stdout
  • commit_sha: Optional specific commit SHA for commit comments
  1. Strategy Pattern Architecture:
  • OutputStrategy interface for consistent implementation
  • PrCommentStrategy: Existing PR/issue comment logic (refactored)
  • CommitCommentStrategy: Creates comments on specific commits
  • StdoutStrategy: Outputs to workflow logs in plain text format
  1. OutputManager Class:
  • Parses and validates output mode configurations
  • Handles multiple output strategies simultaneously
  • Provides error resilience (continues if some strategies fail)
  • Maintains backward compatibility
  1. Updated Entry Points:
  • prepare.ts: Uses OutputManager for initial tracking
  • update-comment-link.ts: Uses OutputManager for final results

Key Features:

✅ Backward Compatibility: Default output_mode: "pr_comment" preserves existing behavior

✅ Flexible Configuration:

  • output_mode: "pr_comment" - Traditional PR comments (default)
  • output_mode: "commit_comment" - Comments on specific commits
  • output_mode: "stdout" - Plain text output to workflow logs
  • output_mode: "pr_comment,stdout" - Multiple outputs simultaneously

✅ Smart Commit Resolution:

  1. Uses explicit commit_sha if provided
  2. Falls back to PR HEAD commit
  3. Falls back to workflow commit SHA

✅ Error Handling: Individual strategy failures don't break the entire action

✅ Context Validation: Ensures output modes are valid for the GitHub context

The implementation successfully makes the GitHub Action's review output more general and configurable while maintaining full backward
compatibility.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
andrew8088 added 2 commits July 4, 2025 15:04
@andrew8088
support writing the review to other output locations
255d102
@andrew8088
formatting
d78ddfd
@andrew8088
andrew8088 merged commit 365ecec into main Jul 4, 2025
dts pushed a commit that referenced this pull request Oct 8, 2025
@km-tr @claude
fix: correct assignee trigger test to handle different assignee prope…
13ccdab
…rly (anthropics#178)

* fix: use direct assignee field

* fix: correct assignee trigger test to handle different assignee properly

The test was failing because the mockIssueAssignedContext was missing the
top-level assignee field that the trigger validation logic checks. Added
the missing assignee field to the mock context and updated the test to
properly override both the top-level assignee and issue.assignee fields
when testing assignment to a different user.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* Adjust IssuesAssignedEvent import position (#2)

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@andrew8088
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.