Skip to content

Commit ef750f1

Browse files
Copilotsplch
andauthored
Fix spec-drift false positives from date-only description changes (#49)
* Initial plan * fix: update vendored spec date and ignore date-only drifts in spec-drift workflow Agent-Logs-Url: https://github.com/ionq/ionq-core-python/sessions/8f51ccaf-920d-4a3b-b4c5-bf9ae3d2b828 Co-authored-by: splch <25377399+splch@users.noreply.github.com> * fix: revert openapi.json date change — only spec-drift.yml needs updating Agent-Logs-Url: https://github.com/ionq/ionq-core-python/sessions/fb5a8995-946b-4ab5-929c-5ace34c64335 Co-authored-by: splch <25377399+splch@users.noreply.github.com> * fix: simplify date-strip to inline sed on the existing one-liner Agent-Logs-Url: https://github.com/ionq/ionq-core-python/sessions/b09e6ba6-bdaf-42b5-83b2-c92226fa05b6 Co-authored-by: splch <25377399+splch@users.noreply.github.com> * fix: DRY up spec-drift diff step with norm() helper Agent-Logs-Url: https://github.com/ionq/ionq-core-python/sessions/4f89c827-e9f2-42df-83ba-36e4f7cdfb67 Co-authored-by: splch <25377399+splch@users.noreply.github.com> * fix: use perl -pe instead of sed in norm() helper Agent-Logs-Url: https://github.com/ionq/ionq-core-python/sessions/d9b96e03-67b9-4cda-9f37-b8d80d6548ac Co-authored-by: splch <25377399+splch@users.noreply.github.com> * fix: use jq -S with inline gsub instead of python json.tool + perl * fix: replace gsub with del(.info.description) in norm() --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: splch <25377399+splch@users.noreply.github.com>
1 parent d29d3e7 commit ef750f1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/spec-drift.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
- name: Check for drift
2626
id: drift
2727
run: |
28-
if ! diff -u --label vendored --label upstream <(python3 -m json.tool --sort-keys openapi.json) <(python3 -m json.tool --sort-keys /tmp/latest-spec.json) > /tmp/spec.diff; then
28+
norm() { jq -S 'del(.info.description)' "$1"; }
29+
if ! diff -u --label vendored --label upstream <(norm openapi.json) <(norm /tmp/latest-spec.json) > /tmp/spec.diff; then
2930
echo "drifted=true" >> "$GITHUB_OUTPUT"
3031
fi
3132
- name: Open or update issue

0 commit comments

Comments
 (0)