Skip to content

Commit 23ec003

Browse files
author
shivam.2.rai
committed
FFF: Happy Weekend! Rain! Rain! Brain! Drain! Crane! Grain!
0 parents  commit 23ec003

File tree

94 files changed

+28257
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+28257
-0
lines changed

.dockerignore

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Git
2+
.git
3+
.gitignore
4+
5+
# Python
6+
__pycache__
7+
*.pyc
8+
*.pyo
9+
*.pyd
10+
.Python
11+
env
12+
pip-log.txt
13+
pip-delete-this-directory.txt
14+
.tox
15+
.coverage
16+
.coverage.*
17+
.pytest_cache
18+
nosetests.xml
19+
coverage.xml
20+
*.cover
21+
*.log
22+
.cache
23+
.mypy_cache
24+
.dmypy.json
25+
dmypy.json
26+
27+
# Environment
28+
.env
29+
.env.*
30+
!.env.example
31+
32+
# IDE
33+
.vscode
34+
.idea
35+
*.swp
36+
*.swo
37+
38+
# OS
39+
.DS_Store
40+
Thumbs.db
41+
42+
# Project specific
43+
reports/
44+
test_results_*.csv
45+
mcp_integration_tests/
46+
docs/
47+
*.md
48+
!README.md
49+
50+
# Build artifacts
51+
build/
52+
dist/
53+
*.egg-info/

.env.example

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Environment Profile
2+
ENVIRONMENT=development # development, production, testing
3+
4+
# Optional Settings
5+
GITLAB_TIMEOUT=30
6+
GITLAB_MAX_RETRIES=3
7+
GITLAB_SSL_VERIFY=false
8+
9+
# Performance & Caching
10+
CACHE_TTL=300
11+
RATE_LIMIT_REQUESTS=100
12+
RATE_LIMIT_WINDOW=60
13+
14+
MCP_TRANSPORT=stdio
15+
16+
# Logging
17+
LOG_LEVEL=INFO
18+
19+
# Security & Access Control
20+
READ_ONLY_MODE=true
21+
22+
# Tool & Category Filtering (Optional - leave empty to enable all)
23+
# Only set these if you want to restrict available tools/categories
24+
# ENABLED_TOOLS=gitlab_analyze_pipeline_health,gitlab_ci_performance_insights,gitlab_compare_branches_enhanced,gitlab_get_branch_enhanced,gitlab_get_commit_comments_enhanced,gitlab_get_commit_diff_enhanced,gitlab_get_commit_enhanced,gitlab_get_commit_statuses_enhanced,gitlab_get_current_user_enhanced,gitlab_get_file_blame_enhanced,gitlab_get_file_content_enhanced,gitlab_get_file_content_general_enhanced,gitlab_get_file_history_enhanced,gitlab_get_issue_enhanced,gitlab_get_issue_notes_enhanced,gitlab_get_issue_participants_enhanced,gitlab_get_issue_related_merge_requests_enhanced,gitlab_get_issue_resource_label_events_enhanced,gitlab_get_issue_resource_milestone_events_enhanced,gitlab_get_issue_resource_state_events_enhanced,gitlab_get_issue_smart,gitlab_get_issue_time_stats_enhanced,gitlab_get_job_artifacts_enhanced,gitlab_get_job_enhanced,gitlab_get_job_log_enhanced,gitlab_get_merge_request_enhanced,gitlab_get_merge_request_general_enhanced,gitlab_get_mr_approvals_enhanced,gitlab_get_mr_changes_enhanced,gitlab_get_mr_changes_general_enhanced,gitlab_get_mr_closes_issues_enhanced,gitlab_get_mr_closes_issues_general_enhanced,gitlab_get_mr_commits_enhanced,gitlab_get_mr_commits_general_enhanced,gitlab_get_mr_diff_versions_enhanced,gitlab_get_mr_discussions_enhanced,gitlab_get_mr_discussions_general_enhanced,gitlab_get_mr_merge_status_enhanced,gitlab_get_mr_participants_enhanced,gitlab_get_mr_pipelines_enhanced,gitlab_get_mr_pipelines_general_enhanced,gitlab_get_mr_resource_label_events_enhanced,gitlab_get_mr_resource_milestone_events_enhanced,gitlab_get_mr_resource_state_events_enhanced,gitlab_get_mr_time_stats_enhanced,gitlab_get_pipeline_coverage_enhanced,gitlab_get_pipeline_enhanced,gitlab_get_pipeline_jobs_enhanced,gitlab_get_pipeline_schedule_enhanced,gitlab_get_pipeline_smart_enhanced,gitlab_get_pipeline_test_report_enhanced,gitlab_get_pipeline_trigger_enhanced,gitlab_get_pipeline_variables_enhanced,gitlab_get_project_access_tokens_enhanced,gitlab_get_project_badges_enhanced,gitlab_get_project_deploy_keys_enhanced,gitlab_get_project_enhanced,gitlab_get_project_environments_enhanced,gitlab_get_project_general_enhanced,gitlab_get_project_hooks_enhanced,gitlab_get_project_labels_enhanced,gitlab_get_project_languages_enhanced,gitlab_get_project_members_enhanced,gitlab_get_project_milestones_enhanced,gitlab_get_project_protected_branches_enhanced,gitlab_get_project_protected_tags_enhanced,gitlab_get_project_push_rules_enhanced,gitlab_get_project_releases_enhanced,gitlab_get_project_snippets_enhanced,gitlab_get_project_statistics_enhanced,gitlab_get_project_variables_enhanced,gitlab_get_repository_archive_enhanced,gitlab_get_repository_contributors_enhanced,gitlab_get_repository_size_enhanced,gitlab_get_runner_enhanced,gitlab_get_server_version_enhanced,gitlab_get_tag_enhanced,gitlab_global_search_enhanced,gitlab_list_branches_enhanced,gitlab_list_branches_general_enhanced,gitlab_list_commit_refs_enhanced,gitlab_list_commits_enhanced,gitlab_list_commits_general_enhanced,gitlab_list_confidential_issues_enhanced,gitlab_list_draft_mrs_enhanced,gitlab_list_failed_jobs_enhanced,gitlab_list_issue_links_enhanced,gitlab_list_issues_by_epic_enhanced,gitlab_list_issues_by_labels_enhanced,gitlab_list_issues_by_milestone_enhanced,gitlab_list_issues_by_weight_enhanced,gitlab_list_issues_enhanced,gitlab_list_issues_smart,gitlab_list_issues_without_assignee_enhanced,gitlab_list_issues_without_labels_enhanced,gitlab_list_issues_without_milestone_enhanced,gitlab_list_jobs_enhanced,gitlab_list_merge_requests_enhanced,gitlab_list_merge_requests_general_enhanced,gitlab_list_mr_by_labels_enhanced,gitlab_list_mr_by_milestone_enhanced,gitlab_list_mr_by_source_branch_enhanced,gitlab_list_mr_by_target_branch_enhanced,gitlab_list_overdue_issues_enhanced,gitlab_list_pipeline_bridges_enhanced,gitlab_list_pipeline_schedules_enhanced,gitlab_list_pipeline_triggers_enhanced,gitlab_list_pipelines_enhanced,gitlab_list_project_forks_enhanced,gitlab_list_projects_enhanced,gitlab_list_projects_general_enhanced,gitlab_list_repository_tree_enhanced,gitlab_list_runners_enhanced,gitlab_list_running_jobs_enhanced,gitlab_list_submodules_enhanced,gitlab_list_successful_jobs_enhanced,gitlab_list_tags_enhanced,gitlab_search_by_file_extension_enhanced,gitlab_search_by_filename_enhanced,gitlab_search_code_enhanced,gitlab_search_commits_enhanced,gitlab_search_environments_by_state_enhanced,gitlab_search_groups_enhanced,gitlab_search_issues_contextual,gitlab_search_issues_enhanced,gitlab_search_labels_by_color_enhanced,gitlab_search_merge_requests_enhanced,gitlab_search_milestones_enhanced,gitlab_search_notes_enhanced,gitlab_search_project_members_by_role_enhanced,gitlab_search_projects_by_language_enhanced,gitlab_search_projects_by_topic_enhanced,gitlab_search_projects_enhanced,gitlab_search_projects_general_enhanced,gitlab_search_projects_smart,gitlab_search_recent_activity_enhanced,gitlab_search_releases_by_tag_pattern_enhanced,gitlab_search_repository_files_enhanced,gitlab_search_snippets_enhanced,gitlab_search_users_enhanced,gitlab_search_users_general_enhanced,gitlab_search_wiki_blobs_enhanced,gitlab_troubleshoot_failed_pipeline
25+
# ENABLED_CATEGORIES=general,issues,merge_requests,pipelines,projects,repository,search
26+
# ENABLED_PROCESSORS=gitlab_url,gitlab_mentions,markdown

.github/CODEOWNERS

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Default owners for everything
2+
* @13shivam
3+
4+
# Core components
5+
/src/core/ @13shivam
6+
/src/gitlab_client.py @13shivam
7+
8+
# Tools
9+
/src/tools/ @13shivam
10+
11+
# Intelligence layer
12+
/src/intelligence/ @13shivam
13+
14+
# CI/CD
15+
/.github/ @13shivam
16+
17+
# Documentation
18+
*.md @13shivam
19+
/docs/ @13shivam
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 to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
<!-- Clear and concise description of the bug -->
11+
12+
## Steps to Reproduce
13+
1.
14+
2.
15+
3.
16+
17+
## Expected Behavior
18+
<!-- What you expected to happen -->
19+
20+
## Actual Behavior
21+
<!-- What actually happened -->
22+
23+
## Environment
24+
- OS: [e.g., macOS 14.0, Ubuntu 22.04]
25+
- Python Version: [e.g., 3.11.5]
26+
- GitLab MCP Server Version: [e.g., 1.0.0]
27+
- GitLab Version: [e.g., 16.5.0 or GitLab.com]
28+
29+
## Configuration
30+
```bash
31+
# Relevant environment variables (redact sensitive data)
32+
GITLAB_URL=
33+
READ_ONLY_MODE=
34+
```
35+
36+
## Logs
37+
```
38+
# Paste relevant logs here
39+
```
40+
41+
## Additional Context
42+
<!-- Any other context about the problem -->
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or enhancement
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
<!-- Clear and concise description of the feature -->
11+
12+
## Problem Statement
13+
<!-- What problem does this solve? -->
14+
15+
## Proposed Solution
16+
<!-- How should this feature work? -->
17+
18+
## Alternatives Considered
19+
<!-- What other approaches did you consider? -->
20+
21+
## Use Case
22+
<!-- Describe your use case and how this would help -->
23+
24+
## Additional Context
25+
<!-- Any other context, mockups, or examples -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Description
2+
<!-- Provide a brief description of the changes -->
3+
4+
## Type of Change
5+
- [ ] Bug fix (non-breaking change which fixes an issue)
6+
- [ ] New feature (non-breaking change which adds functionality)
7+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
8+
- [ ] Documentation update
9+
- [ ] Performance improvement
10+
- [ ] Code refactoring
11+
12+
## Testing
13+
- [ ] Unit tests pass locally (`pytest tests/ -v`)
14+
- [ ] Coverage maintained or improved (`pytest tests/ --cov=src/`)
15+
- [ ] Integration tests pass (if applicable)
16+
- [ ] Manual testing completed
17+
18+
## Checklist
19+
- [ ] Code follows project style guidelines
20+
- [ ] Self-review completed
21+
- [ ] Comments added for complex logic
22+
- [ ] Documentation updated (if needed)
23+
- [ ] No new warnings introduced
24+
- [ ] Backward compatibility maintained
25+
26+
## Related Issues
27+
<!-- Link related issues: Fixes #123, Closes #456 -->
28+
29+
## Screenshots (if applicable)
30+
<!-- Add screenshots for UI changes -->
31+
32+
## Additional Notes
33+
<!-- Any additional information for reviewers -->

.github/dependabot.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
open-pull-requests-limit: 5
9+
reviewers:
10+
- "13shivam"
11+
labels:
12+
- "dependencies"
13+
- "python"
14+
commit-message:
15+
prefix: "chore"
16+
include: "scope"
17+
18+
- package-ecosystem: "github-actions"
19+
directory: "/"
20+
schedule:
21+
interval: "monthly"
22+
open-pull-requests-limit: 3
23+
labels:
24+
- "dependencies"
25+
- "github-actions"
26+
commit-message:
27+
prefix: "ci"

.github/workflows/ci.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ['**']
6+
pull_request:
7+
branches: [main, develop]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ['3.10', '3.11', '3.12']
16+
fail-fast: false
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
cache: 'pip'
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -e ".[dev]"
31+
32+
- name: Run tests with coverage
33+
run: |
34+
pytest tests/ -v --cov=src/ --cov-report=xml --cov-report=term
35+
36+
- name: Upload coverage to Codecov
37+
if: matrix.python-version == '3.11'
38+
uses: codecov/codecov-action@v4
39+
with:
40+
file: ./coverage.xml
41+
fail_ci_if_error: false
42+
token: ${{ secrets.CODECOV_TOKEN }}
43+
44+
lint:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Set up Python
50+
uses: actions/setup-python@v5
51+
with:
52+
python-version: '3.11'
53+
cache: 'pip'
54+
55+
- name: Install dependencies
56+
run: |
57+
python -m pip install --upgrade pip
58+
pip install ruff mypy
59+
pip install -e .
60+
61+
- name: Lint with ruff
62+
run: ruff check src/ tests/ --output-format=github
63+
continue-on-error: true
64+
65+
- name: Type check with mypy
66+
run: mypy src/ --ignore-missing-imports
67+
continue-on-error: true
68+
69+
security:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
74+
- name: Set up Python
75+
uses: actions/setup-python@v5
76+
with:
77+
python-version: '3.11'
78+
79+
- name: Install dependencies
80+
run: |
81+
python -m pip install --upgrade pip
82+
pip install bandit safety
83+
84+
- name: Security scan with bandit
85+
run: bandit -r src/ -f json -o bandit-report.json
86+
continue-on-error: true
87+
88+
- name: Check dependencies with safety
89+
run: safety check --json
90+
continue-on-error: true

.github/workflows/pr-checks.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: PR Quality Gate
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
quality-gate:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.11'
19+
cache: 'pip'
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -e ".[dev]"
25+
26+
- name: Run full test suite
27+
run: pytest tests/ -v --cov=src/ --cov-report=term --cov-fail-under=70
28+
29+
- name: Check code quality
30+
run: |
31+
ruff check src/ tests/
32+
ruff format --check src/ tests/
33+
34+
- name: Validate package build
35+
run: |
36+
pip install build
37+
python -m build
38+
39+
- name: PR size check
40+
run: |
41+
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | wc -l)
42+
echo "Changed files: $CHANGED_FILES"
43+
if [ $CHANGED_FILES -gt 50 ]; then
44+
echo "::warning::PR contains $CHANGED_FILES files. Consider splitting into smaller PRs."
45+
fi
46+
47+
- name: Comment coverage
48+
if: always()
49+
uses: py-cov-action/python-coverage-comment-action@v3
50+
with:
51+
GITHUB_TOKEN: ${{ github.token }}
52+
MINIMUM_GREEN: 80
53+
MINIMUM_ORANGE: 70

0 commit comments

Comments
 (0)