Skip to content

Commit d20cd3e

Browse files
tclemCopilot
andcommitted
Revert "Add scheduled trigger to update-copilot-dependency.yml"
This reverts commit a88c3eb. The scheduled trigger was added to close a hands-off-loop gap that was framed in terms of a downstream consumer's needs. On reflection, the SDK should not be the only language in this repo with scheduled auto-detect; that's a cross-language platform decision, not a single- SDK one. Reverting brings update-copilot-dependency.yml back to manual-only (workflow_dispatch with a required version input) — the same shape as every other language's CLI update workflow in this repo. When the SDK collectively decides to add scheduled CLI tracking, that should land as a unified change across all languages, not as a Rust-only special case driven by a downstream consumer's automation desires. Manual dispatch remains the supported path until then. Conflict resolution: the e93ce8e ("Scrub github-app references") commit landed after a88c3eb and rewrote the cron block's comment. The revert drops the entire schedule: block (including the rewritten comment), restoring the workflow to its pre-a88c3eb manual-only shape exactly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a870a3d commit d20cd3e

1 file changed

Lines changed: 11 additions & 53 deletions

File tree

.github/workflows/update-copilot-dependency.yml

Lines changed: 11 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,31 @@
11
name: "Update @github/copilot Dependency"
22

33
on:
4-
schedule:
5-
# Daily at 10:00 UTC — picks up new @github/copilot CLI releases
6-
# within ~24h of publish, keeping the SDK's pinned CLI version
7-
# current so the SDK regen advances in lockstep with each upstream
8-
# publish. The detect job is cheap (one `npm view` + a jq read);
9-
# the heavy update job only runs when the detected version actually
10-
# differs from the current pin, so the daily schedule is
11-
# effectively free on no-op days.
12-
- cron: "0 10 * * *"
134
workflow_dispatch:
145
inputs:
156
version:
16-
description: 'Target version of @github/copilot (e.g. 0.0.420). Leave empty to auto-detect the latest published version.'
17-
required: false
7+
description: 'Target version of @github/copilot (e.g. 0.0.420)'
8+
required: true
189
type: string
1910

2011
permissions:
2112
contents: write
2213
pull-requests: write
2314

2415
jobs:
25-
detect:
26-
name: "Detect target version"
16+
update:
17+
name: "Update @github/copilot to ${{ inputs.version }}"
2718
runs-on: ubuntu-latest
28-
outputs:
29-
version: ${{ steps.resolve.outputs.version }}
30-
should_continue: ${{ steps.resolve.outputs.should_continue }}
3119
steps:
32-
- uses: actions/checkout@v4
33-
34-
- uses: actions/setup-node@v4
35-
with:
36-
node-version: 22
37-
38-
- name: Resolve target version
39-
id: resolve
20+
- name: Validate version input
4021
env:
41-
INPUT_VERSION: ${{ inputs.version }}
22+
VERSION: ${{ inputs.version }}
4223
run: |
43-
if [ -n "$INPUT_VERSION" ]; then
44-
TARGET="$INPUT_VERSION"
45-
echo "Manual override: $TARGET"
46-
else
47-
TARGET=$(npm view @github/copilot version)
48-
echo "Latest published @github/copilot: $TARGET"
49-
fi
50-
if [[ ! "$TARGET" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9._-]+)?$ ]]; then
51-
echo "::error::Invalid version format '$TARGET'. Expected semver (e.g. 0.0.420)."
24+
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9._-]+)?$ ]]; then
25+
echo "::error::Invalid version format '$VERSION'. Expected semver (e.g. 0.0.420)."
5226
exit 1
5327
fi
54-
CURRENT=$(jq -r '.dependencies["@github/copilot"]' nodejs/package.json | sed 's/^[\^~]//')
55-
echo "Current pinned: $CURRENT"
56-
if [ "$TARGET" = "$CURRENT" ]; then
57-
echo "Already on $TARGET; nothing to do."
58-
echo "should_continue=false" >> "$GITHUB_OUTPUT"
59-
exit 0
60-
fi
61-
echo "Will bump from $CURRENT to $TARGET"
62-
echo "version=$TARGET" >> "$GITHUB_OUTPUT"
63-
echo "should_continue=true" >> "$GITHUB_OUTPUT"
6428
65-
update:
66-
name: "Update @github/copilot to ${{ needs.detect.outputs.version }}"
67-
needs: detect
68-
if: needs.detect.outputs.should_continue == 'true'
69-
runs-on: ubuntu-latest
70-
steps:
7129
- uses: actions/checkout@v4
7230

7331
- uses: actions/setup-node@v4
@@ -100,13 +58,13 @@ jobs:
10058

10159
- name: Update @github/copilot in nodejs
10260
env:
103-
VERSION: ${{ needs.detect.outputs.version }}
61+
VERSION: ${{ inputs.version }}
10462
working-directory: ./nodejs
10563
run: npm install "@github/copilot@$VERSION"
10664

10765
- name: Update @github/copilot in test harness
10866
env:
109-
VERSION: ${{ needs.detect.outputs.version }}
67+
VERSION: ${{ inputs.version }}
11068
working-directory: ./test/harness
11169
run: npm install "@github/copilot@$VERSION"
11270

@@ -131,7 +89,7 @@ jobs:
13189
- name: Create pull request
13290
env:
13391
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134-
VERSION: ${{ needs.detect.outputs.version }}
92+
VERSION: ${{ inputs.version }}
13593
run: |
13694
BRANCH="update-copilot-$VERSION"
13795
git config user.name "github-actions[bot]"

0 commit comments

Comments
 (0)