0.14 - attempt update comment
CICD / Explore-Gitea-Actions (push) Successful in 41s Details

This commit is contained in:
Isaac Johnson 2025-10-13 06:32:59 -05:00
parent 3f081c5776
commit c123df9b15
3 changed files with 33 additions and 4 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.13 #harbor.freshbrewed.science/library/vikunjamcp:0.14

View File

@ -1,6 +1,6 @@
{ {
"name": "vikunja", "name": "vikunja",
"version": "1.0.13", "version": "1.0.14",
"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.13" "harbor.freshbrewed.science/library/vikunjamcp:0.14"
], ],
"env": { "env": {
"VIKUNJA_URL": "$VIKUNJA_URL", "VIKUNJA_URL": "$VIKUNJA_URL",

29
main.py
View File

@ -187,6 +187,35 @@ def comment_task(task_id: int, description: str):
logger.exception("comment_task: request failed for task_id=%s", task_id) logger.exception("comment_task: request failed for task_id=%s", task_id)
return f"Error adding comment to task: {e}" return f"Error adding comment to task: {e}"
@mcp.tool()
def update_comment(task_id: int, comment_id: int, comment: str):
"""
Updates an existing comment on a task.
:param task_id: The ID of the task.
:param comment_id: The ID of the comment to update.
:param comment: The updated comment text.
"""
if "Authorization" not in session.headers:
return "Please run the 'login' command first."
if not (comment or "").strip():
return "Comment cannot be empty."
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}"
@mcp.tool() @mcp.tool()
def lookup_project(): def lookup_project():
""" """