Skip to content

Commit 5700af1

Browse files
authored
Merge branch 'main' into pullrequestreviewline
2 parents 72d4995 + e6b73f7 commit 5700af1

File tree

3 files changed

+86
-4
lines changed

3 files changed

+86
-4
lines changed

.github/workflows/code-scanning.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: "CodeQL"
2+
run-name: ${{ github.event.inputs.code_scanning_run_name }}
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
env:
10+
CODE_SCANNING_REF: ${{ github.event.inputs.code_scanning_ref }}
11+
CODE_SCANNING_BASE_BRANCH: ${{ github.event.inputs.code_scanning_base_branch }}
12+
CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH: ${{ github.event.inputs.code_scanning_is_analyzing_default_branch }}
13+
14+
jobs:
15+
analyze:
16+
name: Analyze (${{ matrix.language }})
17+
runs-on: ${{ fromJSON(matrix.runner) }}
18+
permissions:
19+
actions: read
20+
contents: read
21+
packages: read
22+
security-events: write
23+
continue-on-error: false
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- language: actions
29+
category: /language:actions
30+
build-mode: none
31+
runner: '["ubuntu-22.04"]'
32+
- language: go
33+
category: /language:go
34+
build-mode: autobuild
35+
runner: '["ubuntu-22.04"]'
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
39+
40+
- name: Initialize CodeQL
41+
uses: github/codeql-action/init@v3
42+
with:
43+
languages: ${{ matrix.language }}
44+
build-mode: ${{ matrix.build-mode }}
45+
dependency-caching: ${{ runner.environment == 'github-hosted' }}
46+
queries: "" # Default query suite
47+
packs: github/ccr-${{ matrix.language }}-queries
48+
config: |
49+
default-setup:
50+
org:
51+
model-packs: [ ${{ github.event.inputs.code_scanning_codeql_packs }} ]
52+
threat-models: [ ]
53+
- name: Setup proxy for registries
54+
id: proxy
55+
uses: github/codeql-action/start-proxy@v3
56+
with:
57+
registries_credentials: ${{ secrets.GITHUB_REGISTRIES_PROXY }}
58+
language: ${{ matrix.language }}
59+
60+
- name: Configure
61+
uses: github/codeql-action/resolve-environment@v3
62+
id: resolve-environment
63+
with:
64+
language: ${{ matrix.language }}
65+
- name: Setup Go
66+
uses: actions/setup-go@v5
67+
if: matrix.language == 'go' && fromJSON(steps.resolve-environment.outputs.environment).configuration.go.version
68+
with:
69+
go-version: ${{ fromJSON(steps.resolve-environment.outputs.environment).configuration.go.version }}
70+
cache: false
71+
72+
- name: Autobuild
73+
uses: github/codeql-action/autobuild@v3
74+
75+
- name: Perform CodeQL Analysis
76+
uses: github/codeql-action/analyze@v3
77+
env:
78+
CODEQL_PROXY_HOST: ${{ steps.proxy.outputs.proxy_host }}
79+
CODEQL_PROXY_PORT: ${{ steps.proxy.outputs.proxy_port }}
80+
CODEQL_PROXY_CA_CERTIFICATE: ${{ steps.proxy.outputs.proxy_ca_certificate }}
81+
with:
82+
category: ${{ matrix.category }}

pkg/github/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func searchRepositories(client *github.Client, t translations.TranslationHelperF
3636
if err != nil {
3737
return mcp.NewToolResultError(err.Error()), nil
3838
}
39-
perPage, err := optionalIntParamWithDefault(request, "per_page", 30)
39+
perPage, err := optionalIntParamWithDefault(request, "perPage", 30)
4040
if err != nil {
4141
return mcp.NewToolResultError(err.Error()), nil
4242
}

pkg/github/search_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ func Test_SearchRepositories(t *testing.T) {
7272
),
7373
),
7474
requestArgs: map[string]interface{}{
75-
"query": "golang test",
76-
"page": float64(2),
77-
"per_page": float64(10),
75+
"query": "golang test",
76+
"page": float64(2),
77+
"perPage": float64(10),
7878
},
7979
expectError: false,
8080
expectedResult: mockSearchResult,

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