pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/github/copilot-sdk-java/commit/5821e83f1917903c02f6a6f7c19ef0042aa12394

f="https://github.githubassets.com/assets/global-d18f184ea1a06a2c.css" /> Unify @github/copilot version tracking and rename sync workflow · github/copilot-sdk-java@5821e83 · GitHub
Skip to content
This repository was archived by the owner on Jun 17, 2026. It is now read-only.

Commit 5821e83

Browse files
committed
Unify @github/copilot version tracking and rename sync workflow
Option C: Make reference-impl sync the single entry point for all @github/copilot version changes. During sync, both pom.xml and scripts/codegen/package.json are updated from the reference implementation's nodejs/package.json. Changes: - Add sync-codegen-version.sh to update scripts/codegen/package.json - Update merge-reference-impl-finish.sh to call the new script - Remove Dependabot npm entry for /scripts/codegen (no longer needed) - Rename weekly-reference-impl-sync.{yml,md,lock.yml} to reference-impl-sync.{yml,md,lock.yml} - Change schedule from weekly (Monday) to daily - Remove all 'weekly'/'Weekly' timing references from file contents - Rename POM property to remove 'weekly' from its name - Recompile agentic workflow via gh aw compile
1 parent 5419ac8 commit 5821e83

12 files changed

Lines changed: 135 additions & 64 deletions

.github/actions/setup-copilot/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ runs:
2121
# implementation pinned in .lastmerge by
2222
# .github/scripts/reference-impl-sync/sync-cli-version-from-reference-impl.sh.
2323
run: |
24-
PROP="readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-weekly-reference-impl-sync"
24+
PROP="readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync"
2525
VERSION=$(sed -n "s|.*<${PROP}>\(.*\)</${PROP}>.*|\1|p" pom.xml | head -n 1 | tr -d '[:space:]')
2626
if [[ -z "$VERSION" || "$VERSION" == "PRIMER_TO_REPLACE" ]]; then
2727
echo "::error::Could not read pinned @github/copilot version from pom.xml property <${PROP}>" >&2

.github/dependabot.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "npm"
4-
directory: "/scripts/codegen"
5-
schedule:
6-
interval: "daily"
7-
open-pull-requests-limit: 1
8-
allow:
9-
- dependency-name: "@github/copilot"
10-
113
- package-ecosystem: "github-actions"
124
directory: "/"
135
schedule:

.github/prompts/coding-agent-merge-reference-impl-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<!-- Custom instructions for the Copilot coding agent when triggered by the weekly reference implementation sync workflow. -->
2-
<!-- This file is read by .github/workflows/weekly-reference-impl-sync.yml and passed as custom_instructions. -->
1+
<!-- Custom instructions for the Copilot coding agent when triggered by the reference implementation sync workflow. -->
2+
<!-- This file is read by .github/workflows/reference-impl-sync.yml and passed as custom_instructions. -->
33

44
Follow the agentic-merge-reference-impl prompt at .github/prompts/agentic-merge-reference-impl.prompt.md
55
to port reference implementation changes to the Java SDK.

.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
# 2. Updates .lastmerge to reference implementation HEAD
88
# 3. Syncs the @github/copilot version property in pom.xml from the
99
# cloned reference implementation's nodejs/package.json
10-
# 4. Commits the .lastmerge + pom.xml updates
11-
# 5. Pushes the branch to origen
10+
# 4. Syncs scripts/codegen/package.json to the same @github/copilot
11+
# version so the code generator uses matching schemas
12+
# 5. Commits the .lastmerge + pom.xml + codegen package updates
13+
# 6. Pushes the branch to origen
1214
#
1315
# Usage: ./.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh
1416
# ./.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh --skip-tests
@@ -56,7 +58,15 @@ echo "$NEW_COMMIT" > "$ROOT_DIR/.lastmerge"
5658
echo "▸ Syncing @github/copilot version in pom.xml from reference implementation…"
5759
"$ROOT_DIR/.github/scripts/reference-impl-sync/sync-cli-version-from-reference-impl.sh" "$REFERENCE_IMPL_DIR"
5860

59-
git add .lastmerge pom.xml
61+
# ── 2c. Sync scripts/codegen @github/copilot version ─────────
62+
# Keeps scripts/codegen/package.json in lockstep so the code generator
63+
# uses schemas from the same CLI version that the tests run against.
64+
# This eliminates the gap where Dependabot could race ahead of the
65+
# reference implementation sync.
66+
echo "▸ Syncing @github/copilot version in scripts/codegen/package.json…"
67+
"$ROOT_DIR/.github/scripts/reference-impl-sync/sync-codegen-version.sh" "$REFERENCE_IMPL_DIR"
68+
69+
git add .lastmerge pom.xml scripts/codegen/package.json scripts/codegen/package-lock.json
6070
git commit -m "Update .lastmerge to $NEW_COMMIT and sync pom.xml CLI version"
6171

6272
# ── 3. Push branch ───────────────────────────────────────────

.github/scripts/reference-impl-sync/sync-cli-version-from-reference-impl.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# reference implementation's nodejs/package.json, and updates the
77
# corresponding property in pom.xml:
88
#
9-
# <readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-weekly-reference-impl-sync>
9+
# <readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>
1010
#
1111
# This keeps the canonical Copilot CLI version (declared in pom.xml)
1212
# in sync with whatever the reference implementation pinned in
@@ -65,7 +65,7 @@ if [[ -z "$CLI_VERSION" ]]; then
6565
fi
6666

6767
POM="$ROOT_DIR/pom.xml"
68-
PROP="readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-weekly-reference-impl-sync"
68+
PROP="readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync"
6969

7070
if ! grep -q "<${PROP}>" "$POM"; then
7171
echo "❌ Property <${PROP}> not found in $POM" >&2
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/usr/bin/env bash
2+
# ──────────────────────────────────────────────────────────────
3+
# sync-codegen-version.sh
4+
#
5+
# Updates the @github/copilot dependency in scripts/codegen/package.json
6+
# to match the version used by the reference implementation. This keeps
7+
# the code generator schemas in lockstep with the CLI version used for
8+
# testing, eliminating the gap where Dependabot could race ahead.
9+
#
10+
# Usage:
11+
# ./sync-codegen-version.sh <reference-impl-dir>
12+
#
13+
# Or, when invoked from merge-reference-impl-finish.sh, the directory
14+
# is passed as $1.
15+
# ──────────────────────────────────────────────────────────────
16+
set -euo pipefail
17+
18+
# Locate the repo root by walking up from this script until we find a pom.xml.
19+
find_repo_root() {
20+
local dir
21+
dir="$(cd "$(dirname "$0")" && pwd)"
22+
while [[ "$dir" != "/" ]]; do
23+
if [[ -f "$dir/pom.xml" ]]; then
24+
echo "$dir"
25+
return 0
26+
fi
27+
dir="$(dirname "$dir")"
28+
done
29+
echo "❌ Could not locate repo root (no pom.xml found above $(dirname "$0"))" >&2
30+
return 1
31+
}
32+
ROOT_DIR="$(find_repo_root)"
33+
34+
REFERENCE_IMPL_DIR="${1:-${REFERENCE_IMPL_DIR:-}}"
35+
if [[ -z "$REFERENCE_IMPL_DIR" ]]; then
36+
echo "❌ Usage: $0 <reference-impl-dir>" >&2
37+
echo " or set REFERENCE_IMPL_DIR in the environment." >&2
38+
exit 1
39+
fi
40+
41+
PKG_JSON="$REFERENCE_IMPL_DIR/nodejs/package.json"
42+
if [[ ! -f "$PKG_JSON" ]]; then
43+
echo "❌ Cannot find $PKG_JSON" >&2
44+
exit 1
45+
fi
46+
47+
# Extract the @github/copilot version from the reference implementation.
48+
CLI_VERSION=$(node -e \
49+
"const fs=require('fs');const p=JSON.parse(fs.readFileSync(process.argv[1],'utf8'));const v=(p.dependencies&&p.dependencies['@github/copilot'])||(p.devDependencies&&p.devDependencies['@github/copilot']);process.stdout.write(v||'');" \
50+
"$PKG_JSON")
51+
52+
if [[ -z "$CLI_VERSION" ]]; then
53+
echo "❌ Could not extract @github/copilot version from $PKG_JSON" >&2
54+
exit 1
55+
fi
56+
57+
CODEGEN_DIR="$ROOT_DIR/scripts/codegen"
58+
CODEGEN_PKG="$CODEGEN_DIR/package.json"
59+
60+
if [[ ! -f "$CODEGEN_PKG" ]]; then
61+
echo "❌ Cannot find $CODEGEN_PKG" >&2
62+
exit 1
63+
fi
64+
65+
# Update scripts/codegen/package.json with the new version and regenerate the lock file.
66+
echo "▸ Updating scripts/codegen/package.json: @github/copilot → ${CLI_VERSION}"
67+
cd "$CODEGEN_DIR"
68+
npm install "@github/copilot@${CLI_VERSION}" --save-exact
69+
echo "▸ Updated scripts/codegen to @github/copilot@${CLI_VERSION}"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

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