devs-webhook 2.0.0__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/PKG-INFO +1 -1
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/core/container_pool.py +32 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook.egg-info/PKG-INFO +1 -1
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/pyproject.toml +1 -1
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/LICENSE +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/README.md +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/__init__.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/app.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/cli/__init__.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/cli/worker.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/config.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/core/__init__.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/core/base_dispatcher.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/core/claude_dispatcher.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/core/deduplication.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/core/repository_manager.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/core/task_processor.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/core/test_dispatcher.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/core/webhook_config.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/core/webhook_handler.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/github/__init__.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/github/app_auth.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/github/client.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/github/models.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/github/parser.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/main_cli.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/sources/__init__.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/sources/base.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/sources/sqs_source.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/sources/webhook_source.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/utils/__init__.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/utils/async_utils.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/utils/container_logs.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/utils/github.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/utils/logging.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/utils/s3_artifacts.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook/utils/serialization.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook.egg-info/SOURCES.txt +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook.egg-info/dependency_links.txt +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook.egg-info/entry_points.txt +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook.egg-info/requires.txt +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/devs_webhook.egg-info/top_level.txt +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/setup.cfg +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/tests/test_allowlist.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/tests/test_authentication.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/tests/test_authorized_users.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/tests/test_ci_container_pool.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/tests/test_cleanup_mode.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/tests/test_container_logs.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/tests/test_single_queue.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/tests/test_sqs_burst.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/tests/test_stop_container_after_task.py +0 -0
- {devs_webhook-2.0.0 → devs_webhook-2.0.2}/tests/test_webhook_parser.py +0 -0
|
@@ -901,6 +901,8 @@ class ContainerPool:
|
|
|
901
901
|
logger.info("Checked out default branch",
|
|
902
902
|
repo=repo_name,
|
|
903
903
|
branch=default_branch)
|
|
904
|
+
# Reset to match remote branch so we pick up fetched changes
|
|
905
|
+
await self._reset_to_remote(repo_path, default_branch)
|
|
904
906
|
# Clean untracked files after checkout
|
|
905
907
|
await self._clean_untracked_files(repo_path)
|
|
906
908
|
elif default_branch == "dev":
|
|
@@ -918,6 +920,8 @@ class ContainerPool:
|
|
|
918
920
|
if process.returncode == 0:
|
|
919
921
|
logger.info("Checked out main branch",
|
|
920
922
|
repo=repo_name)
|
|
923
|
+
# Reset to match remote branch so we pick up fetched changes
|
|
924
|
+
await self._reset_to_remote(repo_path, "main")
|
|
921
925
|
# Clean untracked files after checkout
|
|
922
926
|
await self._clean_untracked_files(repo_path)
|
|
923
927
|
else:
|
|
@@ -932,6 +936,34 @@ class ContainerPool:
|
|
|
932
936
|
branch=default_branch,
|
|
933
937
|
stderr=stderr.decode()[:200] if stderr else "")
|
|
934
938
|
|
|
939
|
+
async def _reset_to_remote(self, repo_path: Path, branch: str) -> None:
|
|
940
|
+
"""Reset local branch to match the remote tracking branch.
|
|
941
|
+
|
|
942
|
+
After 'git fetch --all', the local branch may still be behind origin.
|
|
943
|
+
This ensures the working tree matches the latest fetched remote state.
|
|
944
|
+
|
|
945
|
+
Args:
|
|
946
|
+
repo_path: Path to the repository
|
|
947
|
+
branch: Branch name to reset (e.g. "main")
|
|
948
|
+
"""
|
|
949
|
+
reset_cmd = ["git", "-C", str(repo_path), "reset", "--hard", f"origin/{branch}"]
|
|
950
|
+
process = await asyncio.create_subprocess_exec(
|
|
951
|
+
*reset_cmd,
|
|
952
|
+
stdout=asyncio.subprocess.PIPE,
|
|
953
|
+
stderr=asyncio.subprocess.PIPE
|
|
954
|
+
)
|
|
955
|
+
stdout, stderr = await process.communicate()
|
|
956
|
+
|
|
957
|
+
if process.returncode == 0:
|
|
958
|
+
logger.info("Reset branch to match remote",
|
|
959
|
+
repo_path=str(repo_path),
|
|
960
|
+
branch=branch)
|
|
961
|
+
else:
|
|
962
|
+
logger.warning("Could not reset to remote branch",
|
|
963
|
+
repo_path=str(repo_path),
|
|
964
|
+
branch=branch,
|
|
965
|
+
stderr=stderr.decode()[:200] if stderr else "")
|
|
966
|
+
|
|
935
967
|
async def _clean_untracked_files(self, repo_path: Path) -> None:
|
|
936
968
|
"""Remove untracked files and directories from repository.
|
|
937
969
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|