Skip to content

Commit ee6b3bc

Browse files
acebytesclaude
andcommitted
feat: Add GitHub workflows and templates
- Add issue templates (bug report, feature request) - Add GitHub workflows: - CI workflow for multi-platform testing - Publish workflow for automated NPM releases - CodeQL security analysis - Stale issue management - Add pull request template - Add CONTRIBUTING.md guide - Add SECURITY.md policy - Configure Dependabot for dependency updates - Fix README example link This provides a complete GitHub configuration for: - Automated testing and releases - Security scanning - Community contribution guidelines - Issue and PR management 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Local-Dir: /Users/d/Projects/claude-code-sdk-ts/claude-code-sdk-ts
1 parent fad863e commit ee6b3bc

12 files changed

Lines changed: 482 additions & 1 deletion

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Install the SDK: `npm install @instantlyeasy/claude-code-sdk-ts@version`
16+
2. Run this code:
17+
```javascript
18+
// Your code here
19+
```
20+
3. See error
21+
22+
**Expected behavior**
23+
A clear and concise description of what you expected to happen.
24+
25+
**Actual behavior**
26+
What actually happened, including any error messages.
27+
28+
**Environment:**
29+
- OS: [e.g. macOS 14.0, Ubuntu 22.04, Windows 11]
30+
- Node.js version: [e.g. 18.17.0]
31+
- SDK version: [e.g. 0.3.0-beta.1]
32+
- Claude CLI version: [run `claude --version`]
33+
34+
**Additional context**
35+
Add any other context about the problem here.
36+
37+
**Logs**
38+
If applicable, add debug logs by running with debug enabled:
39+
```javascript
40+
const response = await claude()
41+
.withDebug(true)
42+
.query('...');
43+
```

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Discord Community
4+
url: https://discord.gg/claude-code
5+
about: Join our Discord for questions and discussions
6+
- name: Documentation
7+
url: https://github.com/instantlyeasy/claude-code-sdk-ts/tree/main/docs
8+
about: Check our documentation for API reference and guides
9+
- name: Official Python SDK
10+
url: https://github.com/anthropics/claude-code-sdk
11+
about: For issues specific to the Python SDK
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Example API usage**
20+
Show how you envision using this feature:
21+
```javascript
22+
// Example code showing the proposed API
23+
const result = await claude()
24+
.newFeature()
25+
.query('...');
26+
```
27+
28+
**Additional context**
29+
Add any other context or screenshots about the feature request here.
30+
31+
**Would you be willing to submit a PR?**
32+
- [ ] Yes, I'd like to implement this feature
33+
- [ ] No, but I'm available for testing
34+
- [ ] Maybe, I'd need guidance

.github/dependabot.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
time: "09:00"
9+
open-pull-requests-limit: 10
10+
reviewers:
11+
- "instantlyeasy/maintainers"
12+
labels:
13+
- "dependencies"
14+
commit-message:
15+
prefix: "chore"
16+
include: "scope"
17+
ignore:
18+
# Ignore major version updates for these packages
19+
- dependency-name: "typescript"
20+
update-types: ["version-update:semver-major"]
21+
22+
- package-ecosystem: "github-actions"
23+
directory: "/"
24+
schedule:
25+
interval: "weekly"
26+
labels:
27+
- "github-actions"
28+
- "dependencies"

.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+
Please include a summary of the changes and which issue is fixed. Include relevant motivation and context.
4+
5+
Fixes # (issue)
6+
7+
## Type of change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] Documentation update
15+
- [ ] Performance improvement
16+
- [ ] Code refactoring
17+
18+
## Checklist
19+
20+
- [ ] My code follows the style guidelines of this project
21+
- [ ] I have performed a self-review of my code
22+
- [ ] I have commented my code, particularly in hard-to-understand areas
23+
- [ ] I have made corresponding changes to the documentation
24+
- [ ] My changes generate no new warnings
25+
- [ ] I have added tests that prove my fix is effective or that my feature works
26+
- [ ] New and existing unit tests pass locally with my changes
27+
- [ ] I have run `npm run lint` and `npm run typecheck` successfully
28+
- [ ] I have updated the examples if applicable
29+
30+
## Testing
31+
32+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
33+
34+
```javascript
35+
// Example test code
36+
const result = await claude()
37+
.query('Test query');
38+
```
39+
40+
## Additional Notes
41+
42+
Any additional information that would be helpful for reviewers.

.github/workflows/ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, beta/*, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
node-version: [18.x, 20.x, 22.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Run tests
33+
run: npm test
34+
35+
- name: Run type check
36+
run: npm run typecheck
37+
38+
- name: Run linting
39+
run: npm run lint
40+
41+
- name: Upload coverage to Codecov
42+
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
43+
uses: codecov/codecov-action@v3
44+
with:
45+
file: ./coverage/coverage-final.json
46+
flags: unittests
47+
name: codecov-umbrella
48+
49+
validate-llm-yml:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Use Node.js
55+
uses: actions/setup-node@v4
56+
with:
57+
node-version: '20.x'
58+
59+
- name: Install llm-yml validator
60+
run: npm install -g llm-yml
61+
62+
- name: Validate LLM.yml
63+
run: llm-yml validate ./LLM.yml

.github/workflows/codeql.yml

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

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to NPM
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: '20.x'
17+
registry-url: 'https://registry.npmjs.org'
18+
19+
- name: Install dependencies
20+
run: npm ci
21+
22+
- name: Build
23+
run: npm run build
24+
25+
- name: Run tests
26+
run: npm test
27+
28+
- name: Publish to NPM
29+
run: |
30+
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
31+
npm publish --tag beta
32+
else
33+
npm publish
34+
fi
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/stale.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Mark stale issues and pull requests
2+
3+
on:
4+
schedule:
5+
- cron: '30 1 * * *'
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
pull-requests: write
13+
14+
steps:
15+
- uses: actions/stale@v8
16+
with:
17+
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
19+
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
20+
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
21+
close-pr-message: 'This PR was closed because it has been stalled for 14 days with no activity.'
22+
days-before-issue-stale: 30
23+
days-before-pr-stale: 45
24+
days-before-issue-close: 7
25+
days-before-pr-close: 14
26+
stale-issue-label: 'stale'
27+
stale-pr-label: 'stale'
28+
exempt-issue-labels: 'pinned,security,enhancement,bug'
29+
exempt-pr-labels: 'pinned,security'

0 commit comments

Comments
 (0)