Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/pr-visual/pr-3-b854247.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions .github/pr-visual/pr-3-b854247.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
I will start by exploring the codebase to understand how the agentic logic is integrated and confirm the current state of the project.
I will now check `action.yml` to see the current inputs and how the action is intended to be used.
I will now examine `action/run.js` to see how the Gemini CLI is being used for PR analysis.
I will read `src/analyze.ts` to see if there is any additional information that could be relevant for the creative brief.
**Creative Brief: "Beyond the Diff — The Agentic Evolution of PR Visual"**

**Goal:** Visualize the transition of the `pr-visual` action from a basic diff-to-image tool to an "Agentic Analyst" that understands the entire codebase context.

**Key Insight:** Context is the bridge between code and clarity. By using Gemini CLI to read the repository alongside the diff, `pr-visual` now generates insights based on "why" and "how," not just "what changed."

**Visual Concept: "The Context Engine"**
A central, glowing Gemini "Brain" icon acting as a processor.
1. **Intelligent Input:** On the left, a raw Git Diff document merges with a translucent 3D "Codebase Tree" (representing the tool's new ability to read files). Both flow into the central Brain.
2. **Agentic Analysis:** Inside the Brain, show "gears" or "scanning beams" labeled "Agentic Context" and "Deep Understanding."
3. **Versioned Output:** On the right, instead of a single image, show a **stacked deck of three infographic cards**.
* The top card is vibrant and labeled "Latest (Commit `7f8e9a`)".
* The cards below are slightly faded and labeled with older SHAs (e.g., `4a2b3c`), representing the new commit-based history.
4. **UI Integration:** A small, clean callout box showing a "Previous versions" dropdown menu, mirroring the new GitHub comment UI.

**Style & Palette:**
* **Style:** TECH / DARK MODE.
* **Background:** Deep obsidian (#0d1117).
* **Accents:** Electric Cyan (#00d4ff) for active analysis, Neon Magenta (#ff00ff) for the versioned history, and Monospace typefaces for technical labels.
* **Atmosphere:** High-tech, precise, and automated.

**One Key Diagram:**
A horizontal flow: **[Diff + Repository] ➔ [Gemini Agent] ➔ [Versioned Infographic History]**.

**Headline:** "Context-Aware PR Visuals: Every Commit, Fully Understood."

IMPORTANT STYLE OVERRIDE: Use a CLEAN / CORPORATE style: Professional PowerPoint aesthetic, polished boxes with shadows, blues/grays/teal palette, clean sans-serif fonts, structured grid layout.
59 changes: 0 additions & 59 deletions .github/workflows/pr-visual-with-gemini-cli.yml.template

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/pr-visual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ name: PR Visual
on:
pull_request:
types: [opened, synchronize]
paths-ignore:
- '.github/pr-visual/**'

jobs:
visualize:
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/pr-visual.yml.template

This file was deleted.

55 changes: 4 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ name: PR Visual
on:
pull_request:
types: [opened, synchronize]
paths-ignore:
- '.github/pr-visual/**' # Prevent infinite loop

jobs:
visualize:
Expand All @@ -121,55 +119,10 @@ jobs:
```

The action will:
- Generate an infographic from the PR diff
- Commit it to `.github/pr-visual/` on the PR branch
- Post a comment with the embedded image

### Advanced: Agentic Mode with Gemini CLI

For complex PRs where raw diffs lack context, chain with [Gemini CLI](https://github.com/google-github-actions/run-gemini-cli) to let AI explore your codebase first:

```yaml
name: PR Visual (Agentic)

on:
pull_request:
types: [opened, synchronize]
paths-ignore:
- '.github/pr-visual/**' # Prevent infinite loop

jobs:
visualize:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# Step 1: Let Gemini CLI explore and understand the PR
- name: Understand PR
id: understand
uses: google-github-actions/run-gemini-cli@v1
with:
gemini_api_key: ${{ secrets.GEMINI_API_KEY }}
prompt: |
Explore this PR. Read files as needed to understand what it does.
Then write a concise creative brief for an infographic.
Scale complexity to the change - small fixes need simple visuals.
Output ONLY the brief.

# Step 2: Generate visual from the brief
- uses: gitethanwoo/pr-visual@v1
with:
gemini-api-key: ${{ secrets.GEMINI_API_KEY }}
prompt: ${{ steps.understand.outputs.summary }}
```

This approach produces better visuals because Gemini can read the actual code, not just the diff.
- Use [Gemini CLI](https://github.com/google-gemini/gemini-cli) to intelligently analyze the PR (can read files for context, not just the diff)
- Generate an infographic from the analysis
- Upload it to a GitHub Release (no commits to your PR branch!)
- Post a comment with the image and a collapsible prompt/history section

## CLI Reference

Expand Down
4 changes: 0 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ runs:
cd action
npm ci

- name: Install Gemini CLI
shell: bash
run: npm install -g @google/gemini-cli

- name: Generate PR Visual
id: generate
shell: bash
Expand Down
Loading