Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitlab_release_notes/generate.py: Iniitialize ArgumentParser with scr… #2

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions gitlab_release_notes/generate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import gitlab
import os.path
import sys
from .version import __version__

def generate_release_notes(project_id, endstr = ' <br>', **config):
Expand Down Expand Up @@ -67,8 +69,9 @@ def generate_release_notes(project_id, endstr = ' <br>', **config):

def main():
import argparse
parser = argparse.ArgumentParser("Generate release notes for a gitlab repository \
based on merge requests titles since last release")
parser = argparse.ArgumentParser(os.path.basename(sys.argv[0]),
description="Generate release notes for a gitlab repository \
based on merge requests titles since last release")

# Required
parser.add_argument("project_id", type=int)
Expand All @@ -87,6 +90,5 @@ def main():
notes = generate_release_notes(args.project_id, url=args.url, endstr=endstr, private_token=args.private_token)
print(notes)


if __name__ == "__main__":
main()
Loading