{"id":48486314,"url":"https://github.com/knirski/auto-pr","last_synced_at":"2026-04-07T10:01:01.744Z","repository":{"id":344545979,"uuid":"1181527645","full_name":"knirski/auto-pr","owner":"knirski","description":"Auto-create PRs from conventional commits on ai/* branches. Parses commits, fills PR template with AI-generated summaries.","archived":false,"fork":false,"pushed_at":"2026-04-01T23:50:05.000Z","size":7878,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T07:41:51.844Z","etag":null,"topics":["ai-assisted-development","automation","conventional-commits","github-actions","ollama","pr-template","pull-requests"],"latest_commit_sha":null,"homepage":"https://github.com/knirski/auto-pr","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/knirski.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"knirski","liberapay":"knirski"}},"created_at":"2026-03-14T09:04:37.000Z","updated_at":"2026-04-01T23:50:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"a7adc782-b8c3-44ee-b24d-a5977240aa22","html_url":"https://github.com/knirski/auto-pr","commit_stats":null,"previous_names":["knirski/auto-pr"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/knirski/auto-pr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knirski%2Fauto-pr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knirski%2Fauto-pr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knirski%2Fauto-pr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knirski%2Fauto-pr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knirski","download_url":"https://codeload.github.com/knirski/auto-pr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knirski%2Fauto-pr/sbom","scorecard":{"id":1244906,"data":{"date":"2026-03-15T06:20:35Z","repo":{"name":"github.com/knirski/auto-pr","commit":"1e991ad63a5e72d0acc3b44f8dca8f41dde69e62"},"scorecard":{"version":"v5.3.0","commit":"c22063e786c11f9dd714d777a687ff7c4599b600"},"score":5.9,"checks":[{"name":"Maintained","score":0,"reason":"project was created within the last 90 days. Please review its contents carefully","details":["Warn: Repository was created within the last 90 days."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#code-review"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dependency-update-tool"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":9,"reason":"dependency not pinned by hash detected -- score normalized to 9","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/auto-pr-consumer-reusable.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/knirski/auto-pr/auto-pr-consumer-reusable.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/auto-pr.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/knirski/auto-pr/auto-pr.yml/main?enable=pin","Info:  23 out of  23 GitHub-owned GitHubAction dependencies pinned","Info:  12 out of  14 third-party GitHubAction dependencies pinned","Info:   2 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci-nix.yml:31","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:31","Info: jobLevel 'pull-requests' permission set to 'read': .github/workflows/ci.yml:32","Info: jobLevel 'packages' permission set to 'read': .github/workflows/codeql.yml:40","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:41","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:42","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/nix.yml:31","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release-please.yml:13","Info: jobLevel 'contents' permission set to 'read': .github/workflows/scorecard.yml:21","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/update-flake-lock.yml:18","Info: jobLevel 'contents' permission set to 'read': .github/workflows/update-nix-hash.yml:16","Warn: no topLevel permission defined: .github/workflows/auto-pr-consumer-reusable.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/auto-pr-consumer.yml:17","Info: topLevel 'contents' permission set to 'read': .github/workflows/auto-pr-reusable.yml:22","Warn: no topLevel permission defined: .github/workflows/auto-pr.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/check-docs.yml:13","Info: topLevel 'contents' permission set to 'read': .github/workflows/check.yml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci-docs.yml:20","Info: found token with 'none' permissions: .github/workflows/ci-nix.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci-release-please.yml:16","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:24","Info: found token with 'none' permissions: .github/workflows/codeql-docs.yml:1","Info: found token with 'none' permissions: .github/workflows/codeql.yml:1","Info: found token with 'none' permissions: .github/workflows/nix.yml:1","Info: found token with 'none' permissions: .github/workflows/release-please.yml:1","Info: found token with 'none' permissions: .github/workflows/scorecard.yml:12","Info: found token with 'none' permissions: .github/workflows/scorecard.yml:13","Info: topLevel 'contents' permission set to 'read': .github/workflows/scorecard.yml:11","Info: found token with 'none' permissions: .github/workflows/update-flake-lock.yml:1","Info: found token with 'none' permissions: .github/workflows/update-nix-hash.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#license"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#cii-best-practices"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#signed-releases"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (1) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#vulnerabilities"}},{"name":"Contributors","score":0,"reason":"project has 0 contributing companies or organizations -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#contributors"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#fuzzing"}},{"name":"CI-Tests","score":10,"reason":"1 out of 1 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#ci-tests"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Info: 'stale review dismissal' is required to merge on branch 'main'","Warn: branch 'main' does not require approvers","Warn: codeowners review is not required on branch 'main'","Warn: 'last push approval' is disabled on branch 'main'","Warn: 'up-to-date branches' is disabled on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#branch-protection"}}]},"last_synced_at":"2026-03-16T04:53:42.495Z","repository_id":344545979,"created_at":"2026-03-16T04:53:42.495Z","updated_at":"2026-03-16T04:53:42.495Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31508282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai-assisted-development","automation","conventional-commits","github-actions","ollama","pr-template","pull-requests"],"created_at":"2026-04-07T10:00:44.341Z","updated_at":"2026-04-07T10:01:01.737Z","avatar_url":"https://github.com/knirski.png","language":"TypeScript","funding_links":["https://github.com/sponsors/knirski","https://liberapay.com/knirski","https://liberapay.com/knirski/"],"categories":[],"sub_categories":[],"readme":"# auto-pr\n\n[![CI](https://github.com/knirski/auto-pr/actions/workflows/ci.yml/badge.svg)](https://github.com/knirski/auto-pr/actions)\n[![Coverage](https://codecov.io/gh/knirski/auto-pr/graph/badge.svg)](https://app.codecov.io/gh/knirski/auto-pr)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/knirski/auto-pr/badge)](https://scorecard.dev/viewer/?uri=github.com/knirski/auto-pr)\n[![Version](https://img.shields.io/github/package-json/v/knirski/auto-pr)](https://github.com/knirski/auto-pr/blob/main/package.json)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/license/Apache-2.0)\n[![GitHub Sponsors](https://img.shields.io/badge/GitHub%20Sponsors-Support-ea4aaa.svg)](https://github.com/sponsors/knirski)\n[![Liberapay](https://img.shields.io/badge/Liberapay-Support-yellow.svg)](https://liberapay.com/knirski/)\n[![CII Best Practices](https://img.shields.io/badge/CII%20Best%20Practices-register-green)](https://www.bestpractices.dev/en/projects/new?project_url=https%3A%2F%2Fgithub.com%2Fknirski%2Fauto-pr)\n\nAuto-create pull requests from conventional commits on `ai/*` branches. Parses commit messages, fills a PR template, and optionally uses an AI provider (GitHub Models by default in CI; local OpenAI-compatible servers for self-hosted or dev) to generate descriptions for multi-commit PRs.\n\n**Convention over configuration.** Run `npx -p github:knirski/auto-pr auto-pr-init`, set up a GitHub App, and you're done — most adopters only use GitHub Actions and do not add this package to `package.json` unless they want the CLIs locally. Defaults work for most projects; override via workflow inputs only when needed.\n\n**Universal:** Works with any GitHub project — Node, Python, Rust, Go, etc. No `package.json` required when using the [reusable workflows](.github/workflows/auto-pr-generate-reusable.yml) (generate + create). No action copying — workflows fetch everything from knirski/auto-pr. **No Nix required** — users use Node/npx only.\n\n**Goal:** Enable AI-assisted development workflows. When an AI agent (or developer) pushes to an `ai/`-prefixed branch, a workflow automatically creates or updates a PR with a title and body derived from conventional commits. For 2+ commits, the AI provider summarizes the changes into a coherent description.\n\n## Table of contents\n\n- [Features](#features)\n- [How it works](#how-it-works)\n- [Quick start](#quick-start)\n- [Commands](#commands)\n- [Documentation](#documentation)\n- [License](#license)\n\n## Features\n\n- **Conventional commits** — Parses `feat:`, `fix:`, `docs:`, etc. for PR title and type\n- **PR template** — Fills `.github/PULL_REQUEST_TEMPLATE.md` with description, changes, checklist\n- **AI integration** — For 2+ commits, summarizes commit bodies into a PR description via **local** (OpenAI-compatible HTTP, e.g. llama.cpp) or **github-models**\n- **gh CLI** — Thin wrapper around `gh pr create` / `gh pr edit`\n- **CI-agnostic** — **get-commits** appends paths and count to `GITHUB_OUTPUT`; **generate-content** writes `pr-title.txt` and `pr-body.md` under the workspace. Works with GitHub Actions or any orchestrator that sets the same env conventions.\n\n## How it works\n\n1. **Get commits** — `auto-pr-get-commits` runs `git log` and `git diff` to produce `commits.txt`, `files.txt`, and outputs paths to `GITHUB_OUTPUT`\n2. **Generate content** — `auto-pr-generate-content` parses commits, counts semantic commits. For 1 commit: fills template from body. For 2+: calls the AI provider to summarize, then fills template. Writes `pr-title.txt` and `pr-body.md` under `{GITHUB_WORKSPACE}`\n3. **Create or update PR** — `auto-pr-create-or-update-pr` reads those files, then runs `gh pr view` → `gh pr edit` or `gh pr create`\n\nMerge commits are filtered out. Non-conventional commits are included; type falls back to \"Chore\".\n\n## Quick start\n\n### Users (adopters)\n\nAdd auto-pr to any repo in 6 steps:\n\n1. **Init** — `npx -p github:knirski/auto-pr auto-pr-init` (creates workflow, PR template, and `.nvmrc`)\n2. **Create** — [GitHub App](https://github.com/settings/apps/new) with Contents and Pull requests (Read and write)\n3. **Generate** — Private key in app settings → save `.pem`\n4. **Install** — Install the app on your repository\n5. **Secrets** — Add `APP_ID` and `APP_PRIVATE_KEY` to **Settings → Secrets and variables → Actions**\n6. **Test** — `git checkout -b ai/test \u0026\u0026 git commit --allow-empty -m \"chore: test\" \u0026\u0026 git push`\n\nNo `package.json` required. Full guide: [docs/INTEGRATION.md](docs/INTEGRATION.md).\n\n### Contributors\n\n```bash\nbun install\nbun x lefthook install\nbun run check\n```\n\nFor local runs of workflow CLIs or `run-auto-pr`, copy `.env.example` to `.env` and set variables. The authoritative list is the environment table at the top of [`src/auto-pr/config.ts`](src/auto-pr/config.ts).\n\n| Command | Purpose |\n|---------|---------|\n| `bun run check` | Local checks (Bun, statix, deadnix, typos, lychee, actionlint) |\n| `bun run check:code` | Code only: build, audit, **unit** tests, lint, knip, typecheck. Runs on pre-push (no integration). |\n| `bun run test:all` | `bun test` then `test:integration` (integration needs env) |\n| `bun run act` | `check` + `integration` jobs in Docker (`gh act` or nektos `act`; with Nix, `nix run .#act` on supported platforms — see [CONTRIBUTING.md](CONTRIBUTING.md)) |\n| `bun run act -- check` / `bun run act -- integration` | Only CI `check`, or only `integration` — see [CONTRIBUTING.md](CONTRIBUTING.md#run-ci-locally-check-job) |\n| `bun run check:with-links` | Full check + lychee link verification (can fail on broken external URLs) |\n| `bun run check:just-links` | Lychee link check only (requires lychee or Nix) |\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for full setup, Nix flake, and pre-push hooks.\n\n## Commands\n\n| Command | Purpose |\n|--------|---------|\n| `npx auto-pr-get-commits` | Get commit log and changed files; append `commits`, `files`, `count` to `GITHUB_OUTPUT` |\n| `npx auto-pr-generate-content` | Generate PR title and filled body (AI for 2+ commits) |\n| `npx auto-pr-create-or-update-pr` | Create or update PR via `gh` |\n| `npx auto-pr-fill-pr-template` | CLI for filling PR template from commits (standalone use) |\n| `npx auto-pr-init` | Create workflow, PR template, and .nvmrc in current repo |\n\nAfter install, or for one-offs: `npx -p github:knirski/auto-pr \u003ccommand\u003e`. CI runs the same bins via reusable workflows without a repo dependency.\n\n## Documentation\n\n| Audience | Documents |\n|----------|-----------|\n| **Users** | [Integration guide](docs/INTEGRATION.md) · [Troubleshooting](docs/TROUBLESHOOTING.md) · [PR template](docs/PR_TEMPLATE.md) |\n| **Contributors** | [Architecture](docs/ARCHITECTURE.md) · [CI \u0026 workflows](docs/CI.md) · [Contributing](CONTRIBUTING.md) · [Workflow security](docs/WORKFLOW_SECURITY.md) |\n| **Decisions** | [Architecture Decision Records](docs/adr/) |\n| **Project** | [Security](SECURITY.md) · [Support](SUPPORT.md) · [Code of Conduct](CODE_OF_CONDUCT.md) · [CII badge progress](docs/CII.md) |\n\nFull index: [docs/README.md](docs/)\n\nThis project was developed with assistance from AI coding tools.\n\n## License\n\n[Apache-2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknirski%2Fauto-pr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknirski%2Fauto-pr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknirski%2Fauto-pr/lists"}