Skip to content

Commit

Permalink
Ran pre-commit on cevatkerim's branch to ensure CI passes
Browse files Browse the repository at this point in the history
  • Loading branch information
filipchristiansen committed Jan 1, 2025
1 parent b98647f commit 5e03795
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/gitingest/clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def _check_repo_exists(url: str, pat: str | None = None) -> bool:
True if the repository exists, False otherwise.
"""
# Parse URL to get components
parts = url.split('/')
parts = url.split("/")
if len(parts) < 5: # Need at least protocol, empty, host, username, repo
return False

Expand All @@ -60,7 +60,7 @@ async def _check_repo_exists(url: str, pat: str | None = None) -> bool:
repo = parts[4]

# Construct API URL based on host
if 'github.com' in host:
if "github.com" in host:
api_url = url
else:
# For custom Git servers, use API v1 endpoint
Expand Down
1 change: 1 addition & 0 deletions src/gitingest/tests/test_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ async def test_check_repo_exists_with_redirect() -> None:
mock_exec.return_value = mock_process
assert await _check_repo_exists(url)


@pytest.mark.asyncio
async def test_check_repo_exists_with_pat() -> None:
url = "https://github.com/user/repo"
Expand Down
6 changes: 0 additions & 6 deletions src/templates/components/github_form.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
required
class="border-[3px] w-full relative z-20 border-gray-900 placeholder-gray-600 text-lg font-medium focus:outline-none py-3.5 px-6 rounded">
</div>

<!-- Access Settings Checkbox -->
<div class="flex items-center space-x-2 ml-2">
<input type="checkbox"
Expand All @@ -26,7 +25,6 @@
onchange="toggleAccessSettings()">
<label for="showAccessSettings" class="text-gray-900">Access Settings</label>
</div>

<!-- PAT input (hidden by default) -->
<div id="accessSettingsContainer" class="hidden">
<div class="relative w-full h-full">
Expand All @@ -39,7 +37,6 @@
class="border-[3px] w-full relative z-20 border-gray-900 placeholder-gray-600 text-lg font-medium focus:outline-none py-3.5 px-6 rounded">
</div>
</div>

<!-- Submit Button -->
<div class="relative w-full sm:w-auto flex-shrink-0 h-full group">
<div class="w-full h-full rounded bg-gray-800 translate-y-1 translate-x-1 absolute inset-0 z-10"></div>
Expand All @@ -48,19 +45,16 @@
Ingest
</button>
</div>

<input type="hidden" name="pattern_type" value="exclude">
<input type="hidden" name="pattern" value="">
</form>

<script>
function toggleAccessSettings() {
const container = document.getElementById('accessSettingsContainer');
const checkbox = document.getElementById('showAccessSettings');
container.classList.toggle('hidden', !checkbox.checked);
}
</script>

<div class="mt-4 relative z-20 flex flex-wrap gap-4 items-start">
<!-- Pattern selector -->
<div class="w-[200px] sm:w-[250px] mr-9 mt-4">
Expand Down

0 comments on commit 5e03795

Please sign in to comment.