Skip to content

Commit 2c10588

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/sub-issues
2 parents 15f8c9f + be91795 commit 2c10588

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+2999
-720
lines changed

.github/workflows/docs-check.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Documentation Check
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
docs-check:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version-file: 'go.mod'
23+
24+
- name: Build docs generator
25+
run: go build -o github-mcp-server ./cmd/github-mcp-server
26+
27+
- name: Generate documentation
28+
run: ./github-mcp-server generate-docs
29+
30+
- name: Check for documentation changes
31+
run: |
32+
if ! git diff --exit-code README.md; then
33+
echo "❌ Documentation is out of date!"
34+
echo ""
35+
echo "The generated documentation differs from what's committed."
36+
echo "Please run the following command to update the documentation:"
37+
echo ""
38+
echo " go run ./cmd/github-mcp-server generate-docs"
39+
echo ""
40+
echo "Then commit the changes."
41+
echo ""
42+
echo "Changes detected:"
43+
git diff README.md
44+
exit 1
45+
else
46+
echo "✅ Documentation is up to date!"
47+
fi

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Unit Tests
1+
name: Build and Test Go Project
22
on: [push, pull_request]
33

44
permissions:
@@ -26,7 +26,7 @@ jobs:
2626
run: go mod download
2727

2828
- name: Run unit tests
29-
run: go test -race ./...
29+
run: script/test
3030

3131
- name: Build
3232
run: go build -v ./cmd/github-mcp-server

.github/workflows/lint.yaml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
golangci:
13+
name: lint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-go@v5
18+
with:
19+
go-version: stable
20+
- name: golangci-lint
21+
uses: golangci/golangci-lint-action@v8
22+
with:
23+
version: v2.1

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ __debug_bin*
1111

1212
# Go
1313
vendor
14+
bin/
15+
16+
# macOS
17+
.DS_Store

.golangci.yml

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,37 @@
1-
# https://golangci-lint.run/usage/configuration
21
version: "2"
3-
42
run:
5-
timeout: 5m
6-
tests: true
73
concurrency: 4
8-
4+
tests: true
95
linters:
106
enable:
11-
- govet
12-
- errcheck
13-
- staticcheck
14-
- revive
15-
- ineffassign
16-
- unused
17-
- misspell
18-
- nakedret
197
- bodyclose
208
- gocritic
21-
- makezero
229
- gosec
10+
- makezero
11+
- misspell
12+
- nakedret
13+
- revive
14+
exclusions:
15+
generated: lax
16+
presets:
17+
- comments
18+
- common-false-positives
19+
- legacy
20+
- std-error-handling
21+
paths:
22+
- third_party$
23+
- builtin$
24+
- examples$
2325
settings:
2426
staticcheck:
2527
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-
28+
- "all"
29+
- -QF1008
30+
- -ST1000
3831
formatters:
39-
enable:
40-
- gofmt
41-
- goimports
42-
43-
output:
44-
formats:
45-
text:
46-
print-linter-name: true
47-
print-issued-lines: true
32+
exclusions:
33+
generated: lax
34+
paths:
35+
- third_party$
36+
- builtin$
37+
- examples$

CONTRIBUTING.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,21 @@ Please note that this project is released with a [Contributor Code of Conduct](C
1414

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

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

2020
## Submitting a pull request
2121

22-
> **Important**: Please open your pull request against the `next` branch, not `main`. The `next` branch is where we integrate new features and changes before they are merged to `main`.
23-
2422
1. [Fork][fork] and clone the repository
25-
1. Make sure the tests pass on your machine: `go test -v ./...`
26-
1. Make sure linter passes on your machine: `golangci-lint run`
27-
1. Create a new branch: `git checkout -b my-branch-name`
28-
1. Make your change, add tests, and make sure the tests and linter still pass
29-
1. Push to your fork and [submit a pull request][pr] targeting the `next` branch
30-
1. Pat yourself on the back and wait for your pull request to be reviewed and merged.
23+
2. Make sure the tests pass on your machine: `go test -v ./...`
24+
3. Make sure linter passes on your machine: `golangci-lint run`
25+
4. Create a new branch: `git checkout -b my-branch-name`
26+
5. Add your changes and tests, and make sure the Action workflows still pass
27+
- Run linter: `script/lint`
28+
- Update snapshots and run tests: `UPDATE_TOOLSNAPS=true go test ./...`
29+
- Update readme documentation: `script/generate-docs`
30+
6. Push to your fork and [submit a pull request][pr] targeting the `main` branch
31+
7. Pat yourself on the back and wait for your pull request to be reviewed and merged.
3132

3233
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
3334

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy