0.15 - fix indentation
CICD / Explore-Gitea-Actions (push) Successful in 37s Details

This commit is contained in:
Isaac Johnson 2025-10-13 06:45:05 -05:00
parent c123df9b15
commit ab97ce1a0b
3 changed files with 27 additions and 26 deletions

View File

@ -20,4 +20,4 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY . . COPY . .
CMD ["python", "main.py"] CMD ["python", "main.py"]
#harbor.freshbrewed.science/library/vikunjamcp:0.14 #harbor.freshbrewed.science/library/vikunjamcp:0.15

View File

@ -1,6 +1,6 @@
{ {
"name": "vikunja", "name": "vikunja",
"version": "1.0.14", "version": "1.0.15",
"mcpServers": { "mcpServers": {
"nodeServer": { "nodeServer": {
"command": "docker", "command": "docker",
@ -14,7 +14,7 @@
"VIKUNJA_USERNAME", "VIKUNJA_USERNAME",
"-e", "-e",
"VIKUNJA_PASSWORD", "VIKUNJA_PASSWORD",
"harbor.freshbrewed.science/library/vikunjamcp:0.14" "harbor.freshbrewed.science/library/vikunjamcp:0.15"
], ],
"env": { "env": {
"VIKUNJA_URL": "$VIKUNJA_URL", "VIKUNJA_URL": "$VIKUNJA_URL",

47
main.py
View File

@ -189,33 +189,34 @@ def comment_task(task_id: int, description: str):
@mcp.tool() @mcp.tool()
def update_comment(task_id: int, comment_id: int, comment: str): def update_comment(task_id: int, comment_id: int, comment: str):
""" """
Updates an existing comment on a task. Updates an existing comment on a task.
:param task_id: The ID of the task. :param task_id: The ID of the task.
:param comment_id: The ID of the comment to update. :param comment_id: The ID of the comment to update.
:param comment: The updated comment text. :param comment: The updated comment text.
""" """
if "Authorization" not in session.headers: if "Authorization" not in session.headers:
return "Please run the 'login' command first." return "Please run the 'login' command first."
if not (comment or "").strip(): if not (comment or "").strip():
return "Comment cannot be empty." return "Comment cannot be empty."
payload = {"comment": comment} payload = {"comment": comment}
try:
response = session.post(
f"{VIKUNJA_URL}/api/v1/tasks/{task_id}/comments/{comment_id}",
json=payload
)
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
logger.exception("update_comment: request failed for task_id=%s, comment_id=%s", task_id, comment_id)
return f"Error updating comment for task: {e}"
try:
response = session.post(
f"{VIKUNJA_URL}/api/v1/tasks/{task_id}/comments/{comment_id}",
json=payload
)
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
logger.exception("update_comment: request failed for task_id=%s, comment_id=%s", task_id, comment_id)
return f"Error updating comment for task: {e}"
@mcp.tool() @mcp.tool()
def lookup_project(): def lookup_project():
""" """