-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse_command_line_arguments.py
More file actions
41 lines (35 loc) · 1.11 KB
/
Copy pathparse_command_line_arguments.py
File metadata and controls
41 lines (35 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""Parsing command line arguments when running main module."""
import argparse
def parse_command_line_arguments(args):
parser = argparse.ArgumentParser()
parser.add_argument(
"repository_name",
help="""
Name of the github repository you are creating a release pull request for.
For example, org-name/repo-name
""",
)
parser.add_argument(
"pull_request_creator",
help="Github username of user creating the pull request.",
)
parser.add_argument(
"github_token",
help="Personal access token with required permissions for creating release.",
)
parser.add_argument(
"--develop-branch",
default="develop",
help="Name of the branch you are merging from.",
)
parser.add_argument(
"--master-branch",
default="master",
help="Name of the branch that you are merging into.",
)
parser.add_argument(
"--release-branch-prefix",
default="release",
help="Prefix of the release branch which will merge into master.",
)
return parser.parse_args(args)