Skip to content

Update pre-commit and devcontainer pins when present #14

@CasperKristiansson

Description

@CasperKristiansson

Summary

Extend detection so the action updates pinned Python versions inside .pre-commit-config.yaml (language_version) and .devcontainer/devcontainer.json (base images or features) when they reference CPython patch versions.

Why

Teams often pin tooling in pre-commit hooks and devcontainers. Leaving those untouched after a patch bump creates drift and confusion. Automating the updates keeps local environments aligned with CI.

What needs to happen

  • Parse .pre-commit-config.yaml to locate language_version or hook-specific overrides that contain explicit patch versions.
  • Detect devcontainer base images or features pointing to CPython tags and rewrite them conservatively.
  • Add fixtures covering pre-commit and devcontainer scenarios, including negative tests for ranges.
  • Document the expanded coverage in README and examples.

References

  • Roadmap capabilities item: "Pre-commit + devcontainer coverage".

Acceptance criteria

  • Running with defaults updates pre-commit language_version pins and devcontainer Python base images when present.
  • Tests cover update and no-op paths.
  • Documentation lists the new file types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions