Merged
Conversation
cidrblock
added a commit
to cidrblock/ansible-dev-environment
that referenced
this pull request
Jan 20, 2026
cidrblock
added a commit
to cidrblock/ansible-dev-environment
that referenced
this pull request
Jan 20, 2026
alisonlhart
approved these changes
Jan 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds comprehensive support for parsing and handling Ansible collection requests specified as Git URLs, including those with optional dependencies. It introduces new utility functions for Git URL detection and parsing, updates the collection request parsing logic to correctly distinguish between Git URLs and local paths, and provides an extensive test suite to ensure robust handling of various Git URL formats and edge cases.
Git URL support in collection parsing:
is_git_urlfunction to reliably detect whether a string is a Git URL, supporting multiple formats (e.g., git+https, git+ssh, https, git@) (src/ansible_dev_environment/collection.py).parse_git_url_collection_namefunction to extract the collection namespace and name from a Git URL using pattern matching and heuristics (src/ansible_dev_environment/collection.py).Collection request parsing enhancements:
parse_collection_requestto handle Git URLs both with and without optional dependencies, ensuring correct assignment of namespace, name, source, and local flags (src/ansible_dev_environment/collection.py).Environment variable inheritance for Git executable:
**os.environto the environment dictionary when runningansible-galaxycommands in both_install_galaxy_collectionsand_install_local_collectionmethods (src/ansible_dev_environment/subcommands/installer.py).ansible-galaxyneeds to clone repositories from Git URLs.ansible-galaxywould fail to locate thegitcommand, preventing installation of collections from Git sources.Testing and validation:
tests/unit/test_collection_git_url.pywith parameterized tests for Git URL detection, collection name parsing, and integration with the collection request parser, covering various formats and edge cases.