Remove deprecated handling of full repository path in GitHubClient.py, enforcing the use of separate OWNER and TARGET_REPO inputs for clarity and consistency.

Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
This commit is contained in:
Shakar Bakr 2025-06-15 13:54:35 +03:00
parent 773a601445
commit 569f543320
No known key found for this signature in database
GPG Key ID: DA55A26823AE3C28

View File

@ -19,14 +19,9 @@ class GitHubClient(Client):
self.repo = os.getenv('INPUT_REPO') self.repo = os.getenv('INPUT_REPO')
self.target_repo_name = os.getenv('INPUT_TARGET_REPO') self.target_repo_name = os.getenv('INPUT_TARGET_REPO')
self.owner = os.getenv('INPUT_OWNER') self.owner = os.getenv('INPUT_OWNER')
# Construct the full target repository path # Construct the full target repository path
if self.target_repo_name and self.owner: if self.target_repo_name and self.owner:
self.target_repo = f'{self.owner}/{self.target_repo_name}' self.target_repo = f'{self.owner}/{self.target_repo_name}'
elif self.target_repo_name and '/' in self.target_repo_name:
# Backward compatibility: if TARGET_REPO contains '/', treat it as full repo path
self.target_repo = self.target_repo_name
print('WARNING: Using full repository path in TARGET_REPO is deprecated. Use OWNER and TARGET_REPO separately.')
else: else:
self.target_repo = self.repo # Default to current repo if not specified self.target_repo = self.repo # Default to current repo if not specified