salla-gitpuller 1.0.1__tar.gz → 1.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.
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/PKG-INFO +1 -1
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/gitpuller/gitpull.py +3 -10
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/gitpuller/slack_notifier.py +3 -5
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/pyproject.toml +1 -1
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/salla_gitpuller.egg-info/PKG-INFO +1 -1
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/LICENSE +0 -0
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/README.md +0 -0
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/gitpuller/__init__.py +0 -0
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/gitpuller/alert_manager.py +0 -0
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/gitpuller/state_manager.py +0 -0
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/gitpuller/utils.py +0 -0
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/salla_gitpuller.egg-info/SOURCES.txt +0 -0
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/salla_gitpuller.egg-info/dependency_links.txt +0 -0
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/salla_gitpuller.egg-info/top_level.txt +0 -0
- {salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/setup.cfg +0 -0
|
@@ -63,14 +63,9 @@ class GitPullExecutor:
|
|
|
63
63
|
if not os.path.exists(repo_path):
|
|
64
64
|
raise ValueError(f"Repo path does not exist: {repo_path}")
|
|
65
65
|
|
|
66
|
-
#
|
|
67
|
-
if not ssh_key
|
|
68
|
-
|
|
69
|
-
ssh_key = os.environ.get(key_env_name)
|
|
70
|
-
if not ssh_key:
|
|
71
|
-
raise ValueError(f"Missing env var {key_env_name} with the PRIVATE deploy key")
|
|
72
|
-
elif not ssh_key:
|
|
73
|
-
raise ValueError("SSH key is required. Provide it directly or set workspace_name.")
|
|
66
|
+
# Validate SSH key
|
|
67
|
+
if not ssh_key:
|
|
68
|
+
raise ValueError("SSH key is required. Provide it directly as a parameter.")
|
|
74
69
|
|
|
75
70
|
# Normalize key
|
|
76
71
|
ssh_key = self.normalize_ssh_key(ssh_key)
|
|
@@ -93,7 +88,6 @@ class GitPullExecutor:
|
|
|
93
88
|
|
|
94
89
|
git_output = ""
|
|
95
90
|
git_status = "success"
|
|
96
|
-
key_env_var_used = f"{workspace_name}_SSHKEY" if workspace_name else "N/A"
|
|
97
91
|
|
|
98
92
|
original_dir = None
|
|
99
93
|
try:
|
|
@@ -129,7 +123,6 @@ class GitPullExecutor:
|
|
|
129
123
|
"repo_path": repo_path,
|
|
130
124
|
"git_pull_status": git_status,
|
|
131
125
|
"git_pull_output": git_output.strip(),
|
|
132
|
-
"key_env_var_used": key_env_var_used,
|
|
133
126
|
}
|
|
134
127
|
|
|
135
128
|
def execute_with_alerting(
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import os
|
|
2
1
|
import requests
|
|
3
2
|
from typing import Optional, Dict, Any
|
|
4
3
|
|
|
@@ -6,12 +5,11 @@ from typing import Optional, Dict, Any
|
|
|
6
5
|
class SlackNotifier:
|
|
7
6
|
|
|
8
7
|
def __init__(self, webhook_url: Optional[str] = None):
|
|
9
|
-
|
|
10
|
-
if not self.webhook_url:
|
|
8
|
+
if not webhook_url:
|
|
11
9
|
raise ValueError(
|
|
12
|
-
"Slack webhook URL is required. "
|
|
13
|
-
"Provide it as parameter or set CDM_SLACK_WEBHOOK_URL environment variable."
|
|
10
|
+
"Slack webhook URL is required. Provide it as parameter."
|
|
14
11
|
)
|
|
12
|
+
self.webhook_url = webhook_url
|
|
15
13
|
|
|
16
14
|
def create_failure_payload(self, repo_name: str, error_output: str) -> Dict[str, Any]:
|
|
17
15
|
payload = {
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "salla_gitpuller"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.2"
|
|
8
8
|
description = "A lightweight utility to git pull a repository using SSH deploy keys stored in environment variables"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{salla_gitpuller-1.0.1 → salla_gitpuller-1.0.2}/salla_gitpuller.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|