This repository contains a prototype GitHub App that analyzes repositories and generates suggested CI/CD pipelines.
Quick features
- Repository analysis using GitHub API (languages, tree, metadata)
- Rule-based detector for candidate pipeline templates
- Hugging Face zero-shot disambiguation (optional, falls back to heuristics)
- Adaptive parameter extraction (deterministic fallback if no model configured)
- Handlebars-based rendering of CI workflow templates
- Webhook server to process
installation,push, andrepositoryevents
Getting started (local prototype)
- Copy
.env.exampleto.envand fill inGITHUB_TOKEN(or App credentials) and optionalHF_TOKEN. - Install dependencies:
npm install
- Run the local server (receives webhooks):
npm run server
- Or run a local analysis + render for a repo configured in
src/index.js:
npm run analyze
Running as a Probot (GitHub App)
- Preferred: put your App private key in a file (e.g.,
secrets/app_private_key.pem) and add to.env:
GITHUB_APP_ID=12345
GITHUB_PRIVATE_KEY_PATH=secrets/app_private_key.pem
GITHUB_WEBHOOK_SECRET=your_webhook_secret
- Start the Probot app locally:
npm run dev:probot
- Use a tunnel (ngrok) and set the webhook URL in your GitHub App settings to
https://<your-tunnel>/api/webhooks.
Security notes
- Never commit
.envor private keys. The repo.gitignoreincludessecrets/and.env. - For quick tests you can use a
GITHUB_TOKEN(PAT), but for production use the GitHub App credentials.
Notes & next steps
- Replace
.envvariables with App credentials for production. - Add webhook signature verification and use GitHub App JWT auth for full App flows.
- Expand templates in
src/modules/renderer/templatesfor more cases (monorepo, polyglot, frontend-backend).