{"id":43673869,"url":"https://github.com/tensorzero/experimental-ci-bot","last_synced_at":"2026-02-05T00:40:22.134Z","repository":{"id":317451252,"uuid":"1067458468","full_name":"tensorzero/experimental-ci-bot","owner":"tensorzero","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-05T23:53:50.000Z","size":7151,"stargazers_count":0,"open_issues_count":20,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-08T03:56:52.390Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tensorzero.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,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-09-30T22:14:15.000Z","updated_at":"2025-12-05T23:53:53.000Z","dependencies_parsed_at":"2025-10-01T01:07:33.134Z","dependency_job_id":"0277b8b7-73ba-4dff-a44b-3fa0300259d5","html_url":"https://github.com/tensorzero/experimental-ci-bot","commit_stats":null,"previous_names":["tensorzero/experimental-ci-bot"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tensorzero/experimental-ci-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorzero%2Fexperimental-ci-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorzero%2Fexperimental-ci-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorzero%2Fexperimental-ci-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorzero%2Fexperimental-ci-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tensorzero","download_url":"https://codeload.github.com/tensorzero/experimental-ci-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorzero%2Fexperimental-ci-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29103440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T22:44:52.815Z","status":"ssl_error","status_checked_at":"2026-02-04T22:44:16.428Z","response_time":62,"last_error":"SSL_read: 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":[],"created_at":"2026-02-05T00:40:21.504Z","updated_at":"2026-02-05T00:40:22.126Z","avatar_url":"https://github.com/tensorzero.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action for TensorZero-powered CI fixes and feedback\n\n[![GitHub Super-Linter](https://github.com/actions/typescript-action/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)\n![CI](https://github.com/actions/typescript-action/actions/workflows/ci.yml/badge.svg)\n[![Check dist/](https://github.com/actions/typescript-action/actions/workflows/check-dist.yml/badge.svg)](https://github.com/actions/typescript-action/actions/workflows/check-dist.yml)\n[![CodeQL](https://github.com/actions/typescript-action/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/actions/typescript-action/actions/workflows/codeql-analysis.yml)\n[![Coverage](./badges/coverage.svg)](./badges/coverage.svg)\n\n## Running Locally\n\nYou can run the mini-swe-agent locally to test PRs before deploying to GitHub\nActions.\n\n### Prerequisites\n\n1. Install dependencies:\n\n   ```bash\n   npm install\n   npm run bundle  # Build the CLI\n   ```\n\n1. Set up required environment variables:\n\n   ```bash\n   # GitHub authentication (choose one):\n   export GITHUB_TOKEN=$(gh auth token)  # If using gh CLI\n   # OR\n   export GITHUB_TOKEN=ghp_your_token_here\n\n   # Model API keys (at least one required):\n   export ANTHROPIC_API_KEY=your_anthropic_key\n   # OR\n   export OPENAI_API_KEY=your_openai_key\n   ```\n\n### Usage\n\n#### Dry Run (Local Testing)\n\nTest the agent without creating PRs or comments on GitHub:\n\n```bash\nnpm run cli -- --repo owner/repo --pr 123 --dry-run\n```\n\nThis will:\n\n- Clone the PR repository\n- Run the mini-swe-agent to analyze and fix issues\n- Display the generated patch locally\n- Not make any changes to GitHub\n\n#### Live Mode (Create PRs/Comments)\n\nRun the agent and create actual PRs or inline comments on GitHub:\n\n```bash\nnpm run cli -- --repo owner/repo --pr 456\n```\n\nThis will:\n\n- Clone the PR repository\n- Run the mini-swe-agent\n- Create a follow-up PR or post inline comments based on the agent's decision\n\n#### With CI Failure Context\n\nIf you have a specific workflow run that failed, you can provide its ID:\n\n```bash\nnpm run cli -- --repo owner/repo --pr 789 --workflow-run-id 12345\n```\n\n### CLI Options\n\n```text\n-r, --repo \u003cowner/repo\u003e          Repository in \"owner/repo\" format\n-p, --pr \u003cnumber\u003e                Pull request number (required)\n-d, --dry-run                    Show patch locally without PRs/comments\n-t, --token \u003ctoken\u003e              GitHub token (default: GITHUB_TOKEN or gh)\n-w, --workflow-run-id \u003cid\u003e       Workflow run ID for failure logs\n-o, --output-dir \u003cpath\u003e          Directory for debug artifacts\n--clickhouse-url \u003curl\u003e           ClickHouse URL for tracking\n--clickhouse-table \u003cname\u003e        ClickHouse table name\n-c, --cost-limit \u003cdollars\u003e       Cost limit (default: 3.0)\n--timeout \u003cminutes\u003e              Timeout in minutes (default: 30)\n-h, --help                       Show help message\n```\n\n### Examples\n\n```bash\n# Dry run on a public repository\nnpm run cli -- --repo tensorzero/tensorzero --pr 100 --dry-run\n\n# Run on your own repository with custom settings\nexport GITHUB_TOKEN=$(gh auth token)\nnpm run cli -- \\\n  --repo myorg/myrepo \\\n  --pr 42 \\\n  --cost-limit 5.0 \\\n  --timeout 45 \\\n  --output-dir ./debug-output\n\n# Analyze a specific failed workflow run\nnpm run cli -- \\\n  --repo owner/repo \\\n  --pr 123 \\\n  --workflow-run-id 9876543210\n```\n\n## Developing\n\n- `npm install`\n- `npm run bundle` will build the action for distribution.\n\n## Deploying\n\n- `npm run bundle` will build the action.\n- Prepare a ClickHouse Cloud database\n  - We need to add a table for Inference =\u003e PR association; assuming one\n    inference per PR. Might be able to iterate.\n  - Configure the action inputs `clickhouse-url`, `clickhouse-table`, and\n    optional authentication parameters so the action can write inference to PR\n    mappings after creating follow-up pull requests.\n- Configure secrets for the repository:\n  - CI_BOT_OPENAI_API_KEY: OpenAI API key, used when starting TensorZero gateway\n  - CI_BOT_CLICKHOUSE_URL: ClickHouse URL for both TensorZero gateway and the\n    GitHub PR to inference mapping; expected format is\n    `http[s]://[username:password@]hostname:port[/database]`.\n- Configure GitHub Actions permissions for the repository:\n  - Under \"Settings \u003e Actions \u003e General\", check the box for \"Allow GitHub\n    Actions to create and approve pull requests\".\n\n### Prepare ClickHouse database\n\nWe need to create a new table to store GitHub PR to Inference Map:\n\n```sql\nCREATE TABLE GitHubBotPullRequestToInferenceMap\n(\n   pull_request_id UInt128,\n   inference_id String,\n   episode_id String,\n   created_at DateTime DEFAULT now(),\n   original_pull_request_url String\n)\nENGINE = ReplacingMergeTree\nORDER BY pull_request_id;\n```\n\n## When might this fail over?\n\n- Long context / large PRs\n\n## Publishing a New Release\n\nThis project includes a helper script, [`script/release`](./script/release)\ndesigned to streamline the process of tagging and pushing new releases for\nGitHub Actions.\n\nGitHub Actions allows users to select a specific version of the action to use,\nbased on release tags. This script simplifies this process by performing the\nfollowing steps:\n\n1. **Retrieving the latest release tag:** The script starts by fetching the most\n   recent SemVer release tag of the current branch, by looking at the local data\n   available in your repository.\n1. **Prompting for a new release tag:** The user is then prompted to enter a new\n   release tag. To assist with this, the script displays the tag retrieved in\n   the previous step, and validates the format of the inputted tag (vX.X.X). The\n   user is also reminded to update the version field in package.json.\n1. **Tagging the new release:** The script then tags a new release and syncs the\n   separate major tag (e.g. v1, v2) with the new release tag (e.g. v1.0.0,\n   v2.1.2). When the user is creating a new major release, the script\n   auto-detects this and creates a `releases/v#` branch for the previous major\n   version.\n1. **Pushing changes to remote:** Finally, the script pushes the necessary\n   commits, tags and branches to the remote repository. From here, you will need\n   to create a new release in GitHub so users can easily reference the new tags\n   in their workflows.\n\n## Dependency License Management\n\nThis template includes a GitHub Actions workflow,\n[`licensed.yml`](./.github/workflows/licensed.yml), that uses\n[Licensed](https://github.com/licensee/licensed) to check for dependencies with\nmissing or non-compliant licenses. This workflow is initially disabled. To\nenable the workflow, follow the below steps.\n\n1. Open [`licensed.yml`](./.github/workflows/licensed.yml)\n1. Uncomment the following lines:\n\n   ```yaml\n   # pull_request:\n   #   branches:\n   #     - main\n   # push:\n   #   branches:\n   #     - main\n   ```\n\n1. Save and commit the changes\n\nOnce complete, this workflow will run any time a pull request is created or\nchanges pushed directly to `main`. If the workflow detects any dependencies with\nmissing or non-compliant licenses, it will fail the workflow and provide details\non the issue(s) found.\n\n### Updating Licenses\n\nWhenever you install or update dependencies, you can use the Licensed CLI to\nupdate the licenses database. To install Licensed, see the project's\n[Readme](https://github.com/licensee/licensed?tab=readme-ov-file#installation).\n\nTo update the cached licenses, run the following command:\n\n```bash\nlicensed cache\n```\n\nTo check the status of cached licenses, run the following command:\n\n```bash\nlicensed status\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftensorzero%2Fexperimental-ci-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftensorzero%2Fexperimental-ci-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftensorzero%2Fexperimental-ci-bot/lists"}