Skip to content

Commit 4d70f4c

Browse files
committed
Merge main and verify batch labels through MCP transport
Signed-off-by: CAOShurong <170531907+CAOShurong@users.noreply.github.com>
2 parents d4711bf + 71ef826 commit 4d70f4c

203 files changed

Lines changed: 16063 additions & 6999 deletions

File tree

Some content is hidden

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

‎.github/actions/build-ui/action.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
steps:
77
- name: Cache UI artifacts
88
id: cache-ui
9-
uses: actions/cache@v5
9+
uses: actions/cache@v6
1010
with:
1111
path: |
1212
pkg/github/ui_dist/get-me.html
@@ -18,9 +18,9 @@ runs:
1818

1919
- name: Set up Node.js
2020
if: steps.cache-ui.outputs.cache-hit != 'true'
21-
uses: actions/setup-node@v6
21+
uses: actions/setup-node@v7
2222
with:
23-
node-version: "22"
23+
node-version-file: ui/package.json
2424
cache: npm
2525
cache-dependency-path: ui/package-lock.json
2626

‎.github/dependabot.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ updates:
99
directory: "/"
1010
schedule:
1111
interval: "weekly"
12+
- package-ecosystem: "npm"
13+
directory: "/ui"
14+
schedule:
15+
interval: "weekly"
1216
- package-ecosystem: "docker"
1317
directory: "/"
1418
schedule:

‎.github/workflows/close-inactive-issues.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
issues: write
1515
pull-requests: write
1616
steps:
17-
- uses: actions/stale@v10
17+
- uses: actions/stale@v11
1818
with:
1919
days-before-issue-stale: ${{ env.PR_DAYS_BEFORE_STALE }}
2020
days-before-issue-close: ${{ env.PR_DAYS_BEFORE_CLOSE }}

‎.github/workflows/code-scanning.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
uses: actions/checkout@v7
4545

4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v4.37.4
47+
uses: github/codeql-action/init@v4.38.2
4848
with:
4949
languages: ${{ matrix.language }}
5050
build-mode: ${{ matrix.build-mode }}
@@ -61,13 +61,13 @@ jobs:
6161
threat-models: [ ]
6262
- name: Setup proxy for registries
6363
id: proxy
64-
uses: github/codeql-action/start-proxy@v4.37.4
64+
uses: github/codeql-action/start-proxy@v4.38.2
6565
with:
6666
registries_credentials: ${{ secrets.GITHUB_REGISTRIES_PROXY }}
6767
language: ${{ matrix.language }}
6868

6969
- name: Configure
70-
uses: github/codeql-action/resolve-environment@v4.37.4
70+
uses: github/codeql-action/resolve-environment@v4.38.2
7171
id: resolve-environment
7272
with:
7373
language: ${{ matrix.language }}
@@ -82,7 +82,7 @@ jobs:
8282
if: matrix.language == 'javascript'
8383
uses: actions/setup-node@v7
8484
with:
85-
node-version: "20"
85+
node-version-file: ui/package.json
8686
cache: "npm"
8787
cache-dependency-path: ui/package-lock.json
8888

@@ -91,10 +91,10 @@ jobs:
9191
uses: ./.github/actions/build-ui
9292

9393
- name: Autobuild
94-
uses: github/codeql-action/autobuild@v4.37.4
94+
uses: github/codeql-action/autobuild@v4.38.2
9595

9696
- name: Perform CodeQL Analysis
97-
uses: github/codeql-action/analyze@v4.37.4
97+
uses: github/codeql-action/analyze@v4.38.2
9898
env:
9999
CODEQL_PROXY_HOST: ${{ steps.proxy.outputs.proxy_host }}
100100
CODEQL_PROXY_PORT: ${{ steps.proxy.outputs.proxy_port }}

‎.github/workflows/docker-publish.yml‎

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ jobs:
4848
if: github.event_name != 'pull_request'
4949
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 #v4.1.2
5050
with:
51-
cosign-release: "v2.2.4"
51+
cosign-release: "v3.1.3"
5252

5353
# Set up BuildKit Docker container builder to be able to build
5454
# multi-platform images and export cache
5555
# https://github.com/docker/setup-buildx-action
5656
- name: Set up Docker Buildx
57-
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
57+
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
5858

5959
# Login against a Docker registry except on PR
6060
# https://github.com/docker/login-action
@@ -106,7 +106,7 @@ jobs:
106106
# https://github.com/docker/build-push-action
107107
- name: Build and push Docker image
108108
id: build-and-push
109-
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
109+
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
110110
with:
111111
context: .
112112
push: ${{ github.event_name != 'pull_request' }}
@@ -116,23 +116,26 @@ jobs:
116116
cache-to: type=gha,mode=max
117117
platforms: linux/amd64,linux/arm64
118118
build-args: |
119-
VERSION=${{ github.ref_name }}
119+
VERSION=${{ github.ref_type == 'tag' && github.ref_name || 'dev' }}
120120
secrets: |
121121
oauth_client_id=${{ secrets.OAUTH_CLIENT_ID }}
122122
oauth_client_secret=${{ secrets.OAUTH_CLIENT_SECRET }}
123123
124124
# Sign the resulting Docker image digest except on PRs.
125-
# This will only write to the public Rekor transparency log when the Docker
126-
# repository is public to avoid leaking data. If you would like to publish
127-
# transparency data even for private images, pass --force to cosign below.
125+
# Publish both v2-compatible .sig tags and native Sigstore bundles.
126+
# --yes also consents to publishing signing metadata to the public log.
128127
# https://github.com/sigstore/cosign
129-
- name: Sign the published Docker image
128+
- name: Sign the published Docker image (legacy)
130129
if: ${{ github.event_name != 'pull_request' }}
131130
env:
132131
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
133-
TAGS: ${{ steps.meta.outputs.tags }}
134132
DIGEST: ${{ steps.build-and-push.outputs.digest }}
135133
# This step uses the identity token to provision an ephemeral certificate
136134
# against the sigstore community Fulcio instance.
137-
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
138-
135+
run: cosign sign --yes --new-bundle-format=false --use-signing-config=false --registry-referrers-mode=legacy "${REGISTRY}/${IMAGE_NAME}@${DIGEST}"
136+
137+
- name: Sign the published Docker image (native bundle)
138+
if: ${{ github.event_name != 'pull_request' }}
139+
env:
140+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
141+
run: cosign sign --yes "${REGISTRY}/${IMAGE_NAME}@${DIGEST}"

‎.github/workflows/lint.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
uses: ./.github/actions/build-ui
1919
- uses: actions/setup-go@v7
2020
with:
21-
go-version: '1.25'
21+
go-version-file: 'go.mod'
2222
- name: golangci-lint
2323
uses: golangci/golangci-lint-action@v9
2424
with:
2525
# sync with script/lint
26-
version: v2.9
26+
version: v2.14.0

‎.golangci.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,17 @@ linters:
3131
- examples$
3232
- internal/githubv4mock
3333
rules:
34+
# v2.9.0 misreports SA4006 for Go 1.26 new(expr); retain go-github's helper until the linter is upgraded.
35+
- linters:
36+
- staticcheck
37+
text: '(go)?github\.Ptr is deprecated: use the new builtin instead\.'
3438
- linters:
3539
- revive
3640
text: "var-naming: avoid package names that conflict with Go standard library package names"
3741
settings:
42+
modernize:
43+
disable:
44+
- newexpr
3845
staticcheck:
3946
checks:
4047
- "all"

‎CONTRIBUTING.md‎

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,27 @@ Thanks for contributing and for helping us build toolsets that are truly valuabl
2626

2727
These are one time installations required to be able to test your changes locally as part of the pull request (PR) submission process.
2828

29-
1. Install Go [through download](https://go.dev/doc/install) | [through Homebrew](https://formulae.brew.sh/formula/go)
30-
2. [Install golangci-lint v2](https://golangci-lint.run/welcome/install/#local-installation)
29+
1. Install Go 1.26.8 or later [through download](https://go.dev/doc/install) | [through Homebrew](https://formulae.brew.sh/formula/go)
30+
2. [Install golangci-lint v2.14.0](https://golangci-lint.run/welcome/install/#local-installation), or let `script/lint` install the repository-pinned version. The pinned version supports both Go 1.26 and Go 1.27.
31+
32+
### UI development
33+
34+
Use Node.js 26.x for the UI in `ui/`. This matches the Docker UI build stage
35+
and `@types/node`; GitHub Actions reads the Node version from `ui/package.json`.
36+
Node 26 is a supported Current release, with LTS scheduled for October 2026.
37+
38+
From `ui/`, run `npm ci`, `npm run typecheck`, and `npm run build`.
39+
Type checking uses the native TypeScript 7 compiler through `tsc`; Vite handles
40+
transpilation and bundling separately. No TypeScript compiler API integration,
41+
typescript-eslint, or ts-node is required.
42+
43+
### MCP Apps UI
44+
45+
The `ui/` views use React 19 and Primer React 38. With Node.js 20.19+ or 22.12+, run `cd ui && npm ci && npm run typecheck && npm run build && npm audit` before `script/test`. The build writes self-contained HTML to `pkg/github/ui_dist/`, which the Go server embeds; these generated files are not committed.
46+
47+
Primer 38 no longer exports `Box` or accepts `sx`/styled-system props. Use semantic HTML, native `style` props for dynamic/layout styles, and CSS Modules for nested selectors. `AppProvider` loads Primer's primitive tokens and light/dark themes, so use CSS variables rather than JavaScript theme values. Custom element typings must augment `react/jsx-runtime` rather than the global `JSX` namespace.
48+
49+
For UI dependency upgrades, compare all four views (`get-me`, `issue-write`, `pr-write`, and `pr-edit`) in light/dark themes and at narrow widths in an MCP Apps host, including menus, Markdown editing/preview, and completed-result views. Include before/after screenshots in the pull request.
3150

3251
## Submitting a pull request
3352

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ COPY ui/ ./ui/
77
RUN mkdir -p ./pkg/github/ui_dist && \
88
cd ui && npm run build
99

10-
FROM golang:1.27.0-alpine@sha256:4c9fe60190a2a3350ddc51de80d0224b8a6698d12bdfc999fee45ea9d6c46dbc AS build
10+
FROM golang:1.27.1-alpine@sha256:8a5910f31396cd4d89662f56c68b3ae31d374308270a1c3bd96672ee5ed43414 AS build
1111
ARG VERSION="dev"
1212

1313
# Set the working directory

0 commit comments

Comments
 (0)