Skip to content

Commit e1dbc85

Browse files
fix: gracefully handle outdated skills-lock.json in copilot setup workflow
Instead of failing the step when skills-lock.json is out of date: - Emit a warning annotation - Delete .agents/skills directory (stale external skills) - Revert all working tree changes - Continue without failing Also add GIT_CONFIG_* env vars for reproducible hash computation. Resolves #1779 Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/4eae6f6e-af38-472f-b7b4-671eda64b9b3 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
1 parent cfe6fc0 commit e1dbc85

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,17 @@ jobs:
3333
cache-dependency-path: ".github/workflows/copilot-setup-steps.yml"
3434

3535
- name: Install external agent skills
36+
env:
37+
GIT_CONFIG_COUNT: "1"
38+
GIT_CONFIG_KEY_0: core.autocrlf
39+
GIT_CONFIG_VALUE_0: "false"
3640
run: |
3741
npx skills experimental_install
38-
git diff --exit-code skills-lock.json
42+
if ! git diff --exit-code --quiet; then
43+
echo "::warning::skills-lock.json is out of date. Removing installed skills and reverting changes."
44+
rm -rf .agents/skills
45+
git checkout .
46+
fi
3947
4048
- name: Setup dependencies
4149
run: uv sync

skills-lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"find-skills": {
1515
"source": "vercel-labs/skills",
1616
"sourceType": "github",
17-
"computedHash": "9e1c8b3103f92fa8092568a44fe64858de7c5c9dc65ce4bea8f168080e889cfd"
17+
"computedHash": "d31e234f0c90694a670222cdd1dafa853e051d7066beda389f1097c22dadd461"
1818
}
1919
}
2020
}

0 commit comments

Comments
 (0)