{"id":30044541,"url":"https://github.com/overtrue/conventional-pr-title","last_synced_at":"2025-08-07T06:40:51.455Z","repository":{"id":307416645,"uuid":"1028919682","full_name":"overtrue/conventional-pr-title","owner":"overtrue","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-31T06:24:37.000Z","size":3344,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-31T06:33:13.895Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/overtrue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-30T08:56:06.000Z","updated_at":"2025-07-31T06:24:41.000Z","dependencies_parsed_at":"2025-07-31T06:33:21.495Z","dependency_job_id":"a41ee11f-2c35-47a3-97ad-6f2a27767f47","html_url":"https://github.com/overtrue/conventional-pr-title","commit_stats":null,"previous_names":["overtrue/conventional-pr-title"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/overtrue/conventional-pr-title","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fconventional-pr-title","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fconventional-pr-title/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fconventional-pr-title/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fconventional-pr-title/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/overtrue","download_url":"https://codeload.github.com/overtrue/conventional-pr-title/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fconventional-pr-title/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269213686,"owners_count":24379495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-07T06:40:47.212Z","updated_at":"2025-08-07T06:40:51.418Z","avatar_url":"https://github.com/overtrue.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Conventional PR Title Action\n\nA GitHub Action that automatically suggests or updates PR titles to follow the [Conventional Commits](https://conventionalcommits.org/) standard using AI.\n\n## Features\n\n- 🤖 **AI-Powered**: Leverages AI providers to generate intelligent title suggestions\n- 📝 **Conventional Commits**: Ensures PR titles follow the Conventional Commits specification\n- 🔄 **Dual Modes**: Auto-update titles or suggest improvements via comments\n- ⚙️ **Highly Configurable**: Extensive customization options for validation rules and AI behavior\n- 🎯 **Smart Analysis**: Analyzes changed files and PR content for context-aware suggestions\n- 🛡️ **Robust**: Comprehensive error handling with retry mechanisms and fallbacks\n\n## Quick Start\n\n### 🚀 Simple Usage\n\n```yaml\nname: PR Title Check\non:\n  pull_request:\n    types: [opened, synchronize, reopened, edited]\n\njobs:\n  conventional-title:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: overtrue/conventional-pr-title@v1\n        with:\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n          model: 'openai/gpt-4o-mini'  # 或者简写为 'openai'\n```\n\n### 🔧 Advanced Usage\n\n```yaml\nname: PR Title Check\non:\n  pull_request:\n    types: [opened, synchronize, reopened, edited]\n\njobs:\n  conventional-title:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: overtrue/conventional-pr-title@v1\n        with:\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n          model: 'anthropic/claude-3-5-sonnet-20241022'\n          mode: 'auto'  # 自动更新标题\n          include-scope: 'true'\n          debug: 'true'\n```\n\n### 📝 Model Examples\n\nThe action supports multiple AI providers with flexible model specification:\n\n```yaml\n# OpenAI models\nmodel: 'openai/gpt-4o-mini'      # 完整格式\nmodel: 'openai'                  # 简写格式，使用默认模型\n\n# Anthropic models\nmodel: 'anthropic/claude-3-5-sonnet-20241022'\nmodel: 'anthropic'               # 使用默认 Claude 模型\n\n# Google models\nmodel: 'google/gemini-1.5-flash'\nmodel: 'google'                  # 使用默认 Gemini 模型\n\n# Other providers\nmodel: 'mistral/mistral-large-latest'\nmodel: 'xai/grok-beta'\nmodel: 'cohere/command-r-plus'\nmodel: 'azure/gpt-4o-mini'\nmodel: 'vertex/gemini-1.5-flash'\n```\n\n\u003e For more models, please refer to the [AI SDK v5 Providers and Models documentation](https://v5.ai-sdk.dev/docs/foundations/providers-and-models).\n\n### 🔑 Environment Variables\n\n#### API Keys (Required)\nSet your API keys as GitHub secrets:\n\n```bash\n# OpenAI\nOPENAI_API_KEY=sk-...\n\n# Anthropic\nANTHROPIC_API_KEY=sk-ant-...\n\n# Google\nGOOGLE_API_KEY=...\n\n# Mistral\nMISTRAL_API_KEY=...\n\n# xAI\nXAI_API_KEY=...\n\n# Cohere\nCOHERE_API_KEY=...\n\n# Azure\nAZURE_API_KEY=...\n\n# Vertex AI\nGOOGLE_VERTEX_API_KEY=...\n```\n\n#### Custom Base URLs (Optional)\nFor using custom endpoints or proxy servers:\n\n```bash\n# OpenAI\nOPENAI_BASE_URL=https://api.openai.com/v1\n\n# Anthropic\nANTHROPIC_BASE_URL=https://api.anthropic.com/v1\n\n# Google\nGOOGLE_BASE_URL=https://generativelanguage.googleapis.com\n\n# Mistral\nMISTRAL_BASE_URL=https://api.mistral.ai\n\n# xAI\nXAI_BASE_URL=https://api.x.ai\n\n# Cohere\nCOHERE_BASE_URL=https://api.cohere.ai\n\n# Azure\nAZURE_BASE_URL=https://your-resource.openai.azure.com\n\n# Vertex AI\nGOOGLE_VERTEX_BASE_URL=https://us-central1-aiplatform.googleapis.com\n```\n\n#### Example with Custom Endpoint\n```yaml\n- uses: ./\n  with:\n    model: 'openai/gpt-4o-mini'\n  env:\n    OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n    OPENAI_BASE_URL: ${{ secrets.CUSTOM_OPENAI_ENDPOINT }}\n```\n\n## Configuration\n\n### Required Inputs\n\n| Input | Description | Example |\n|-------|-------------|---------|\n| `github-token` | GitHub token for API access | `${{ secrets.GITHUB_TOKEN }}` |\n| `model` | AI model to use (provider/model format or just provider) | `openai/gpt-4o-mini`, `anthropic` |\n\n### Optional Inputs\n\n| Input | Description | Default | Example |\n|-------|-------------|---------|---------|\n| `mode` | Operation mode: `auto` or `suggest` | `suggest` | `auto` |\n| `include-scope` | Whether to prefer including scope in generated titles | `true` | `false` |\n| `skip-if-conventional` | Skip processing if title already follows conventional commits | `true` | `false` |\n| `debug` | Enable debug logging | `false` | `true` |\n\n### Validation Rules\n\n| Input | Description | Default |\n|-------|-------------|---------|\n| `allowed-types` | Comma-separated list of allowed commit types | `feat,fix,docs,style,refactor,test,chore,perf,ci,build,revert` |\n| `require-scope` | Whether to require a scope in commit messages | `false` |\n| `max-length` | Maximum allowed length for PR title | `72` |\n| `min-description-length` | Minimum length for description part | `3` |\n\n### Customization\n\n| Input | Description | Default |\n|-------|-------------|---------|\n| `custom-prompt` | Custom prompt template for AI title generation | `''` |\n| `comment-template` | Custom template for suggestion comments | `''` |\n| `match-language` | Respond in the same language as the original PR title | `true` |\n| `auto-comment` | Add a comment when auto-updating PR title | `true` |\n\n## Supported AI Models\n\nFor the complete list of supported models and providers, please refer to the [AI SDK v5 Providers and Models documentation](https://v5.ai-sdk.dev/docs/foundations/providers-and-models).\n\nThe action supports all providers and models available in AI SDK v5, including:\n\n- **OpenAI**: GPT-4 series, o1/o3/o4 reasoning models, GPT-3.5 Turbo\n- **Anthropic**: Claude 4, Claude 3.5/3.7 Sonnet, Claude 3.5 Haiku\n- **Google**: Gemini 2.0/1.5 Flash/Pro, Gemini Pro\n- **Mistral**: Pixtral Large/12B, Mistral Large/Medium/Small\n- **xAI**: Grok 4/3/2 series with vision variants\n- **Cohere**: Command R+, Command R, Command\n- **Azure**: Enterprise-hosted OpenAI models\n- **Vertex AI**: Google Cloud-hosted Gemini models\n\n## Examples\n\n### Basic Configuration\n\n```yaml\n- uses: overtrue/conventional-pr-title@v1\n  with:\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    model: 'openai'\n```\n\n### Advanced Configuration\n\n```yaml\n- uses: overtrue/conventional-pr-title@v1\n  with:\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    model: 'anthropic/claude-3-5-sonnet-20241022'\n    mode: 'auto'\n    allowed-types: 'feat,fix,docs,refactor'\n    include-scope: 'true'\n    max-length: '100'\n    debug: 'true'\n```\n\n### Custom Prompt\n\n```yaml\n- uses: overtrue/conventional-pr-title@v1\n  with:\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    model: 'openai/gpt-4o-mini'\n    custom-prompt: 'Generate a conventional commit title that emphasizes the business impact of this change.'\n```\n\n## Outputs\n\n| Output | Description |\n|--------|-------------|\n| `is-conventional` | Whether the PR title follows conventional commits format |\n| `suggested-titles` | JSON array of AI-suggested conventional commits titles |\n| `original-title` | Original PR title before processing |\n| `action-taken` | Action taken: \"updated\", \"commented\", \"skipped\", or \"error\" |\n| `error-message` | Error message if action failed |\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## References\n\n- [Conventional Commits](https://conventionalcommits.org/)\n- [AI SDK v5 Providers and Models](https://v5.ai-sdk.dev/docs/foundations/providers-and-models)\n- [GitHub Actions](https://docs.github.com/en/actions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovertrue%2Fconventional-pr-title","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovertrue%2Fconventional-pr-title","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovertrue%2Fconventional-pr-title/lists"}