Skip to content

Commit b3906c4

Browse files
committed
Resolve merge conflict in README.md by merging Docker and token permission instructions
2 parents 57c8c75 + 22d080b commit b3906c4

35 files changed

+3100
-822
lines changed

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.github
2+
.vscode
3+
script
4+
third-party
5+
.dockerignore
6+
.gitignore
7+
**/*.yml
8+
**/*.yaml
9+
**/*.md
10+
**/*_test.go
11+
LICENSE

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @juruen @sammorrowdrums @williammartin @toby
1+
* @github/github-mcp-server

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
go mod verify
2525
go mod download
2626
27-
LINT_VERSION=1.64.8
27+
LINT_VERSION=2.1.6
2828
curl -fsSL https://github.com/golangci/golangci-lint/releases/download/v${LINT_VERSION}/golangci-lint-${LINT_VERSION}-linux-amd64.tar.gz | \
2929
tar xz --strip-components 1 --wildcards \*/golangci-lint
3030
mkdir -p bin && mv golangci-lint bin/
@@ -45,6 +45,6 @@ jobs:
4545
assert-nothing-changed go fmt ./...
4646
assert-nothing-changed go mod tidy
4747
48-
bin/golangci-lint run --out-format=colored-line-number --timeout=3m || STATUS=$?
48+
bin/golangci-lint run --timeout=3m || STATUS=$?
4949
5050
exit $STATUS

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
.idea
22
cmd/github-mcp-server/github-mcp-server
3+
4+
# VSCode
5+
.vscode/*
6+
!.vscode/launch.json
7+
38
# Added by goreleaser init:
49
dist/
5-
__debug_bin*
10+
__debug_bin*
11+
12+
# Go
13+
vendor

.golangci.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# https://golangci-lint.run/usage/configuration
2+
version: "2"
3+
14
run:
25
timeout: 5m
36
tests: true
@@ -8,21 +11,37 @@ linters:
811
- govet
912
- errcheck
1013
- staticcheck
11-
- gofmt
12-
- goimports
1314
- revive
1415
- ineffassign
15-
- typecheck
1616
- unused
17-
- gosimple
1817
- misspell
1918
- nakedret
2019
- bodyclose
2120
- gocritic
2221
- makezero
2322
- gosec
23+
settings:
24+
staticcheck:
25+
checks:
26+
- all
27+
- '-QF1008' # Allow embedded structs to be referenced by field
28+
- '-ST1000' # Do not require package comments
29+
revive:
30+
rules:
31+
- name: exported
32+
disabled: true
33+
- name: exported
34+
disabled: true
35+
- name: package-comments
36+
disabled: true
37+
38+
formatters:
39+
enable:
40+
- gofmt
41+
- goimports
2442

2543
output:
26-
formats: colored-line-number
27-
print-issued-lines: true
28-
print-linter-name: true
44+
formats:
45+
text:
46+
print-linter-name: true
47+
print-issued-lines: true

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Please note that this project is released with a [Contributor Code of Conduct](C
1515
These are one time installations required to be able to test your changes locally as part of the pull request (PR) submission process.
1616

1717
1. install Go [through download](https://go.dev/doc/install) | [through Homebrew](https://formulae.brew.sh/formula/go)
18-
1. [install golangci-lint](https://golangci-lint.run/welcome/install/#local-installation)
18+
1. [install golangci-lint v2](https://golangci-lint.run/welcome/install/#local-installation)
1919

2020
## Submitting a pull request
2121

Dockerfile

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1+
FROM golang:1.24.3-alpine AS build
12
ARG VERSION="dev"
23

3-
FROM golang:1.23.7 AS build
4-
# allow this step access to build arg
5-
ARG VERSION
64
# Set the working directory
75
WORKDIR /build
86

9-
RUN go env -w GOMODCACHE=/root/.cache/go-build
7+
# Install git
8+
RUN --mount=type=cache,target=/var/cache/apk \
9+
apk add git
1010

11-
# Install dependencies
12-
COPY go.mod go.sum ./
13-
RUN --mount=type=cache,target=/root/.cache/go-build go mod download
14-
15-
COPY . ./
1611
# Build the server
17-
RUN --mount=type=cache,target=/root/.cache/go-build 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)" \
18-
-o github-mcp-server cmd/github-mcp-server/main.go
12+
# go build automatically download required module dependencies to /go/pkg/mod
13+
RUN --mount=type=cache,target=/go/pkg/mod \
14+
--mount=type=cache,target=/root/.cache/go-build \
15+
--mount=type=bind,target=. \
16+
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)" \
17+
-o /bin/github-mcp-server cmd/github-mcp-server/main.go
1918

2019
# Make a stage to run the app
2120
FROM gcr.io/distroless/base-debian12
2221
# Set the working directory
2322
WORKDIR /server
2423
# Copy the binary from the build stage
25-
COPY --from=build /build/github-mcp-server .
24+
COPY --from=build /bin/github-mcp-server .
2625
# Command to run the server
2726
CMD ["./github-mcp-server", "stdio"]

0 commit comments

Comments
 (0)