Skip to content

Commit 3699e55

Browse files
authored
Merge pull request #1 from BeyteFlow/copilot/add-ai-command-layer
ci: add GitHub Actions CI, CodeQL, Dependabot, auto-labeler, PR template, and issue templates
2 parents 81536cb + 1d2191c commit 3699e55

9 files changed

Lines changed: 337 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug or unexpected behavior in git-ai
4+
title: '[Bug] '
5+
labels: ['bug', 'triage']
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
11+
<!-- A clear and concise description of what the bug is. -->
12+
13+
## Steps to Reproduce
14+
15+
1. Run `git-ai ...`
16+
2. See error
17+
18+
## Expected Behavior
19+
20+
<!-- What you expected to happen. -->
21+
22+
## Actual Behavior
23+
24+
<!-- What actually happened. Include error messages or stack traces if available. -->
25+
26+
## Environment
27+
28+
- **OS:** <!-- e.g. macOS 14, Ubuntu 22.04, Windows 11 -->
29+
- **Node.js version:** <!-- e.g. 20.x -->
30+
- **git-ai version:** <!-- e.g. 1.0.0 -->
31+
- **Git version:** <!-- e.g. 2.43.0 -->
32+
- **AI provider:** <!-- e.g. OpenAI, Gemini -->
33+
34+
## Logs / Stack Trace
35+
36+
```
37+
<!-- Paste any relevant logs or stack traces here. -->
38+
```
39+
40+
## Additional Context
41+
42+
<!-- Any other context about the problem. Screenshots, related issues, etc. -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💬 Discussion / Question
4+
url: https://github.com/BeyteFlow/git-ai/discussions
5+
about: Ask questions and discuss ideas in GitHub Discussions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or improvement for git-ai
4+
title: '[Feature] '
5+
labels: ['enhancement', 'triage']
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
11+
<!-- A clear and concise description of the feature you would like. -->
12+
13+
## Problem It Solves
14+
15+
<!-- Describe the problem or pain point this feature would address. -->
16+
<!-- e.g. "I always have to manually ... when I want to ..." -->
17+
18+
## Proposed Solution
19+
20+
<!-- Describe how you envision this feature working. -->
21+
22+
## Alternatives Considered
23+
24+
<!-- Have you considered any alternative approaches or workarounds? -->
25+
26+
## Additional Context
27+
28+
<!-- Any other context, mockups, or screenshots about the feature request. -->
29+
30+
## Would you be willing to contribute this feature?
31+
32+
- [ ] Yes, I'd like to open a PR for this
33+
- [ ] No, I'm just suggesting

.github/dependabot.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for npm
4+
- package-ecosystem: 'npm'
5+
directory: '/'
6+
schedule:
7+
interval: 'weekly'
8+
day: 'monday'
9+
time: '09:00'
10+
open-pull-requests-limit: 10
11+
labels:
12+
- 'dependencies'
13+
commit-message:
14+
prefix: 'chore(deps)'
15+
prefix-development: 'chore(deps-dev)'
16+
groups:
17+
production-dependencies:
18+
dependency-type: 'production'
19+
development-dependencies:
20+
dependency-type: 'development'
21+
22+
# Maintain dependencies for GitHub Actions
23+
- package-ecosystem: 'github-actions'
24+
directory: '/'
25+
schedule:
26+
interval: 'weekly'
27+
day: 'monday'
28+
time: '09:00'
29+
open-pull-requests-limit: 10
30+
labels:
31+
- 'dependencies'
32+
- 'ci/cd'
33+
commit-message:
34+
prefix: 'chore(actions)'

.github/labeler.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Pull Request auto-labeler configuration
2+
# https://github.com/actions/labeler
3+
4+
'ci/cd':
5+
- changed-files:
6+
- any-glob-to-any-file:
7+
- '.github/**'
8+
9+
'dependencies':
10+
- changed-files:
11+
- any-glob-to-any-file:
12+
- 'package.json'
13+
- 'package-lock.json'
14+
- 'yarn.lock'
15+
16+
'documentation':
17+
- changed-files:
18+
- any-glob-to-any-file:
19+
- '**/*.md'
20+
- 'docs/**'
21+
22+
'cli':
23+
- changed-files:
24+
- any-glob-to-any-file:
25+
- 'src/cli/**'
26+
27+
'core':
28+
- changed-files:
29+
- any-glob-to-any-file:
30+
- 'src/core/**'
31+
32+
'ai':
33+
- changed-files:
34+
- any-glob-to-any-file:
35+
- 'src/services/aiService.ts'
36+
37+
'git':
38+
- changed-files:
39+
- any-glob-to-any-file:
40+
- 'src/services/gitService.ts'
41+
42+
'github':
43+
- changed-files:
44+
- any-glob-to-any-file:
45+
- 'src/services/githubService.ts'
46+
47+
'ui':
48+
- changed-files:
49+
- any-glob-to-any-file:
50+
- 'src/ui/**'
51+
52+
'tests':
53+
- changed-files:
54+
- any-glob-to-any-file:
55+
- '**/*.test.ts'
56+
- '**/*.spec.ts'
57+
- 'tests/**'

.github/pull_request_template.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## Description
2+
3+
<!-- A clear and concise description of what this PR does. -->
4+
5+
## Related Issue
6+
7+
<!-- Link to the issue this PR addresses, e.g. Closes #123 -->
8+
9+
Closes #
10+
11+
## Type of Change
12+
13+
<!-- Mark the relevant option with an [x]. -->
14+
15+
- [ ] 🐛 Bug fix (non-breaking change that fixes an issue)
16+
- [ ] ✨ New feature (non-breaking change that adds functionality)
17+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to change)
18+
- [ ] 📝 Documentation update
19+
- [ ] 🔧 Refactor / internal improvement
20+
- [ ] 🤖 CI/CD or tooling change
21+
- [ ] ⬆️ Dependency update
22+
23+
## Checklist
24+
25+
- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) guidelines (if present)
26+
- [ ] My code follows the existing code style
27+
- [ ] I have added or updated tests that cover my changes
28+
- [ ] All existing tests pass locally
29+
- [ ] I have updated the documentation where necessary
30+
- [ ] My changes do not introduce new security vulnerabilities
31+
32+
## How Has This Been Tested?
33+
34+
<!-- Describe how you tested your changes. -->
35+
36+
## Screenshots (if applicable)
37+
38+
<!-- Add screenshots to help explain your changes. -->
39+
40+
## Additional Notes
41+
42+
<!-- Any additional context or information. -->

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
build-and-test:
11+
name: Build & Test
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
16+
strategy:
17+
matrix:
18+
node-version: [18.x, 20.x]
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Lint
34+
run: npm run lint --if-present
35+
36+
- name: Build
37+
run: npm run build --if-present
38+
39+
- name: Run tests
40+
run: npm test --if-present

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
schedule:
9+
- cron: '30 4 * * 1'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
packages: read
18+
actions: read
19+
contents: read
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [javascript-typescript]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v3
32+
with:
33+
languages: ${{ matrix.language }}
34+
queries: security-extended,security-and-quality
35+
36+
- name: Autobuild
37+
uses: github/codeql-action/autobuild@v3
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v3
41+
with:
42+
category: '/language:${{ matrix.language }}'

.github/workflows/labeler.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Labeler
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
issues:
7+
types: [opened, reopened]
8+
9+
jobs:
10+
label-pr:
11+
name: Label Pull Request
12+
runs-on: ubuntu-latest
13+
if: github.event_name == 'pull_request'
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
18+
steps:
19+
- name: Label PR based on changed files
20+
uses: actions/labeler@v5
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
configuration-path: .github/labeler.yml
24+
25+
label-issue:
26+
name: Label Issue
27+
runs-on: ubuntu-latest
28+
if: github.event_name == 'issues'
29+
permissions:
30+
issues: write
31+
32+
steps:
33+
- name: Add triage label to new issues
34+
uses: actions/github-script@v7
35+
with:
36+
script: |
37+
await github.rest.issues.addLabels({
38+
owner: context.repo.owner,
39+
repo: context.repo.repo,
40+
issue_number: context.issue.number,
41+
labels: ['triage']
42+
});

0 commit comments

Comments
 (0)