Skip to content

pr-agentの導入 #117 - #119

Merged
t1k2a merged 1 commit into
developmentfrom
feature
Oct 19, 2025
Merged

pr-agentの導入 #117#119
t1k2a merged 1 commit into
developmentfrom
feature

Conversation

@t1k2a

@t1k2a t1k2a commented Oct 19, 2025

Copy link
Copy Markdown
Owner

PR Type

Enhancement


Description

  • Introduces pr-agent GitHub Action workflow

  • Enables automated PR description generation

  • Enables automated PR code review functionality

  • Configures Japanese language output for all features


Diagram Walkthrough

flowchart LR
  A["GitHub Events<br/>PR opened/reopened/synchronized<br/>Issue comments"] -->|"Trigger"| B["pr-agent Workflow"]
  B -->|"Auto-describe"| C["Generate PR Description"]
  B -->|"Auto-review"| D["Review PR Code"]
  B -->|"Auto-improve"| E["Suggest Improvements"]
  C -->|"Output"| F["Japanese formatted output<br/>with conventional commit prefixes"]
  D -->|"Output"| F
  E -->|"Output"| F
Loading

File Walkthrough

Relevant files
Configuration changes
pr-agent.yml
Add pr-agent GitHub Actions workflow configuration             

.github/workflows/pr-agent.yml

  • Creates new GitHub Actions workflow for pr-agent integration
  • Configures workflow triggers for pull request events and issue
    comments
  • Sets up pr-agent action with OpenAI and GitHub token authentication
  • Enables auto-describe, auto-review, and auto-improve features
  • Adds Japanese language instructions with conventional commit prefixes
    for PR descriptions, reviews, and code suggestions
+26/-0   

@t1k2a
t1k2a merged commit f703695 into development Oct 19, 2025
4 checks passed
@qodo-code-review

Copy link
Copy Markdown

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Secret permissions scope

Description: The workflow requires OPENAI_KEY and GITHUB_TOKEN secrets; if these secrets are
over-scoped (e.g., classic token with excess repo/org permissions), an attacker exploiting
workflow runs or PRs could abuse them—ensure tokens are least-privileged and environment
protected.
pr-agent.yml [19-20]

Referred Code
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Ticket Compliance
🎫 No ticket provided
- [ ] Create ticket/issue <!-- /create_ticket --create_ticket=true -->

</details></td></tr>
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix incorrect action configuration syntax

Move the action's configuration parameters from the env block to a with block
and update the parameter names to the correct format for action inputs.

.github/workflows/pr-agent.yml [18-26]

 env:
  OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- github_action.auto_describe: true
- github_action.auto_review: true
- github_action.auto_improve: true
- PR_DESCRIPTION.EXTRA_INSTRUCTIONS: '日本語で記述してください。タイトルに次のPrefixをつけてください。`feat:`, `fix:`, `perf:`, `refactor:`, `test:`, `chore:`, `ci:`, `docs:` etc'
- PR_REVIEWER.EXTRA_INSTRUCTIONS: '日本語で記述してください。'
- PR_CODE_SUGGESTIONS.EXTRA_INSTRUCTIONS: '日本語で記述してください。'
+with:
+ auto_describe: true
+ auto_review: true
+ auto_improve: true
+ pr_description.extra_instructions: '日本語で記述してください。タイトルに次のPrefixをつけてください。`feat:`, `fix:`, `perf:`, `refactor:`, `test:`, `chore:`, `ci:`, `docs:` etc'
+ pr_reviewer.extra_instructions: '日本語で記述してください。'
+ pr_code_suggestions.extra_instructions: '日本語で記述してください。'
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical configuration error where action inputs are improperly set as environment variables, which would cause the action to ignore them. Applying this fix is essential for the workflow to function as intended.

High
General
Pin action to a specific version

Pin the qodo-ai/pr-agent action to a specific version tag (e.g., @v0.16.9)
instead of using @main to ensure workflow stability and prevent unexpected
breaking changes.

.github/workflows/pr-agent.yml [17]

-uses: qodo-ai/pr-agent@main
+uses: qodo-ai/pr-agent@v0.16.9
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion provides a valid and important best practice for GitHub Actions to enhance workflow stability and security by pinning the action to a specific version instead of the volatile @main branch.

Medium
  • More

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant