@crypto512/jicon-mcp 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -62
- package/dist/utils/content-buffer.d.ts +12 -0
- package/dist/utils/content-buffer.d.ts.map +1 -1
- package/dist/utils/content-buffer.js +29 -12
- package/dist/utils/content-buffer.js.map +1 -1
- package/package.json +1 -1
- package/CLAUDE.md +0 -947
- package/CONTRIBUTING.md +0 -371
- package/DEVELOPMENT.md +0 -400
- package/JIRA_API_ANALYSIS.md +0 -275
package/CONTRIBUTING.md
DELETED
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
# Contributing to Jicon MCP Server
|
|
2
|
-
|
|
3
|
-
Thank you for your interest in contributing to Jicon! This document provides guidelines and instructions for contributing to the project.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
|
|
7
|
-
- [Code of Conduct](#code-of-conduct)
|
|
8
|
-
- [Getting Started](#getting-started)
|
|
9
|
-
- [Development Workflow](#development-workflow)
|
|
10
|
-
- [Project Structure](#project-structure)
|
|
11
|
-
- [Coding Standards](#coding-standards)
|
|
12
|
-
- [Testing Guidelines](#testing-guidelines)
|
|
13
|
-
- [Pull Request Process](#pull-request-process)
|
|
14
|
-
- [Release Process](#release-process)
|
|
15
|
-
|
|
16
|
-
## Code of Conduct
|
|
17
|
-
|
|
18
|
-
By participating in this project, you agree to maintain a respectful and inclusive environment. We expect:
|
|
19
|
-
|
|
20
|
-
- **Respectful Communication**: Be kind and considerate in all interactions
|
|
21
|
-
- **Constructive Feedback**: Provide helpful and actionable feedback
|
|
22
|
-
- **Collaboration**: Work together towards common goals
|
|
23
|
-
- **Inclusivity**: Welcome contributors of all backgrounds and skill levels
|
|
24
|
-
|
|
25
|
-
## Getting Started
|
|
26
|
-
|
|
27
|
-
### Prerequisites
|
|
28
|
-
|
|
29
|
-
- **Node.js**: Version 18.0.0 or higher
|
|
30
|
-
- **npm**: Version 8.0.0 or higher
|
|
31
|
-
- **Git**: For version control
|
|
32
|
-
- **TypeScript Knowledge**: Familiarity with TypeScript is helpful
|
|
33
|
-
|
|
34
|
-
### Initial Setup
|
|
35
|
-
|
|
36
|
-
1. **Fork the Repository**
|
|
37
|
-
```bash
|
|
38
|
-
# Fork on GitHub, then clone your fork
|
|
39
|
-
git clone https://github.com/YOUR_USERNAME/jicon.git
|
|
40
|
-
cd jicon
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
2. **Install Dependencies**
|
|
44
|
-
```bash
|
|
45
|
-
npm install
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
3. **Build the Project**
|
|
49
|
-
```bash
|
|
50
|
-
npm run build
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
4. **Run Tests**
|
|
54
|
-
```bash
|
|
55
|
-
npm test
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
5. **Set Up Environment** (Optional for testing)
|
|
59
|
-
```bash
|
|
60
|
-
cp .env.example .env
|
|
61
|
-
# Edit .env with your test Jira/Confluence credentials
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Development Workflow
|
|
65
|
-
|
|
66
|
-
### Branch Strategy
|
|
67
|
-
|
|
68
|
-
- `main` - Production-ready code
|
|
69
|
-
- `develop` - Integration branch for features
|
|
70
|
-
- `feature/*` - New features
|
|
71
|
-
- `fix/*` - Bug fixes
|
|
72
|
-
- `docs/*` - Documentation updates
|
|
73
|
-
|
|
74
|
-
### Making Changes
|
|
75
|
-
|
|
76
|
-
1. **Create a Branch**
|
|
77
|
-
```bash
|
|
78
|
-
git checkout -b feature/your-feature-name
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
2. **Make Your Changes**
|
|
82
|
-
- Write clear, focused commits
|
|
83
|
-
- Follow coding standards
|
|
84
|
-
- Add tests for new functionality
|
|
85
|
-
- Update documentation as needed
|
|
86
|
-
|
|
87
|
-
3. **Run Tests**
|
|
88
|
-
```bash
|
|
89
|
-
npm test
|
|
90
|
-
npm run lint
|
|
91
|
-
npm run build
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
4. **Commit Your Changes**
|
|
95
|
-
```bash
|
|
96
|
-
git add .
|
|
97
|
-
git commit -m "feat: add new feature description"
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Commit Message Format
|
|
101
|
-
|
|
102
|
-
We follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
<type>(<scope>): <subject>
|
|
106
|
-
|
|
107
|
-
<body>
|
|
108
|
-
|
|
109
|
-
<footer>
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
**Types:**
|
|
113
|
-
- `feat`: New feature
|
|
114
|
-
- `fix`: Bug fix
|
|
115
|
-
- `docs`: Documentation changes
|
|
116
|
-
- `style`: Code style changes (formatting, etc.)
|
|
117
|
-
- `refactor`: Code refactoring
|
|
118
|
-
- `test`: Test additions or modifications
|
|
119
|
-
- `chore`: Build process or auxiliary tool changes
|
|
120
|
-
|
|
121
|
-
**Examples:**
|
|
122
|
-
```bash
|
|
123
|
-
feat(jira): add support for custom fields in create issue
|
|
124
|
-
fix(confluence): handle missing page version error
|
|
125
|
-
docs(readme): update configuration examples
|
|
126
|
-
test(jira): add tests for issue transitions
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## Project Structure
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
jicon/
|
|
133
|
-
├── src/
|
|
134
|
-
│ ├── index.ts # MCP server entry point
|
|
135
|
-
│ ├── types.ts # Common type definitions
|
|
136
|
-
│ ├── jira/
|
|
137
|
-
│ │ ├── client.ts # Jira API client
|
|
138
|
-
│ │ ├── tools.ts # Jira MCP tools
|
|
139
|
-
│ │ └── types.ts # Jira-specific types
|
|
140
|
-
│ ├── confluence/
|
|
141
|
-
│ │ ├── client.ts # Confluence API client
|
|
142
|
-
│ │ ├── tools.ts # Confluence MCP tools
|
|
143
|
-
│ │ └── types.ts # Confluence-specific types
|
|
144
|
-
│ └── utils/
|
|
145
|
-
│ ├── http-client.ts # HTTP utilities
|
|
146
|
-
│ └── response-formatter.ts
|
|
147
|
-
├── tests/
|
|
148
|
-
│ ├── jira/
|
|
149
|
-
│ ├── confluence/
|
|
150
|
-
│ └── utils/
|
|
151
|
-
├── dist/ # Compiled JavaScript (gitignored)
|
|
152
|
-
├── node_modules/ # Dependencies (gitignored)
|
|
153
|
-
├── package.json
|
|
154
|
-
├── tsconfig.json
|
|
155
|
-
└── README.md
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
## Coding Standards
|
|
159
|
-
|
|
160
|
-
### TypeScript Guidelines
|
|
161
|
-
|
|
162
|
-
1. **Use Strong Types**
|
|
163
|
-
```typescript
|
|
164
|
-
// Good
|
|
165
|
-
function getIssue(issueKey: string): Promise<JiraIssue>
|
|
166
|
-
|
|
167
|
-
// Avoid
|
|
168
|
-
function getIssue(issueKey: any): Promise<any>
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
2. **Prefer Interfaces for Objects**
|
|
172
|
-
```typescript
|
|
173
|
-
interface IssueData {
|
|
174
|
-
key: string;
|
|
175
|
-
summary: string;
|
|
176
|
-
status: string;
|
|
177
|
-
}
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
3. **Use Async/Await**
|
|
181
|
-
```typescript
|
|
182
|
-
// Good
|
|
183
|
-
async function fetchData() {
|
|
184
|
-
const result = await client.getData();
|
|
185
|
-
return result;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// Avoid
|
|
189
|
-
function fetchData() {
|
|
190
|
-
return client.getData().then(result => result);
|
|
191
|
-
}
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
4. **Error Handling**
|
|
195
|
-
```typescript
|
|
196
|
-
try {
|
|
197
|
-
const result = await client.getIssue(key);
|
|
198
|
-
return formatSuccess(result);
|
|
199
|
-
} catch (error) {
|
|
200
|
-
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
201
|
-
}
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
### Code Style
|
|
205
|
-
|
|
206
|
-
- **Indentation**: 2 spaces
|
|
207
|
-
- **Quotes**: Double quotes for strings
|
|
208
|
-
- **Semicolons**: Required
|
|
209
|
-
- **Line Length**: Maximum 100 characters (flexible)
|
|
210
|
-
- **Naming**:
|
|
211
|
-
- `camelCase` for variables and functions
|
|
212
|
-
- `PascalCase` for classes and types
|
|
213
|
-
- `UPPER_CASE` for constants
|
|
214
|
-
|
|
215
|
-
### Documentation
|
|
216
|
-
|
|
217
|
-
- Add JSDoc comments for public APIs
|
|
218
|
-
- Document complex logic with inline comments
|
|
219
|
-
- Update README.md for user-facing changes
|
|
220
|
-
- Update CLAUDE.md for specification changes
|
|
221
|
-
|
|
222
|
-
**Example:**
|
|
223
|
-
```typescript
|
|
224
|
-
/**
|
|
225
|
-
* Search for Jira issues using JQL
|
|
226
|
-
* @param jql - Jira Query Language string
|
|
227
|
-
* @param maxResults - Maximum number of results (default: 50)
|
|
228
|
-
* @param fields - Optional array of fields to return
|
|
229
|
-
* @returns Promise resolving to search results
|
|
230
|
-
*/
|
|
231
|
-
async searchIssues(
|
|
232
|
-
jql: string,
|
|
233
|
-
maxResults: number = 50,
|
|
234
|
-
fields?: string[]
|
|
235
|
-
): Promise<JiraSearchResult>
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
## Testing Guidelines
|
|
239
|
-
|
|
240
|
-
### Test Structure
|
|
241
|
-
|
|
242
|
-
- **Unit Tests**: Test individual functions/methods
|
|
243
|
-
- **Integration Tests**: Test component interactions
|
|
244
|
-
- **E2E Tests**: Test complete workflows (planned)
|
|
245
|
-
|
|
246
|
-
### Writing Tests
|
|
247
|
-
|
|
248
|
-
1. **Test File Naming**: `*.test.ts`
|
|
249
|
-
2. **Use Descriptive Names**:
|
|
250
|
-
```typescript
|
|
251
|
-
describe("JiraClient", () => {
|
|
252
|
-
describe("searchIssues", () => {
|
|
253
|
-
it("should return issues matching JQL query", () => {
|
|
254
|
-
// Test implementation
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
it("should handle empty results", () => {
|
|
258
|
-
// Test implementation
|
|
259
|
-
});
|
|
260
|
-
});
|
|
261
|
-
});
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
3. **Test Both Success and Error Cases**
|
|
265
|
-
4. **Keep Tests Fast and Isolated**
|
|
266
|
-
5. **Mock External Dependencies**
|
|
267
|
-
|
|
268
|
-
### Running Tests
|
|
269
|
-
|
|
270
|
-
```bash
|
|
271
|
-
# Run all tests
|
|
272
|
-
npm test
|
|
273
|
-
|
|
274
|
-
# Run specific test file
|
|
275
|
-
node --test tests/jira/client.test.ts
|
|
276
|
-
|
|
277
|
-
# Run with verbose output
|
|
278
|
-
node --test --test-reporter=spec
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
## Pull Request Process
|
|
282
|
-
|
|
283
|
-
### Before Submitting
|
|
284
|
-
|
|
285
|
-
1. ✅ All tests pass (`npm test`)
|
|
286
|
-
2. ✅ Code builds successfully (`npm run build`)
|
|
287
|
-
3. ✅ Code follows style guidelines
|
|
288
|
-
4. ✅ Documentation is updated
|
|
289
|
-
5. ✅ Commit messages follow conventions
|
|
290
|
-
6. ✅ No sensitive data (credentials, tokens) in code
|
|
291
|
-
|
|
292
|
-
### Submitting a Pull Request
|
|
293
|
-
|
|
294
|
-
1. **Push to Your Fork**
|
|
295
|
-
```bash
|
|
296
|
-
git push origin feature/your-feature-name
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
2. **Create Pull Request**
|
|
300
|
-
- Go to the original repository on GitHub
|
|
301
|
-
- Click "New Pull Request"
|
|
302
|
-
- Select your fork and branch
|
|
303
|
-
- Fill out the PR template
|
|
304
|
-
|
|
305
|
-
3. **PR Description Should Include**:
|
|
306
|
-
- Summary of changes
|
|
307
|
-
- Related issue numbers (if applicable)
|
|
308
|
-
- Testing performed
|
|
309
|
-
- Screenshots (for UI changes)
|
|
310
|
-
- Breaking changes (if any)
|
|
311
|
-
|
|
312
|
-
### PR Review Process
|
|
313
|
-
|
|
314
|
-
1. **Automated Checks**: CI/CD runs tests and linting
|
|
315
|
-
2. **Code Review**: Maintainers review your code
|
|
316
|
-
3. **Feedback**: Address requested changes
|
|
317
|
-
4. **Approval**: Once approved, PR will be merged
|
|
318
|
-
|
|
319
|
-
## Release Process
|
|
320
|
-
|
|
321
|
-
Releases are managed by maintainers following semantic versioning:
|
|
322
|
-
|
|
323
|
-
- **Major** (1.0.0): Breaking changes
|
|
324
|
-
- **Minor** (0.1.0): New features, backward compatible
|
|
325
|
-
- **Patch** (0.0.1): Bug fixes, backward compatible
|
|
326
|
-
|
|
327
|
-
## Areas for Contribution
|
|
328
|
-
|
|
329
|
-
### High Priority
|
|
330
|
-
|
|
331
|
-
- [ ] Add more comprehensive unit tests
|
|
332
|
-
- [ ] Implement integration tests with mock APIs
|
|
333
|
-
- [ ] Add rate limiting implementation
|
|
334
|
-
- [ ] Implement caching layer
|
|
335
|
-
- [ ] Improve error messages
|
|
336
|
-
|
|
337
|
-
### Medium Priority
|
|
338
|
-
|
|
339
|
-
- [ ] Add bulk operations support
|
|
340
|
-
- [ ] Custom field templates
|
|
341
|
-
- [ ] Better TypeScript type inference
|
|
342
|
-
- [ ] Performance optimizations
|
|
343
|
-
- [ ] Documentation improvements
|
|
344
|
-
|
|
345
|
-
### Low Priority
|
|
346
|
-
|
|
347
|
-
- [ ] Webhook support
|
|
348
|
-
- [ ] Multi-instance configuration
|
|
349
|
-
- [ ] CLI tool for testing
|
|
350
|
-
- [ ] Web UI for configuration
|
|
351
|
-
|
|
352
|
-
## Getting Help
|
|
353
|
-
|
|
354
|
-
- **Issues**: Open an issue for bugs or feature requests
|
|
355
|
-
- **Discussions**: Use GitHub Discussions for questions
|
|
356
|
-
- **Documentation**: Check README.md and CLAUDE.md
|
|
357
|
-
|
|
358
|
-
## Recognition
|
|
359
|
-
|
|
360
|
-
All contributors will be:
|
|
361
|
-
- Listed in the repository contributors page
|
|
362
|
-
- Mentioned in release notes (for significant contributions)
|
|
363
|
-
- Credited in the AUTHORS file (coming soon)
|
|
364
|
-
|
|
365
|
-
## License
|
|
366
|
-
|
|
367
|
-
By contributing, you agree that your contributions will be licensed under the MIT License.
|
|
368
|
-
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
**Thank you for contributing to Jicon! Your efforts help make this project better for everyone.** 🎉
|