python-github-plus 0.0.1__py3-none-any.whl → 0.0.2__py3-none-any.whl
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.
- python_github_plus/github_plus.py +3 -3
- {python_github_plus-0.0.1.dist-info → python_github_plus-0.0.2.dist-info}/METADATA +2 -2
- python_github_plus-0.0.2.dist-info/RECORD +7 -0
- python_github_plus-0.0.1.dist-info/RECORD +0 -7
- {python_github_plus-0.0.1.dist-info → python_github_plus-0.0.2.dist-info}/WHEEL +0 -0
- {python_github_plus-0.0.1.dist-info → python_github_plus-0.0.2.dist-info}/licenses/LICENSE +0 -0
- {python_github_plus-0.0.1.dist-info → python_github_plus-0.0.2.dist-info}/top_level.txt +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
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
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"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
python_github_plus/__init__.py,sha256=MO6TwnFs1o64c3qmWrnFD85RQZ2yHCMoVblkzTsjnRU,225
|
|
2
|
+
python_github_plus/github_plus.py,sha256=LhwvazEO7qz4BenLgwtu2HqwtP5H7XUwZFPt5cWPBlA,12072
|
|
3
|
+
python_github_plus-0.0.2.dist-info/licenses/LICENSE,sha256=cSikHY6SZFsPZSBizCDAJ0-Bjjzxt-JtX6TVbKxwimo,1067
|
|
4
|
+
python_github_plus-0.0.2.dist-info/METADATA,sha256=792ATBVtZKrbkOTyLUFVdc_-aPGIbn8wGd5tsRbDvy8,6626
|
|
5
|
+
python_github_plus-0.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
+
python_github_plus-0.0.2.dist-info/top_level.txt,sha256=lm_rQAamcpxcN00h3Thamd05_z5PdTfy-RVSuCpN_xA,19
|
|
7
|
+
python_github_plus-0.0.2.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
python_github_plus/__init__.py,sha256=MO6TwnFs1o64c3qmWrnFD85RQZ2yHCMoVblkzTsjnRU,225
|
|
2
|
-
python_github_plus/github_plus.py,sha256=1wfLgbM60HSPkHb6lNU_aS5fSO-LzcUO4LH6otEo30c,12078
|
|
3
|
-
python_github_plus-0.0.1.dist-info/licenses/LICENSE,sha256=cSikHY6SZFsPZSBizCDAJ0-Bjjzxt-JtX6TVbKxwimo,1067
|
|
4
|
-
python_github_plus-0.0.1.dist-info/METADATA,sha256=4LJcwAx0vRd4QQDV7aThFEV04n-scFpH3VoW54DVgz4,6636
|
|
5
|
-
python_github_plus-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
-
python_github_plus-0.0.1.dist-info/top_level.txt,sha256=lm_rQAamcpxcN00h3Thamd05_z5PdTfy-RVSuCpN_xA,19
|
|
7
|
-
python_github_plus-0.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|