Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ on:
branches: ["main", "next"]
workflow_dispatch:
inputs:
description:
required: false
description: "Description of the run."
type: string
default: "Manual run"
description:
required: false
description: "Description of the run."
type: string
default: "Manual run"

env:
# Use docker.io for Docker Hub if empty
Expand Down Expand Up @@ -112,6 +112,7 @@ jobs:
platforms: linux/amd64,linux/arm64
build-args: |
VERSION=${{ github.ref_name }}
COMMIT=${{ github.sha }}

# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
Expand All @@ -127,4 +128,3 @@ jobs:
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
FROM golang:1.25.4-alpine AS build
ARG VERSION="dev"
ARG COMMIT="unknown"

# Set the working directory
WORKDIR /build

# Install git
RUN --mount=type=cache,target=/var/cache/apk \
apk add git

# Build the server
# go build automatically download required module dependencies to /go/pkg/mod
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
--mount=type=bind,target=. \
CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=${VERSION} -X main.commit=$(git rev-parse HEAD) -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=${VERSION} -X main.commit=${COMMIT} -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
-o /bin/github-mcp-server cmd/github-mcp-server/main.go

# Make a stage to run the app
Expand Down
38 changes: 38 additions & 0 deletions pkg/github/__toolsnaps__/add_discussion_comment.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"annotations": {
"title": "Add discussion comment"
},
"description": "Add a comment to a discussion.",
"inputSchema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Comment body (Markdown)"
},
"discussionNumber": {
"type": "number",
"description": "Discussion Number"
},
"owner": {
"type": "string",
"description": "Repository owner"
},
"reply_to_id": {
"type": "string",
"description": "Optional discussion comment node ID to reply to."
},
"repo": {
"type": "string",
"description": "Repository name"
}
},
"required": [
"owner",
"repo",
"discussionNumber",
"body"
]
},
"name": "add_discussion_comment"
}
42 changes: 42 additions & 0 deletions pkg/github/__toolsnaps__/create_discussion.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"annotations": {
"title": "Create discussion"
},
"description": "Create a new discussion in a repository.",
"inputSchema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Discussion body (Markdown)"
},
"category_id": {
"type": "string",
"description": "Discussion category node ID. If provided, this is used directly."
},
"category_name": {
"type": "string",
"description": "Discussion category name. If provided, it will be resolved to a category ID."
},
"owner": {
"type": "string",
"description": "Repository owner"
},
"repo": {
"type": "string",
"description": "Repository name"
},
"title": {
"type": "string",
"description": "Discussion title"
}
},
"required": [
"owner",
"repo",
"title",
"body"
]
},
"name": "create_discussion"
}
19 changes: 19 additions & 0 deletions pkg/github/__toolsnaps__/delete_discussion_comment.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"annotations": {
"title": "Delete discussion comment"
},
"description": "Delete an existing discussion comment.",
"inputSchema": {
"type": "object",
"properties": {
"comment_id": {
"type": "string",
"description": "Discussion comment node ID"
}
},
"required": [
"comment_id"
]
},
"name": "delete_discussion_comment"
}
45 changes: 45 additions & 0 deletions pkg/github/__toolsnaps__/update_discussion.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"annotations": {
"title": "Update discussion"
},
"description": "Update a discussion (title/body/category) in a repository.",
"inputSchema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "New discussion body (optional)"
},
"category_id": {
"type": "string",
"description": "New discussion category node ID (optional). If provided, this is used directly."
},
"category_name": {
"type": "string",
"description": "New discussion category name (optional). If provided, it will be resolved to a category ID."
},
"discussionNumber": {
"type": "number",
"description": "Discussion Number"
},
"owner": {
"type": "string",
"description": "Repository owner"
},
"repo": {
"type": "string",
"description": "Repository name"
},
"title": {
"type": "string",
"description": "New discussion title (optional)"
}
},
"required": [
"owner",
"repo",
"discussionNumber"
]
},
"name": "update_discussion"
}
24 changes: 24 additions & 0 deletions pkg/github/__toolsnaps__/update_discussion_comment.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"annotations": {
"title": "Update discussion comment"
},
"description": "Update an existing discussion comment.",
"inputSchema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "New comment body (Markdown)"
},
"comment_id": {
"type": "string",
"description": "Discussion comment node ID"
}
},
"required": [
"comment_id",
"body"
]
},
"name": "update_discussion_comment"
}
Loading