gitlab-api 27.3.22__tar.gz → 27.3.24__tar.gz
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.
- {gitlab_api-27.3.22/gitlab_api.egg-info → gitlab_api-27.3.24}/PKG-INFO +50 -20
- gitlab_api-27.3.22/PKG-INFO → gitlab_api-27.3.24/README.md +47 -43
- gitlab_api-27.3.24/gitlab_api/__init__.py +31 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/kg_ingest.py +13 -2
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/__init__.py +1 -1
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/access_contracts.ttl +78 -76
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/certification.json +3 -3
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/gitlab.ttl +27 -63
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/shapes/connector.shacl.ttl +2 -2
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/skills/gitlab-api-development/SKILL.md +16 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/skills/gitlab-api-operations/SKILL.md +17 -1
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/skills/gitlab-issues/SKILL.md +19 -1
- gitlab_api-27.3.24/gitlab_api/skills/gitlab-merge-request-create/SKILL.md +52 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/skills/gitlab-merge-request-review/SKILL.md +19 -1
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/skills/gitlab-pipelines/SKILL.md +19 -1
- gitlab_api-27.3.24/gitlab_api/skills/gitlab-vulnerabilities/SKILL.md +47 -0
- gitlab_api-27.3.22/README.md → gitlab_api-27.3.24/gitlab_api.egg-info/PKG-INFO +73 -18
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api.egg-info/SOURCES.txt +2 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api.egg-info/requires.txt +2 -1
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/pyproject.toml +2 -2
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_access_contracts.py +13 -6
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_catalog_edges.py +6 -1
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_cq_paths.py +5 -6
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_kg_ingest.py +13 -10
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_ontology_parent_link.py +9 -9
- gitlab_api-27.3.24/tests/test_pack_extends_core.py +48 -0
- gitlab_api-27.3.24/tests/test_scion_sdk_0_10_imports.py +59 -0
- gitlab_api-27.3.22/gitlab_api/__init__.py +0 -13
- gitlab_api-27.3.22/gitlab_api/skills/gitlab-merge-request-create/SKILL.md +0 -34
- gitlab_api-27.3.22/gitlab_api/skills/gitlab-vulnerabilities/SKILL.md +0 -30
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/LICENSE +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/__main__.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/__init__.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_base.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_environments.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_issues.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_merge_requests.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_other.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_pipelines.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_projects.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_repositories.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_system.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_users_groups.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_vulnerabilities.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api_client.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/auth.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/connector_contracts.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/connector_prep.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/connector_sources.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/gitlab_gql.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/gitlab_input_models.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/gitlab_response_models.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/instances.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/mcp_config.json +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/mcp_server.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/fixtures/records.json +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/mappings/source.yaml +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/migrations/manifest.json +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/prompts/gitlab-mcp-operator.json +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/prompts/gitlab-mcp-project-administrator.json +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/prompts/gitlab-mcp-release-manager.json +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/prompts/gitlab-mcp-triage-lead.json +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api.egg-info/dependency_links.txt +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api.egg-info/entry_points.txt +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api.egg-info/top_level.txt +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/scripts/check_import_safety.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/scripts/security_contract.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/setup.cfg +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/__init__.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/conftest.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_api_wrapper.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_auth.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_connector_prep.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_fleet_name.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_a2a_validation.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_api_brute_force_coverage.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_api_development_skill.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_gql.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_mcp_validation.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_models.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_graphql_error_category.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_identity_context_scoping.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_ingest_sources.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_init_dynamics.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_instances.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_mock_coverage.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_paged_models_have_paging_fields.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_pages_workflow.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_response_models_hide_secrets.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_startup.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_tool_modes.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_verify_agent.py +0 -0
- {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/verify_a2a_queries.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitlab-api
|
|
3
|
-
Version: 27.3.
|
|
3
|
+
Version: 27.3.24
|
|
4
4
|
Summary: GitLab API + MCP Server
|
|
5
5
|
Author-email: Repository Maintainers <maintainers@knuckles.team>
|
|
6
6
|
License: MIT
|
|
@@ -12,7 +12,8 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: >=3.12
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: scion-sdk[graphql,mcp]
|
|
15
|
+
Requires-Dist: scion-sdk[graphql,mcp,requests]<0.15,>=0.14.0
|
|
16
|
+
Requires-Dist: pydantic[email]>=2.14.1
|
|
16
17
|
Requires-Dist: python-dotenv>=1.2.4
|
|
17
18
|
Provides-Extra: mcp
|
|
18
19
|
Provides-Extra: all
|
|
@@ -45,8 +46,8 @@ Dynamic: license-file
|
|
|
45
46
|

|
|
46
47
|

|
|
47
48
|
|
|
48
|
-
> **Documentation** — Installation, deployment, usage across the API, CLI,
|
|
49
|
-
>
|
|
49
|
+
> **Documentation** — Installation, deployment, and usage across the API, CLI, MCP,
|
|
50
|
+
> and A2A agent interfaces are maintained in the
|
|
50
51
|
> [official documentation](https://knuckles-team.github.io/gitlab-api/).
|
|
51
52
|
|
|
52
53
|
---
|
|
@@ -530,6 +531,32 @@ the detailed transport contract.
|
|
|
530
531
|
|
|
531
532
|
---
|
|
532
533
|
|
|
534
|
+
## Agent
|
|
535
|
+
|
|
536
|
+
# Set credentials
|
|
537
|
+
export GITLAB_URL="your_value"
|
|
538
|
+
export GITLAB_TOKEN="your_value"
|
|
539
|
+
|
|
540
|
+
# Connector-focused MCP server (includes the shared graph engine)
|
|
541
|
+
uv pip install "gitlab-api[mcp]"
|
|
542
|
+
|
|
543
|
+
# Everything (development)
|
|
544
|
+
uv pip install "gitlab-api[all]" # or: python -m pip install "gitlab-api[all]"
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
### Container images (`:mcp`)
|
|
548
|
+
|
|
549
|
+
One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):
|
|
550
|
+
|
|
551
|
+
| Image tag | Build target | Contents | Entrypoint |
|
|
552
|
+
|-----------|--------------|----------|------------|
|
|
553
|
+
| `example/gitlab-api:mcp` | `--target mcp` | `gitlab-api[mcp]` — **connector-focused**, includes `medulla`; no model-orchestration stack | `gitlab-mcp` |
|
|
554
|
+
|
|
555
|
+
```bash
|
|
556
|
+
docker build --target mcp -t example/gitlab-api:mcp docker/ # connector-focused MCP server
|
|
557
|
+
|
|
558
|
+
---
|
|
559
|
+
|
|
533
560
|
## Environment Variables
|
|
534
561
|
|
|
535
562
|
<!-- ENV-VARS-TABLE:START -->
|
|
@@ -654,26 +681,29 @@ The full list is in the [Available MCP Tools](#available-mcp-tools) table above
|
|
|
654
681
|
| `EUNOMIA_POLICY_FILE` | Embedded policy file | `mcp_policies.json` |
|
|
655
682
|
| `EUNOMIA_REMOTE_URL` | Remote Eunomia server URL | — |
|
|
656
683
|
|
|
657
|
-
|
|
684
|
+
---
|
|
658
685
|
|
|
659
|
-
|
|
660
|
-
export GITLAB_URL="your_value"
|
|
661
|
-
export GITLAB_TOKEN="your_value"
|
|
686
|
+
## Documentation
|
|
662
687
|
|
|
663
|
-
|
|
664
|
-
|
|
688
|
+
The complete documentation is published as the
|
|
689
|
+
[official documentation site](https://knuckles-team.github.io/gitlab-api/) and is
|
|
690
|
+
the recommended reference for installation, deployment, and day-to-day operation.
|
|
665
691
|
|
|
666
|
-
|
|
667
|
-
uv pip install "gitlab-api[all]" # or: python -m pip install "gitlab-api[all]"
|
|
668
|
-
```
|
|
692
|
+
---
|
|
669
693
|
|
|
670
|
-
|
|
694
|
+
## Repository Owners
|
|
671
695
|
|
|
672
|
-
|
|
696
|
+
<img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=example&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
|
|
673
697
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
| `example/gitlab-api:mcp` | `--target mcp` | `gitlab-api[mcp]` — **connector-focused**, includes `medulla`; no model-orchestration stack | `gitlab-mcp` |
|
|
698
|
+

|
|
699
|
+

|
|
677
700
|
|
|
678
|
-
|
|
679
|
-
|
|
701
|
+
---
|
|
702
|
+
|
|
703
|
+
## Contribute
|
|
704
|
+
|
|
705
|
+
Contributions are welcome! Please ensure code quality by running local checks before submitting pull requests:
|
|
706
|
+
- Format code using `ruff format .`
|
|
707
|
+
- Lint code using `ruff check .`
|
|
708
|
+
- Validate type-safety with `mypy .`
|
|
709
|
+
- Run test suites using `pytest`
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: gitlab-api
|
|
3
|
-
Version: 27.3.22
|
|
4
|
-
Summary: GitLab API + MCP Server
|
|
5
|
-
Author-email: Repository Maintainers <maintainers@knuckles.team>
|
|
6
|
-
License: MIT
|
|
7
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
8
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
-
Classifier: Environment :: Console
|
|
10
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Requires-Python: >=3.12
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
License-File: LICENSE
|
|
15
|
-
Requires-Dist: scion-sdk[graphql,mcp]>=0.10.1
|
|
16
|
-
Requires-Dist: python-dotenv>=1.2.4
|
|
17
|
-
Provides-Extra: mcp
|
|
18
|
-
Provides-Extra: all
|
|
19
|
-
Provides-Extra: test
|
|
20
|
-
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
21
|
-
Requires-Dist: pytest>=9.1.1; extra == "test"
|
|
22
|
-
Requires-Dist: pytest-asyncio>=1.4.0; extra == "test"
|
|
23
|
-
Requires-Dist: pytest-cov>=7.1.0; extra == "test"
|
|
24
|
-
Dynamic: license-file
|
|
25
|
-
|
|
26
1
|
# Gitlab Api
|
|
27
2
|
## CLI or API | MCP
|
|
28
3
|
|
|
@@ -45,8 +20,8 @@ Dynamic: license-file
|
|
|
45
20
|

|
|
46
21
|

|
|
47
22
|
|
|
48
|
-
> **Documentation** — Installation, deployment, usage across the API, CLI,
|
|
49
|
-
>
|
|
23
|
+
> **Documentation** — Installation, deployment, and usage across the API, CLI, MCP,
|
|
24
|
+
> and A2A agent interfaces are maintained in the
|
|
50
25
|
> [official documentation](https://knuckles-team.github.io/gitlab-api/).
|
|
51
26
|
|
|
52
27
|
---
|
|
@@ -530,6 +505,32 @@ the detailed transport contract.
|
|
|
530
505
|
|
|
531
506
|
---
|
|
532
507
|
|
|
508
|
+
## Agent
|
|
509
|
+
|
|
510
|
+
# Set credentials
|
|
511
|
+
export GITLAB_URL="your_value"
|
|
512
|
+
export GITLAB_TOKEN="your_value"
|
|
513
|
+
|
|
514
|
+
# Connector-focused MCP server (includes the shared graph engine)
|
|
515
|
+
uv pip install "gitlab-api[mcp]"
|
|
516
|
+
|
|
517
|
+
# Everything (development)
|
|
518
|
+
uv pip install "gitlab-api[all]" # or: python -m pip install "gitlab-api[all]"
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
### Container images (`:mcp`)
|
|
522
|
+
|
|
523
|
+
One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):
|
|
524
|
+
|
|
525
|
+
| Image tag | Build target | Contents | Entrypoint |
|
|
526
|
+
|-----------|--------------|----------|------------|
|
|
527
|
+
| `example/gitlab-api:mcp` | `--target mcp` | `gitlab-api[mcp]` — **connector-focused**, includes `medulla`; no model-orchestration stack | `gitlab-mcp` |
|
|
528
|
+
|
|
529
|
+
```bash
|
|
530
|
+
docker build --target mcp -t example/gitlab-api:mcp docker/ # connector-focused MCP server
|
|
531
|
+
|
|
532
|
+
---
|
|
533
|
+
|
|
533
534
|
## Environment Variables
|
|
534
535
|
|
|
535
536
|
<!-- ENV-VARS-TABLE:START -->
|
|
@@ -654,26 +655,29 @@ The full list is in the [Available MCP Tools](#available-mcp-tools) table above
|
|
|
654
655
|
| `EUNOMIA_POLICY_FILE` | Embedded policy file | `mcp_policies.json` |
|
|
655
656
|
| `EUNOMIA_REMOTE_URL` | Remote Eunomia server URL | — |
|
|
656
657
|
|
|
657
|
-
|
|
658
|
+
---
|
|
658
659
|
|
|
659
|
-
|
|
660
|
-
export GITLAB_URL="your_value"
|
|
661
|
-
export GITLAB_TOKEN="your_value"
|
|
660
|
+
## Documentation
|
|
662
661
|
|
|
663
|
-
|
|
664
|
-
|
|
662
|
+
The complete documentation is published as the
|
|
663
|
+
[official documentation site](https://knuckles-team.github.io/gitlab-api/) and is
|
|
664
|
+
the recommended reference for installation, deployment, and day-to-day operation.
|
|
665
665
|
|
|
666
|
-
|
|
667
|
-
uv pip install "gitlab-api[all]" # or: python -m pip install "gitlab-api[all]"
|
|
668
|
-
```
|
|
666
|
+
---
|
|
669
667
|
|
|
670
|
-
|
|
668
|
+
## Repository Owners
|
|
671
669
|
|
|
672
|
-
|
|
670
|
+
<img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=example&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
|
|
673
671
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
| `example/gitlab-api:mcp` | `--target mcp` | `gitlab-api[mcp]` — **connector-focused**, includes `medulla`; no model-orchestration stack | `gitlab-mcp` |
|
|
672
|
+

|
|
673
|
+

|
|
677
674
|
|
|
678
|
-
|
|
679
|
-
|
|
675
|
+
---
|
|
676
|
+
|
|
677
|
+
## Contribute
|
|
678
|
+
|
|
679
|
+
Contributions are welcome! Please ensure code quality by running local checks before submitting pull requests:
|
|
680
|
+
- Format code using `ruff format .`
|
|
681
|
+
- Lint code using `ruff check .`
|
|
682
|
+
- Validate type-safety with `mypy .`
|
|
683
|
+
- Run test suites using `pytest`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
3
|
+
from scion_sdk.connector import Connector
|
|
4
|
+
|
|
5
|
+
from gitlab_api.api_client import Api
|
|
6
|
+
from gitlab_api.auth import get_client
|
|
7
|
+
|
|
8
|
+
#: Operations the SDK refuses to serve unless they declare the owner-approval
|
|
9
|
+
#: flag (SCION-SCM-R003.3): every non-read method whose name holds the
|
|
10
|
+
#: ``merge`` token.
|
|
11
|
+
OWNER_APPROVAL_OPERATIONS: tuple[str, ...] = (
|
|
12
|
+
"accept_merge_request",
|
|
13
|
+
"approve_merge_request",
|
|
14
|
+
"create_merge_request",
|
|
15
|
+
"unapprove_merge_request",
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
connector = Connector(
|
|
19
|
+
verbose_targets=(
|
|
20
|
+
{
|
|
21
|
+
"client_cls": Api,
|
|
22
|
+
"get_client": get_client,
|
|
23
|
+
"manifest": [
|
|
24
|
+
{"method": method, "owner_approval_required": True}
|
|
25
|
+
for method in OWNER_APPROVAL_OPERATIONS
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
),
|
|
29
|
+
instructions="GitLab API MCP Server - Manage projects, issues, merge requests, branches, and more.",
|
|
30
|
+
tools="gitlab_api.mcp_server",
|
|
31
|
+
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Medulla ingestion for GitLab records (typed graph nodes).
|
|
2
2
|
|
|
3
3
|
CONCEPT:AU-KG.ingest.enterprise-source-extractor. This is the record-source twin of
|
|
4
4
|
media-downloader's blob ingestion: the package pushes its data into the ONE
|
|
@@ -11,14 +11,25 @@ provenance (via ``IngestBinding``) and match the classes federated by
|
|
|
11
11
|
|
|
12
12
|
from __future__ import annotations
|
|
13
13
|
|
|
14
|
+
import hashlib
|
|
15
|
+
from pathlib import Path
|
|
14
16
|
from typing import Any
|
|
15
17
|
|
|
16
18
|
from scion_sdk.ingest import (
|
|
19
|
+
ContractSource,
|
|
17
20
|
KnowledgeIngest,
|
|
18
21
|
SourceStream,
|
|
19
22
|
)
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
#: The local declaration the engine must have accepted: the connector's mappings.
|
|
25
|
+
_DECLARATION = Path(__file__).parent / "ontology" / "mappings" / "source.yaml"
|
|
26
|
+
|
|
27
|
+
#: The contract every binding of this connector runs under; its digest is the
|
|
28
|
+
#: SHA-256 of the shipped mapping declaration, so a changed declaration is
|
|
29
|
+
#: refused (``contract_not_accepted``) until the engine accepts the new one.
|
|
30
|
+
CONTRACT = ContractSource(digest=hashlib.sha256(_DECLARATION.read_bytes()).hexdigest())
|
|
31
|
+
|
|
32
|
+
STREAM = SourceStream.for_package(__package__.split(".")[0], "gitlab", CONTRACT)
|
|
22
33
|
|
|
23
34
|
|
|
24
35
|
async def ingest_projects(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""GitLab DevOps ontology contribution (CONCEPT:AU-KG.ontology.federation-provider-leg).
|
|
2
2
|
|
|
3
3
|
Data-only subpackage: it carries ``gitlab.ttl`` (the ``owl:Ontology``
|
|
4
|
-
``
|
|
4
|
+
``https://knuckles-team.github.io/ontology/connector/gitlab`` module — groups, projects, merge requests,
|
|
5
5
|
pipelines, jobs, issues, epics, milestones, commits, branches, releases and runners
|
|
6
6
|
with their review and delivery relationships) which the scion-sdk hub federates
|
|
7
7
|
in via the ``scion_sdk.ontology_providers`` entry-point. It holds no business
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
@prefix
|
|
2
|
-
@prefix
|
|
1
|
+
@prefix swarm: <https://knuckles-team.github.io/ontology/swarm#> .
|
|
2
|
+
@prefix ac: <https://knuckles-team.github.io/ontology/access#> .
|
|
3
|
+
@prefix core: <https://knuckles-team.github.io/ontology/core#> .
|
|
4
|
+
@prefix : <https://knuckles-team.github.io/ontology/connector/gitlab#> .
|
|
3
5
|
|
|
4
6
|
# Read contracts for the classes declared by gitlab.ttl. The MCP tools expose
|
|
5
7
|
# both read and write actions, but these mappings are read-only query routes:
|
|
@@ -7,8 +9,8 @@
|
|
|
7
9
|
# The source classes stay in GitLab's ontology namespace. No heuristic
|
|
8
10
|
# crosswalk to a hub class is asserted here.
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
ac:classIri
|
|
12
|
+
:gitlabGroupAccess a ac:AccessContract ;
|
|
13
|
+
ac:classIri :GitLabGroup ;
|
|
12
14
|
ac:sourceId "gitlab-api" ;
|
|
13
15
|
ac:entity "group" ;
|
|
14
16
|
ac:keyField "id" ;
|
|
@@ -22,11 +24,11 @@ gl:gitlabGroupAccess a ac:AccessContract ;
|
|
|
22
24
|
ac:freshnessSeconds 300 ;
|
|
23
25
|
ac:costHint "medium" .
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
ac:contract
|
|
27
|
+
:gitlabGroupWebUrlBinding a ac:PropertyBinding ;
|
|
28
|
+
ac:contract :gitlabGroupAccess ; ac:property :webUrl ; ac:field "web_url" .
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
ac:classIri
|
|
30
|
+
:projectAccess a ac:AccessContract ;
|
|
31
|
+
ac:classIri :Project ;
|
|
30
32
|
ac:sourceId "gitlab-api" ;
|
|
31
33
|
ac:entity "project" ;
|
|
32
34
|
ac:keyField "id" ;
|
|
@@ -40,11 +42,11 @@ gl:projectAccess a ac:AccessContract ;
|
|
|
40
42
|
ac:freshnessSeconds 300 ;
|
|
41
43
|
ac:costHint "low" .
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
ac:contract
|
|
45
|
+
:projectWebUrlBinding a ac:PropertyBinding ;
|
|
46
|
+
ac:contract :projectAccess ; ac:property :webUrl ; ac:field "web_url" .
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
ac:classIri
|
|
48
|
+
:mergeRequestAccess a ac:AccessContract ;
|
|
49
|
+
ac:classIri core:MergeRequest ;
|
|
48
50
|
ac:sourceId "gitlab-api" ;
|
|
49
51
|
ac:entity "merge_request" ;
|
|
50
52
|
ac:keyField "id" ;
|
|
@@ -58,17 +60,17 @@ gl:mergeRequestAccess a ac:AccessContract ;
|
|
|
58
60
|
ac:freshnessSeconds 60 ;
|
|
59
61
|
ac:costHint "medium" .
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
ac:contract
|
|
63
|
+
:mergeRequestIidBinding a ac:PropertyBinding ;
|
|
64
|
+
ac:contract :mergeRequestAccess ; ac:property :iid ; ac:field "iid" .
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
ac:contract
|
|
66
|
+
:mergeRequestStateBinding a ac:PropertyBinding ;
|
|
67
|
+
ac:contract :mergeRequestAccess ; ac:property core:state ; ac:field "state" .
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
ac:contract
|
|
69
|
+
:mergeRequestWebUrlBinding a ac:PropertyBinding ;
|
|
70
|
+
ac:contract :mergeRequestAccess ; ac:property :webUrl ; ac:field "web_url" .
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
ac:classIri
|
|
72
|
+
:pipelineAccess a ac:AccessContract ;
|
|
73
|
+
ac:classIri swarm:Pipeline ;
|
|
72
74
|
ac:sourceId "gitlab-api" ;
|
|
73
75
|
ac:entity "pipeline" ;
|
|
74
76
|
ac:keyField "id" ;
|
|
@@ -82,20 +84,20 @@ gl:pipelineAccess a ac:AccessContract ;
|
|
|
82
84
|
ac:freshnessSeconds 60 ;
|
|
83
85
|
ac:costHint "medium" .
|
|
84
86
|
|
|
85
|
-
|
|
86
|
-
ac:contract
|
|
87
|
+
:pipelineStatusBinding a ac:PropertyBinding ;
|
|
88
|
+
ac:contract :pipelineAccess ; ac:property core:pipelineStatus ; ac:field "status" .
|
|
87
89
|
|
|
88
|
-
|
|
89
|
-
ac:contract
|
|
90
|
+
:pipelineRefBinding a ac:PropertyBinding ;
|
|
91
|
+
ac:contract :pipelineAccess ; ac:property :ref ; ac:field "ref" .
|
|
90
92
|
|
|
91
|
-
|
|
92
|
-
ac:contract
|
|
93
|
+
:pipelineShaBinding a ac:PropertyBinding ;
|
|
94
|
+
ac:contract :pipelineAccess ; ac:property :sha ; ac:field "sha" .
|
|
93
95
|
|
|
94
|
-
|
|
95
|
-
ac:contract
|
|
96
|
+
:pipelineWebUrlBinding a ac:PropertyBinding ;
|
|
97
|
+
ac:contract :pipelineAccess ; ac:property :webUrl ; ac:field "web_url" .
|
|
96
98
|
|
|
97
|
-
|
|
98
|
-
ac:classIri
|
|
99
|
+
:pipelineRunAccess a ac:AccessContract ;
|
|
100
|
+
ac:classIri core:PipelineRun ;
|
|
99
101
|
ac:sourceId "gitlab-api" ;
|
|
100
102
|
ac:entity "pipeline" ;
|
|
101
103
|
ac:keyField "id" ;
|
|
@@ -109,8 +111,8 @@ gl:pipelineRunAccess a ac:AccessContract ;
|
|
|
109
111
|
ac:freshnessSeconds 60 ;
|
|
110
112
|
ac:costHint "medium" .
|
|
111
113
|
|
|
112
|
-
|
|
113
|
-
ac:classIri
|
|
114
|
+
:jobAccess a ac:AccessContract ;
|
|
115
|
+
ac:classIri core:Job ;
|
|
114
116
|
ac:sourceId "gitlab-api" ;
|
|
115
117
|
ac:entity "job" ;
|
|
116
118
|
ac:keyField "id" ;
|
|
@@ -124,17 +126,17 @@ gl:jobAccess a ac:AccessContract ;
|
|
|
124
126
|
ac:freshnessSeconds 60 ;
|
|
125
127
|
ac:costHint "medium" .
|
|
126
128
|
|
|
127
|
-
|
|
128
|
-
ac:contract
|
|
129
|
+
:jobStatusBinding a ac:PropertyBinding ;
|
|
130
|
+
ac:contract :jobAccess ; ac:property core:pipelineStatus ; ac:field "status" .
|
|
129
131
|
|
|
130
|
-
|
|
131
|
-
ac:contract
|
|
132
|
+
:jobRefBinding a ac:PropertyBinding ;
|
|
133
|
+
ac:contract :jobAccess ; ac:property :ref ; ac:field "ref" .
|
|
132
134
|
|
|
133
|
-
|
|
134
|
-
ac:contract
|
|
135
|
+
:jobWebUrlBinding a ac:PropertyBinding ;
|
|
136
|
+
ac:contract :jobAccess ; ac:property :webUrl ; ac:field "web_url" .
|
|
135
137
|
|
|
136
|
-
|
|
137
|
-
ac:classIri
|
|
138
|
+
:checkRunAccess a ac:AccessContract ;
|
|
139
|
+
ac:classIri :CheckRun ;
|
|
138
140
|
ac:sourceId "gitlab-api" ;
|
|
139
141
|
ac:entity "job" ;
|
|
140
142
|
ac:keyField "id" ;
|
|
@@ -148,8 +150,8 @@ gl:checkRunAccess a ac:AccessContract ;
|
|
|
148
150
|
ac:freshnessSeconds 60 ;
|
|
149
151
|
ac:costHint "medium" .
|
|
150
152
|
|
|
151
|
-
|
|
152
|
-
ac:classIri
|
|
153
|
+
:issueAccess a ac:AccessContract ;
|
|
154
|
+
ac:classIri core:Issue ;
|
|
153
155
|
ac:sourceId "gitlab-api" ;
|
|
154
156
|
ac:entity "issue" ;
|
|
155
157
|
ac:keyField "id" ;
|
|
@@ -163,17 +165,17 @@ gl:issueAccess a ac:AccessContract ;
|
|
|
163
165
|
ac:freshnessSeconds 60 ;
|
|
164
166
|
ac:costHint "medium" .
|
|
165
167
|
|
|
166
|
-
|
|
167
|
-
ac:contract
|
|
168
|
+
:issueIidBinding a ac:PropertyBinding ;
|
|
169
|
+
ac:contract :issueAccess ; ac:property :iid ; ac:field "iid" .
|
|
168
170
|
|
|
169
|
-
|
|
170
|
-
ac:contract
|
|
171
|
+
:issueStateBinding a ac:PropertyBinding ;
|
|
172
|
+
ac:contract :issueAccess ; ac:property core:state ; ac:field "state" .
|
|
171
173
|
|
|
172
|
-
|
|
173
|
-
ac:contract
|
|
174
|
+
:issueWebUrlBinding a ac:PropertyBinding ;
|
|
175
|
+
ac:contract :issueAccess ; ac:property :webUrl ; ac:field "web_url" .
|
|
174
176
|
|
|
175
|
-
|
|
176
|
-
ac:classIri
|
|
177
|
+
:epicAccess a ac:AccessContract ;
|
|
178
|
+
ac:classIri :Epic ;
|
|
177
179
|
ac:sourceId "gitlab-api" ;
|
|
178
180
|
ac:entity "epic" ;
|
|
179
181
|
ac:keyField "id" ;
|
|
@@ -187,14 +189,14 @@ gl:epicAccess a ac:AccessContract ;
|
|
|
187
189
|
ac:freshnessSeconds 300 ;
|
|
188
190
|
ac:costHint "medium" .
|
|
189
191
|
|
|
190
|
-
|
|
191
|
-
ac:contract
|
|
192
|
+
:epicIidBinding a ac:PropertyBinding ;
|
|
193
|
+
ac:contract :epicAccess ; ac:property :iid ; ac:field "iid" .
|
|
192
194
|
|
|
193
|
-
|
|
194
|
-
ac:contract
|
|
195
|
+
:epicWebUrlBinding a ac:PropertyBinding ;
|
|
196
|
+
ac:contract :epicAccess ; ac:property :webUrl ; ac:field "web_url" .
|
|
195
197
|
|
|
196
|
-
|
|
197
|
-
ac:classIri
|
|
198
|
+
:milestoneAccess a ac:AccessContract ;
|
|
199
|
+
ac:classIri core:Milestone ;
|
|
198
200
|
ac:sourceId "gitlab-api" ;
|
|
199
201
|
ac:entity "milestone" ;
|
|
200
202
|
ac:keyField "id" ;
|
|
@@ -208,14 +210,14 @@ gl:milestoneAccess a ac:AccessContract ;
|
|
|
208
210
|
ac:freshnessSeconds 300 ;
|
|
209
211
|
ac:costHint "medium" .
|
|
210
212
|
|
|
211
|
-
|
|
212
|
-
ac:contract
|
|
213
|
+
:milestoneStateBinding a ac:PropertyBinding ;
|
|
214
|
+
ac:contract :milestoneAccess ; ac:property core:state ; ac:field "state" .
|
|
213
215
|
|
|
214
|
-
|
|
215
|
-
ac:contract
|
|
216
|
+
:milestoneWebUrlBinding a ac:PropertyBinding ;
|
|
217
|
+
ac:contract :milestoneAccess ; ac:property :webUrl ; ac:field "web_url" .
|
|
216
218
|
|
|
217
|
-
|
|
218
|
-
ac:classIri
|
|
219
|
+
:commitAccess a ac:AccessContract ;
|
|
220
|
+
ac:classIri core:Commit ;
|
|
219
221
|
ac:sourceId "gitlab-api" ;
|
|
220
222
|
ac:entity "commit" ;
|
|
221
223
|
ac:keyField "id" ;
|
|
@@ -229,14 +231,14 @@ gl:commitAccess a ac:AccessContract ;
|
|
|
229
231
|
ac:freshnessSeconds 60 ;
|
|
230
232
|
ac:costHint "medium" .
|
|
231
233
|
|
|
232
|
-
|
|
233
|
-
ac:contract
|
|
234
|
+
:commitShaBinding a ac:PropertyBinding ;
|
|
235
|
+
ac:contract :commitAccess ; ac:property :sha ; ac:field "sha" .
|
|
234
236
|
|
|
235
|
-
|
|
236
|
-
ac:contract
|
|
237
|
+
:commitWebUrlBinding a ac:PropertyBinding ;
|
|
238
|
+
ac:contract :commitAccess ; ac:property :webUrl ; ac:field "web_url" .
|
|
237
239
|
|
|
238
|
-
|
|
239
|
-
ac:classIri
|
|
240
|
+
:branchAccess a ac:AccessContract ;
|
|
241
|
+
ac:classIri core:Branch ;
|
|
240
242
|
ac:sourceId "gitlab-api" ;
|
|
241
243
|
ac:entity "branch" ;
|
|
242
244
|
ac:keyField "name" ;
|
|
@@ -250,11 +252,11 @@ gl:branchAccess a ac:AccessContract ;
|
|
|
250
252
|
ac:freshnessSeconds 300 ;
|
|
251
253
|
ac:costHint "low" .
|
|
252
254
|
|
|
253
|
-
|
|
254
|
-
ac:contract
|
|
255
|
+
:branchWebUrlBinding a ac:PropertyBinding ;
|
|
256
|
+
ac:contract :branchAccess ; ac:property :webUrl ; ac:field "web_url" .
|
|
255
257
|
|
|
256
|
-
|
|
257
|
-
ac:classIri
|
|
258
|
+
:releaseAccess a ac:AccessContract ;
|
|
259
|
+
ac:classIri core:Release ;
|
|
258
260
|
ac:sourceId "gitlab-api" ;
|
|
259
261
|
ac:entity "release" ;
|
|
260
262
|
ac:keyField "tag_name" ;
|
|
@@ -268,8 +270,8 @@ gl:releaseAccess a ac:AccessContract ;
|
|
|
268
270
|
ac:freshnessSeconds 300 ;
|
|
269
271
|
ac:costHint "medium" .
|
|
270
272
|
|
|
271
|
-
|
|
272
|
-
ac:classIri
|
|
273
|
+
:runnerAccess a ac:AccessContract ;
|
|
274
|
+
ac:classIri core:Runner ;
|
|
273
275
|
ac:sourceId "gitlab-api" ;
|
|
274
276
|
ac:entity "runner" ;
|
|
275
277
|
ac:keyField "id" ;
|
|
@@ -283,5 +285,5 @@ gl:runnerAccess a ac:AccessContract ;
|
|
|
283
285
|
ac:freshnessSeconds 300 ;
|
|
284
286
|
ac:costHint "medium" .
|
|
285
287
|
|
|
286
|
-
|
|
287
|
-
ac:contract
|
|
288
|
+
:runnerStateBinding a ac:PropertyBinding ;
|
|
289
|
+
ac:contract :runnerAccess ; ac:property core:state ; ac:field "status" .
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"api_version": "graphos.io/v1",
|
|
3
3
|
"artifacts": {
|
|
4
4
|
"gitlab_api/ontology/fixtures/records.json": "5f0417820053941933f15b3f459750753f4e8e34cf1e7853fd030c1143356b40",
|
|
5
|
-
"gitlab_api/ontology/gitlab.ttl": "
|
|
5
|
+
"gitlab_api/ontology/gitlab.ttl": "7311a57ea9ee8944fdb4aebd937fc71f0652938bb1ca3944ba1aeeb30974d06d",
|
|
6
6
|
"gitlab_api/ontology/mappings/source.yaml": "4d845dd7df9503ae3a5d133ff00a98191d11adf3af7f6868f45c22bcbf098bb5",
|
|
7
7
|
"gitlab_api/ontology/migrations/manifest.json": "442c3c53df0b42c866eef7255b1889b8ada6f9f9c5125cad65d6b50dc6362a3e",
|
|
8
|
-
"gitlab_api/ontology/shapes/connector.shacl.ttl": "
|
|
8
|
+
"gitlab_api/ontology/shapes/connector.shacl.ttl": "1218f4272d0e52b725be1ad7360474e09f8fcf4a8d5b27ac0e54fcd1de56f49a"
|
|
9
9
|
},
|
|
10
10
|
"checks": {
|
|
11
11
|
"declared_tool_schema": "passed",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"signer": "UNSIGNED-PREVIEW",
|
|
30
30
|
"signing_public_key": "",
|
|
31
31
|
"status": "source-validated",
|
|
32
|
-
"validated_at": "2026-
|
|
32
|
+
"validated_at": "2026-12-03T19:34:11Z"
|
|
33
33
|
}
|