davd-gzl/Prompt2PR
Turn prompts into Pull Requests using LLMs - on push, on schedule, or on demand.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| prompt | The prompt describing what changes to make. This is sent to the LLM along with the scoped file contents as context. | yes | — |
| provider | The LLM provider to use. Supported values: mistral, openai, anthropic, github. | yes | — |
| model | The model identifier to use. If not specified, the provider's default model is used (e.g., mistral-large-latest, gpt-4o, claude-sonnet-4-20250514, openai/gpt-4o). | no | "" |
| paths | Comma-separated glob patterns for files to include as LLM context. Only matching files are scanned and eligible for modification. | no | ** |
| max_files | Maximum number of files the LLM is allowed to modify in a single run. Responses exceeding this limit are rejected. | no | 10 |
| max_changes | Maximum total lines changed across all files in a single run. Responses exceeding this limit are rejected. | no | 200 |
| label | Comma-separated labels to apply to the created PR. The label 'prompt2pr' is always included automatically. | no | prompt2pr |
| branch_prefix | Prefix for the branch name created for the PR. The full branch name is {branch_prefix}{timestamp}. | no | prompt2pr/ |
| dry_run | When set to true, the action runs the full pipeline but skips branch creation and PR submission. Useful for testing prompts. | no | false |
| base_url | Override the base URL for the LLM provider API. Useful for proxies or self-hosted endpoints. | no | "" |
| allowed_hosts | Comma-separated list of additional hostnames allowed for base_url validation. Use this for self-hosted or proxied LLM endpoints. Each hostname is added to the built-in allowlist (api.mistral.ai, api.openai.com, api.anthropic.com, models.github.ai, etc.). | no | "" |
Outputs
| name | description |
|---|---|
| pr_url | The URL of the created Pull Request. Empty if skipped. |
| pr_number | The number of the created Pull Request. Empty if skipped. |
| files_changed | The number of files changed by the action. |
| lines_changed | The total number of lines changed across all files. |
| skipped | Whether PR creation was skipped (true if no changes detected or dry_run was enabled). |