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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: salla_gitpuller
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: A lightweight utility to git pull a repository using SSH deploy keys stored in environment variables
5
5
  Author-email: Muhammad Zahid <zahidmuhammad127@gmail.com>
6
6
  License: MIT
@@ -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
- # Get SSH key
67
- if not ssh_key and workspace_name:
68
- key_env_name = f"{workspace_name}_SSHKEY"
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
- self.webhook_url = webhook_url or os.environ.get("CDM_SLACK_WEBHOOK_URL")
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.1"
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 = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: salla_gitpuller
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: A lightweight utility to git pull a repository using SSH deploy keys stored in environment variables
5
5
  Author-email: Muhammad Zahid <zahidmuhammad127@gmail.com>
6
6
  License: MIT
File without changes