Skip to content

Add GitTag fact and update repo operation to support tag checkout #1343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 13, 2025

Conversation

wowi42
Copy link
Contributor

@wowi42 wowi42 commented Apr 24, 2025

Introduced a new GitTag class to retrieve Git tags and modified the repo operation to handle branch and tag checkouts appropriately. Updated tests to reflect the addition of GitTag.

tested with

from pyinfra.operations import git

headscale_admin_git_repo = "https://github.com/GoodiesHQ/headscale-admin"
headscale_admin_code_path = "/tmp/headscale_admin"
headscale_admin_git_branch = "v0.25.6"

# Set up headscale-admin GUI
git.repo(
    name="Clone Headscale-admin git repository",
    src=headscale_admin_git_repo,
    dest=headscale_admin_code_path,
    branch=headscale_admin_git_branch,
)
pyinfra @local 1340.py

Fix #1340

wowi42 added 2 commits April 24, 2025 09:37
Introduced a new GitTag class to retrieve Git tags and modified the repo operation to handle branch and tag checkouts appropriately. Updated tests to reflect the addition of GitTag.
Copy link
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, great add @wowi42!

@Fizzadar Fizzadar merged commit 526c005 into pyinfra-dev:3.x May 13, 2025
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

git.repo fails when a tag is checked out
2 participants