Skip to content

Commit

Permalink
Add: Doc to cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalholthaus authored and bjoernricks committed Oct 19, 2022
1 parent aaa8f0a commit 12507a8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pontos/github/cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,25 @@
from pontos.terminal import Terminal


def release(terminal: Terminal, args: Namespace):
def release(terminal: Terminal, args: Namespace) -> None:
"""Github release function for argument class to call"""

args.re_func(terminal, args)


def create_release(terminal: Terminal, args: Namespace):
def create_release(terminal: Terminal, args: Namespace) -> None:
"""Github create release function for
argument class to call"""

git = GitHubRESTApi(token=args.token)

try:
# check if release exist
if not git.release_exists(repo=args.repo, tag=args.tag):
# Check if release exist
if git.release_exists(repo=args.repo, tag=args.tag):
terminal.error(f"Release {args.tag} exist.")
sys.exit(1)

# Create release
git.create_release(
repo=args.repo,
tag=args.tag,
Expand Down

0 comments on commit 12507a8

Please sign in to comment.