Skip to content

Commit 0cbbce0

Browse files
committed
Bump version: 25.15.17 → 25.15.18
1 parent 9dcd3ae commit 0cbbce0

File tree

12 files changed

+618
-407
lines changed

12 files changed

+618
-407
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 25.15.17
2+
current_version = 25.15.18
33
commit = True
44
tag = True
55

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ ENV HOST=${HOST} \
5454
RUN apt-get update \
5555
&& apt-get install -y ripgrep tree fd-find curl nano \
5656
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
57-
&& uv pip install --system --upgrade --verbose --no-cache --break-system-packages --prerelease=allow gitlab-api[all]>=25.15.17
57+
&& uv pip install --system --upgrade --verbose --no-cache --break-system-packages --prerelease=allow gitlab-api[all]>=25.15.18
5858

5959
CMD ["gitlab-mcp"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
![PyPI - Wheel](https://img.shields.io/pypi/wheel/gitlab-api)
2222
![PyPI - Implementation](https://img.shields.io/pypi/implementation/gitlab-api)
2323

24-
*Version: 25.15.17*
24+
*Version: 25.15.18*
2525

2626
## Overview
2727

gitlab_api/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"gitlab_api.gitlab_input_models",
1010
"gitlab_api.gitlab_response_models",
1111
"gitlab_api.gitlab_api",
12-
"gitlab_api.utils",
1312
]
1413

1514
OPTIONAL_MODULES = {

gitlab_api/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from agent_utilities.agent_utilities import create_agent_parser, get_mcp_config_path
1313
from agent_utilities.base_utilities import to_integer, to_boolean
1414

15-
__version__ = "25.15.17"
15+
__version__ = "25.15.18"
1616

1717
logging.basicConfig(
1818
level=logging.INFO,

gitlab_api/agent/CRON_LOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# CRON_LOG.md - Periodic Task Output Log
2+
Last updated: 2026-02-25 22:25
3+
4+
This file stores the output of periodic/cron tasks.
5+
The agent can read this to review what background tasks have done.
6+
Old entries are automatically pruned to keep only the most recent results.
7+
8+
---

gitlab_api/agent/IDENTITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
You are the GitLab Commits Agent.
4545
You handle commit retrieval, diff analysis, and repository history.
4646

47-
## [merge_requests]
47+
## [merge-requests]
4848
* **Name:** GitLab MR Agent
4949
* **Role:** Manage Merge Requests and code reviews.
5050
* **Emoji:** 🔀
@@ -76,7 +76,7 @@
7676
You are the GitLab Environments Agent.
7777
You handle environment configuration, deployments, and release management.
7878

79-
## [custom_api]
79+
## [custom-api]
8080
* **Name:** GitLab Custom API Agent
8181
* **Role:** Handle specialized GitLab API calls.
8282
* **Emoji:** 🛠️

gitlab_api/agent/mcp_config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"mcpServers": {}
3+
}

gitlab_api/gitlab_input_models.py

Lines changed: 70 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
from agent_utilities.exceptions import (
1717
ParameterError,
18-
MissingParameterError,
1918
)
2019

2120

@@ -44,6 +43,16 @@ class BranchModel(BaseModel):
4443
page: Optional[int] = Field(description="Pagination page", default=1)
4544
per_page: Optional[int] = Field(description="Results per page", default=100)
4645

46+
@field_validator("project_id")
47+
def validate_project_id(cls, v):
48+
"""
49+
Validate project_id.
50+
Strips quotes and converts to string.
51+
"""
52+
if v is None:
53+
return v
54+
return str(v).strip("'\"")
55+
4756
def model_post_init(self, __context):
4857
"""
4958
Build the API parameters
@@ -144,6 +153,16 @@ class CommitModel(BaseModel):
144153
page: Optional[int] = Field(description="Pagination page", default=1)
145154
per_page: Optional[int] = Field(description="Results per page", default=100)
146155

156+
@field_validator("project_id", "pipeline_id", "start_project")
157+
def validate_ids(cls, v):
158+
"""
159+
Validate ID fields.
160+
Strips quotes and converts to string.
161+
"""
162+
if v is None:
163+
return v
164+
return str(v).strip("'\"")
165+
147166
def model_post_init(self, __context):
148167
"""
149168
Build the API parameters
@@ -419,20 +438,14 @@ def model_post_init(self, __context):
419438
def validate_project_id(cls, v):
420439
if not v:
421440
raise ValueError("Project ID or path cannot be empty")
422-
return str(v)
441+
return str(v).strip("'\"")
423442

424443
@field_validator("tag")
425444
def validate_tag(cls, v):
426445
if v and not v.strip():
427446
raise ValueError("Tag name cannot be empty or whitespace")
428447
return v
429448

430-
@field_validator("ref")
431-
def validate_ref(cls, v):
432-
if v and not v.strip():
433-
raise ValueError("Ref cannot be empty or whitespace")
434-
return v
435-
436449

437450
class PipelineScheduleModel(BaseModel):
438451
project_id: Union[int, str] = Field(..., description="Project ID or full path")
@@ -481,7 +494,7 @@ class IssueModel(BaseModel):
481494
def validate_project_id(cls, v):
482495
if not v:
483496
raise ValueError("Project ID or path cannot be empty")
484-
return str(v)
497+
return str(v).strip("'\"")
485498

486499
@field_validator("title")
487500
def validate_title(cls, v):
@@ -497,9 +510,9 @@ def validate_state(cls, v):
497510

498511
@field_validator("issue_iid")
499512
def validate_issue_iid(cls, v):
500-
if v is not None and v <= 0:
501-
raise ValueError("Issue IID must be a positive integer")
502-
return v
513+
if v is None:
514+
return v
515+
return str(v).strip("'\"")
503516

504517

505518
class DeployTokenModel(BaseModel):
@@ -565,24 +578,12 @@ def validate_expires_at(cls, v):
565578
@field_validator("project_id", "group_id", "token")
566579
def validate_optional_parameters(cls, v, values):
567580
"""
568-
Validate optional parameters to ensure they are provided only when 'project_id' or 'group_id' is provided.
569-
570-
Args:
571-
- v: The value of the parameter.
572-
- values: Dictionary of all values.
573-
574-
Returns:
575-
- Any: The validated parameter value.
576-
577-
Raises:
578-
- MissingParameterError: If the parameter is provided and 'project_id' and 'group_id' are None.
581+
Validate optional parameters.
582+
Strips quotes and converts to string.
579583
"""
580-
if (
581-
"project_id" in values.lower() or "group_id" in values.lower()
582-
) and v is not None:
583-
return v.lower()
584-
else:
585-
raise MissingParameterError
584+
if v is None:
585+
return v
586+
return str(v).strip("'\"")
586587

587588
@field_validator("name", "username", "scopes")
588589
def validate_string_parameters(cls, v):
@@ -873,23 +874,15 @@ def validate_visibility(cls, value):
873874
raise ValueError("Invalid visibility")
874875
return value.lower()
875876

876-
@field_validator("group_id")
877-
def validate_group_id(cls, v):
877+
@field_validator("group_id", "file_template_project_id")
878+
def validate_ids(cls, v):
878879
"""
879-
Validate the 'group_id' parameter to ensure it is provided.
880-
881-
Args:
882-
- v: The value of 'group_id'.
883-
884-
Returns:
885-
- Union[int, str]: The validated 'group_id' value.
886-
887-
Raises:
888-
- MissingParameterError: If 'group_id' is None.
880+
Validate ID fields.
881+
Strips quotes and converts to string.
889882
"""
890883
if v is None:
891-
raise MissingParameterError
892-
return v
884+
return v
885+
return str(v).strip("'\"")
893886

894887
def model_post_init(self, __context):
895888
"""
@@ -942,6 +935,16 @@ class JobModel(BaseModel):
942935
job_variable_attributes: Optional[Dict] = None
943936
api_parameters: Optional[Dict] = Field(description="API Parameters", default=None)
944937

938+
@field_validator("project_id", "pipeline_id", "job_id")
939+
def validate_ids(cls, v):
940+
"""
941+
Validate ID fields.
942+
Strips quotes and converts to string.
943+
"""
944+
if v is None:
945+
return v
946+
return str(v).strip("'\"")
947+
945948
@field_validator("per_page", "page")
946949
def validate_positive_integer(cls, v):
947950
"""
@@ -1071,6 +1074,16 @@ class MembersModel(BaseModel):
10711074
page: Optional[int] = Field(description="Pagination page", default=1)
10721075
api_parameters: Optional[Dict] = Field(description="API Parameters", default=None)
10731076

1077+
@field_validator("project_id", "group_id")
1078+
def validate_ids(cls, v):
1079+
"""
1080+
Validate ID fields.
1081+
Strips quotes and converts to string.
1082+
"""
1083+
if v is None:
1084+
return v
1085+
return str(v).strip("'\"")
1086+
10741087
@field_validator("per_page", "page")
10751088
def validate_positive_integer(cls, v):
10761089
"""
@@ -1469,28 +1482,22 @@ def validate_boolean(cls, v):
14691482
raise ParameterError
14701483
return v
14711484

1472-
@field_validator("assignee_id", "milestone_id", "target_project_id")
1473-
def validate_positive_integer(cls, v):
1485+
@field_validator(
1486+
"assignee_id",
1487+
"milestone_id",
1488+
"target_project_id",
1489+
"project_id",
1490+
"author_id",
1491+
"reviewer_id",
1492+
)
1493+
def validate_ids(cls, v):
14741494
"""
1475-
Validate positive integer fields.
1476-
1477-
Args:
1478-
- v: The value of the positive integer field.
1479-
1480-
Returns:
1481-
- The validated value if valid.
1482-
1483-
Raises:
1484-
- ParameterError: If 'v' is not a valid positive integer.
1495+
Validate ID fields.
1496+
Strips quotes and converts to string.
14851497
"""
1486-
if isinstance(v, str):
1487-
try:
1488-
v = int(v)
1489-
except Exception as e:
1490-
raise e
1491-
if not isinstance(v, int) or v < 0:
1492-
raise ParameterError
1493-
return v
1498+
if v is None:
1499+
return v
1500+
return str(v).strip("'\"")
14941501

14951502
@field_validator("assignee_ids", "reviewer_ids")
14961503
def validate_list_of_integers(cls, v):

0 commit comments

Comments
 (0)