Compare commits

...

3 Commits

Author SHA1 Message Date
f60d68af2c [pr-66] fix: make old_line and new_line optional for image diff discussions
🐛 Bug Fix:
- Image files in GitLab MR discussions use x/y coordinates instead of line numbers
- Fixed schema validation error when fetching discussions on image files

📝 Details:
- Changed old_line and new_line from required to optional in GitLabDiscussionNoteSchema
- Allows proper handling of image diff comments that use position_type: 'image'
2025-05-30 12:37:16 +09:00
3ce688b55c Merge pull request #65 from zereight/feat/ci_push_docker_hub
FEAT: ci push docker hub
2025-05-30 09:27:07 +09:00
74af27f995 FEAT: ci push docker hub 2025-05-30 01:51:07 +09:00
4 changed files with 53 additions and 6 deletions

38
.github/workflows/docker-publish.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Docker Publish
on:
release:
types: [published]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/gitlab-mcp
tags: |
type=semver,pattern={{version}}
latest
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}

3
.secrets Normal file
View File

@ -0,0 +1,3 @@
DOCKERHUB_USERNAME=DOCKERHUB_USERNAME
DOCKERHUB_TOKEN=DOCKERHUB_TOKEN
GITHUB_TOKEN=DOCKERHUB_TOKEN

6
event.json Normal file
View File

@ -0,0 +1,6 @@
{
"action": "published",
"release": {
"tag_name": "v1.0.52"
}
}

View File

@ -618,21 +618,21 @@ export const GitLabDiscussionNoteSchema = z.object({
old_path: z.string(), old_path: z.string(),
new_path: z.string(), new_path: z.string(),
position_type: z.enum(["text", "image", "file"]), position_type: z.enum(["text", "image", "file"]),
old_line: z.number().nullable(), old_line: z.number().nullish(), // This is missing for image diffs
new_line: z.number().nullable(), new_line: z.number().nullish(), // This is missing for image diffs
line_range: z line_range: z
.object({ .object({
start: z.object({ start: z.object({
line_code: z.string(), line_code: z.string(),
type: z.enum(["new", "old", "expanded"]), type: z.enum(["new", "old", "expanded"]),
old_line: z.number().nullable(), old_line: z.number().nullish(), // This is missing for image diffs
new_line: z.number().nullable(), new_line: z.number().nullish(), // This is missing for image diffs
}), }),
end: z.object({ end: z.object({
line_code: z.string(), line_code: z.string(),
type: z.enum(["new", "old", "expanded"]), type: z.enum(["new", "old", "expanded"]),
old_line: z.number().nullable(), old_line: z.number().nullish(), // This is missing for image diffs
new_line: z.number().nullable(), new_line: z.number().nullish(), // This is missing for image diffs
}), }),
}) })
.nullable() .nullable()