Skip to content

Releases: textcortex/claude-code-pr-autodoc-action

v1.0.4

10 Jun 14:47
Compare
Choose a tag to compare

v1.0.3

24 May 14:39
Compare
Choose a tag to compare
  • Prevent branch collision

Full Changelog: v1...v1.0.3

v1.0.2

24 May 14:28
Compare
Choose a tag to compare
  • Make labels optional

Full Changelog: v1...v1.0.2

v1.0.1

24 May 13:25
Compare
Choose a tag to compare
  • Update attribution

Full Changelog: v1...v1.0.1

v1.0.0

24 May 13:15
Compare
Choose a tag to compare

Automatically generate comprehensive documentation for your merged pull requests using Claude Code. This GitHub Action helps maintain consistent and detailed documentation by analyzing PR changes and creating well-structured markdown files.

✨ Key Features

  • 🤖 AI-Powered Documentation: Uses Claude Code to analyze code changes and generate meaningful documentation
  • ⚙️ Highly Configurable: Customize thresholds, prompts, and output directories
  • 🔄 Automatic PR Creation: Creates a new PR with the generated documentation
  • 📊 Smart Filtering: Only documents PRs that meet your criteria (lines/files changed)
  • 🏷️ Customizable Tags: Add custom tags to commits and PR titles
  • 🚀 Easy Integration: Works seamlessly with the Claude GitHub app
  • 🏃 Runs on Your Infrastructure: The action executes entirely on your own GitHub runner
  • ☁️ Multi-Cloud Support: Works with Anthropic API, AWS Bedrock, and Google Vertex AI

🚀 Quick Start

The easiest way to get started if you already have the Claude GitHub app installed:

name: Auto-generate PR Documentation

on:
  pull_request:
    types: [closed]
    branches: [main]

jobs:
  generate-documentation:
    if: |
      github.event.pull_request.merged == true &&
      github.event.pull_request.user.type != 'Bot' &&
      !startsWith(github.event.pull_request.title, 'docs: Add documentation for PR')
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
    
    steps:
      - uses: anthropics/claude-code-pr-autodoc-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

📋 Prerequisites

  1. Install the Claude GitHub app: https://github.com/apps/claude
  2. Add ANTHROPIC_API_KEY to your repository secrets

🛠️ Configuration Options

Input Description Default
anthropic_api_key Anthropic API key -
min_lines_changed Minimum lines changed to trigger documentation 50
min_files_changed Minimum files changed to trigger documentation 1
documentation_directory Directory for documentation files docs/prs
timeout_minutes Timeout for Claude (minutes) 10
custom_instructions Additional instructions for Claude -

See full configuration options in the README

☁️ Cloud Provider Support

Direct Anthropic API (Default)

- uses: anthropics/claude-code-pr-autodoc-action@v1
  with:
    anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

AWS Bedrock

- uses: anthropics/claude-code-pr-autodoc-action@v1
  with:
    model: "anthropic.claude-3-7-sonnet-20250219-beta:0"
    use_bedrock: "true"
    github_token: ${{ steps.app-token.outputs.token }}

Google Vertex AI

- uses: anthropics/claude-code-pr-autodoc-action@v1
  with:
    model: "claude-3-7-sonnet@20250219"
    use_vertex: "true"
    github_token: ${{ steps.app-token.outputs.token }}

🔒 Security Features

  • API Key Protection: Never hardcode your Anthropic API key
  • Bot Loop Prevention: Built-in checks prevent infinite documentation loops
  • Commit Signing: All commits are automatically signed
  • Minimal Permissions: Only requires necessary GitHub permissions

📖 Documentation Output

The action creates structured markdown files with:

  • YAML frontmatter with metadata
  • Purpose and context analysis
  • Key modifications documentation
  • Technical implementation details
  • Impact assessment
  • Breaking changes (if any)

📁 Example Output Structure

docs/prs/
├── 2024-01-15-implement-redis-caching.md
├── 2024-01-16-add-user-authentication.md
└── 2024-01-17-optimize-database-queries.md

🎯 Use Cases

  • Code Review Documentation: Maintain detailed records of significant changes
  • Team Knowledge Sharing: Help new team members understand past decisions
  • Compliance: Create audit trails for regulated environments
  • Release Notes: Generate content for release documentation
  • Architecture Documentation: Track major technical decisions

🔧 Troubleshooting

Documentation not generated?

  1. Check if the PR meets the minimum thresholds
  2. Verify the Anthropic API key is correctly set
  3. Ensure the Claude GitHub app is installed

Need help? Check out the full documentation and examples.


📚 More Information

Built with ❤️ by the TextCortex team

Full Changelog: https://github.com/textcortex/claude-code-pr-autodoc-action/commits/v1.0.0