python-github-plus 0.0.1__tar.gz → 0.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: python-github-plus
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: Enhanced Python GitHub client.
5
5
  Home-page: https://github.com/aviz92/python-github-plus
6
6
  Author: Avi Zaguri
@@ -199,7 +199,7 @@ github_client = GitHubClient(
199
199
  )
200
200
 
201
201
  # Create a tag
202
- tag = github_client.tag.create_by_branch(
202
+ tag = github_client.tag.create(
203
203
  tag_name="v1.0.0",
204
204
  from_branch="main",
205
205
  message="Release version 1.0.0"
@@ -172,7 +172,7 @@ github_client = GitHubClient(
172
172
  )
173
173
 
174
174
  # Create a tag
175
- tag = github_client.tag.create_by_branch(
175
+ tag = github_client.tag.create(
176
176
  tag_name="v1.0.0",
177
177
  from_branch="main",
178
178
  message="Release version 1.0.0"
@@ -172,16 +172,16 @@ class GitHubTagService:
172
172
  self.logger = get_logger(self.__class__.__name__)
173
173
  self.repo = repo
174
174
 
175
- def create_by_sha(self, tag_name: str, sha: str, message: Optional[str] = None) -> GitTag:
175
+ def create_from_sha(self, tag_name: str, sha: str, message: Optional[str] = None) -> GitTag:
176
176
  tag = self.repo.create_git_tag(tag=tag_name, message=message or tag_name, object="main", type="commit")
177
177
  self.repo.create_git_ref(ref=f"refs/tags/{tag_name}", sha=tag.sha)
178
178
  self.logger.info(f"✅ Tag '{tag_name}' created at commit {sha}")
179
179
  return tag
180
180
 
181
- def create_by_branch(self, tag_name: str, from_branch: str, message: Optional[str] = None) -> GitTag:
181
+ def create(self, tag_name: str, from_branch: str, message: Optional[str] = None) -> GitTag:
182
182
  branch = self.repo.get_branch(from_branch)
183
183
  sha = branch.commit.sha
184
- return self.create_by_sha(tag_name=tag_name, sha=sha, message=message)
184
+ return self.create_from_sha(tag_name=tag_name, sha=sha, message=message)
185
185
 
186
186
  def delete(self, tag_name: str) -> None:
187
187
  ref = self.repo.get_git_ref(f"tags/{tag_name}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-github-plus
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: Enhanced Python GitHub client.
5
5
  Home-page: https://github.com/aviz92/python-github-plus
6
6
  Author: Avi Zaguri
@@ -199,7 +199,7 @@ github_client = GitHubClient(
199
199
  )
200
200
 
201
201
  # Create a tag
202
- tag = github_client.tag.create_by_branch(
202
+ tag = github_client.tag.create(
203
203
  tag_name="v1.0.0",
204
204
  from_branch="main",
205
205
  message="Release version 1.0.0"
@@ -1,6 +1,6 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
- package_version = '0.0.1'
3
+ package_version = '0.0.2'
4
4
 
5
5
  package_name = 'python-github-plus'
6
6
  package_description = 'Enhanced Python GitHub client.'