Skip to content

CI/CD Integration

NeuralRepo’s REST API integrates cleanly into CI/CD pipelines. You can automatically create ideas, update statuses, and track project lifecycle events from GitHub Actions, GitLab CI, or any automation platform.

  1. Create a dedicated API key. Go to Settings > API Keys in the NeuralRepo web dashboard and create a new key. Name it something descriptive like github-actions or ci-pipeline.

  2. Store as a secret. Add the key as a repository secret in your CI provider:

    • GitHub Actions: Repository Settings > Secrets > New repository secret. Name it NEURALREPO_API_KEY.
    • GitLab CI: Settings > CI/CD > Variables. Add NEURALREPO_API_KEY as a masked variable.
  3. Use in your pipeline. Reference the secret in your workflow file.

Automatically capture a new idea when a GitHub Release is published:

name: NeuralRepo — Track Release
on:
release:
types: [published]
jobs:
track-release:
runs-on: ubuntu-latest
steps:
- name: Create NeuralRepo idea
run: |
curl -s -X POST "https://neuralrepo.com/api/v1/ideas" \
-H "X-API-Key: ${{ secrets.NEURALREPO_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"title": "Release: ${{ github.event.release.tag_name }}",
"body": "${{ github.event.release.body }}",
"tags": ["release", "${{ github.event.repository.name }}"],
"status": "shipped",
"source_url": "${{ github.event.release.html_url }}"
}'

Mark an idea as shipped when a deployment succeeds:

name: Deploy & Update NeuralRepo
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy application
run: |
# Your deployment steps here
echo "Deploying..."
- name: Update NeuralRepo idea status
if: success()
run: |
curl -s -X PATCH "https://neuralrepo.com/api/v1/ideas/${{ vars.NEURALREPO_IDEA_ID }}" \
-H "X-API-Key: ${{ secrets.NEURALREPO_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"status": "shipped",
"add_tags": ["deployed"]
}'

Search for related ideas when a PR is opened and post them as a comment:

name: NeuralRepo Context
on:
pull_request:
types: [opened]
jobs:
find-context:
runs-on: ubuntu-latest
steps:
- name: Search NeuralRepo for related ideas
id: search
run: |
RESULT=$(curl -s "https://neuralrepo.com/api/v1/ideas/search?query=${{ github.event.pull_request.title }}&limit=3" \
-H "X-API-Key: ${{ secrets.NEURALREPO_API_KEY }}")
echo "result=$RESULT" >> "$GITHUB_OUTPUT"
- name: Post comment with related ideas
uses: actions/github-script@v7
with:
script: |
const result = JSON.parse('${{ steps.search.outputs.result }}');
if (result.ideas && result.ideas.length > 0) {
const ideas = result.ideas.map(i =>
`- **#${i.id}**: ${i.title} (${i.status})`
).join('\n');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `## Related NeuralRepo Ideas\n${ideas}`
});
}

When parsing API responses in CI scripts, use jq for reliable JSON extraction:

Terminal window
# Create an idea and capture the returned ID
IDEA_ID=$(curl -s -X POST "https://neuralrepo.com/api/v1/ideas" \
-H "X-API-Key: $NEURALREPO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Automated release tracking", "status": "captured"}' \
| jq -r '.id')
echo "Created idea: $IDEA_ID"
# Use the ID in subsequent steps
curl -s -X PATCH "https://neuralrepo.com/api/v1/ideas/$IDEA_ID" \
-H "X-API-Key: $NEURALREPO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "shipped"}'
  • One key per pipeline. Create a separate API key for each CI environment so you can revoke individually.
  • Use descriptive tags. Tag CI-created ideas with ci, the repository name, and the event type (e.g., release, deploy).
  • Handle failures gracefully. Wrap NeuralRepo API calls in if: success() conditions so they only run after your primary workflow succeeds.
  • Rate limits. The API allows 100 requests per day on the Free plan and 10,000 per day on Pro. This is more than enough for typical CI usage, but avoid calling the API in tight loops.