Skip to content

Commit 5deaad3

Browse files
committed
contributors parser implimented
1 parent f2fd9b4 commit 5deaad3

File tree

1 file changed

+73
-15
lines changed

1 file changed

+73
-15
lines changed

main.py

Lines changed: 73 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,83 @@ def parse_args():
1515
parser = argparse.ArgumentParser()
1616
parser.add_argument("--invites", help="print pending invites", action="store_true")
1717
parser.add_argument("-c", "--commits", help="log commits", action="store_true")
18-
parser.add_argument("-p", "--pull_requests", help="log pull requests", action="store_true")
18+
parser.add_argument(
19+
"-p", "--pull_requests", help="log pull requests", action="store_true"
20+
)
1921
parser.add_argument("-i", "--issues", help="log issues", action="store_true")
2022
parser.add_argument("-w", "--wikis", help="log wikis", action="store_true")
2123
parser.add_argument("--contributors", help="log contributors", action="store_true")
22-
parser.add_argument("--forks_include", help="logging data from forks", action="store_true")
23-
parser.add_argument("-e", "--export_google_sheets", help="export table to google sheets", action="store_true")
24-
parser.add_argument('-t', '--token', type=str, required=True, help='token github account')
25-
parser.add_argument('-l', '--list', type=str, required=True, help='Path to the file containing the list of repositories. Repositories should be separated by a line break. Names should be in the format <organization or owner>/<name> ')
26-
parser.add_argument("--download_repos", type=str, help="path to downloaded repositories", default='./')
24+
parser.add_argument(
25+
"--forks_include", help="logging data from forks", action="store_true"
26+
)
27+
parser.add_argument(
28+
"-e",
29+
"--export_google_sheets",
30+
help="export table to google sheets",
31+
action="store_true",
32+
)
33+
parser.add_argument(
34+
'-t', '--token', type=str, required=True, help='token github account'
35+
)
36+
parser.add_argument(
37+
'-l',
38+
'--list',
39+
type=str,
40+
required=True,
41+
help='Path to the file containing the list of repositories. Repositories should be separated by a line break. Names should be in the format <organization or owner>/<name> ',
42+
)
43+
parser.add_argument(
44+
"--download_repos",
45+
type=str,
46+
help="path to downloaded repositories",
47+
default='./',
48+
)
2749
parser.add_argument('-o', '--out', type=str, required=True, help='output filename')
28-
parser.add_argument("--pr_comments", help="log comments for PR", action="store_true")
29-
parser.add_argument('-s', '--start', type=str, required=False, help='start time', default='2000/01/01-00:00:00')
30-
parser.add_argument('-f', '--finish', type=str, required=False, help='finish time', default='2400/01/01-00:00:00')
31-
parser.add_argument('-b', '--branch', type=str, required=False, help='branch to select commits, by default use "default" repository branch, use "all" to get all commits from all branches', default=None)
32-
parser.add_argument('--google_token', type=str, required=False, help='Specify path to google token file')
33-
parser.add_argument('--table_id', type=str, required=False,
34-
help='Specify Google sheet document id (can find in url)')
35-
parser.add_argument('--sheet_id', type=str, required=False,
36-
help='Specify title for a sheet in a document in which data will be printed')
50+
parser.add_argument(
51+
"--pr_comments", help="log comments for PR", action="store_true"
52+
)
53+
parser.add_argument(
54+
'-s',
55+
'--start',
56+
type=str,
57+
required=False,
58+
help='start time',
59+
default='2000/01/01-00:00:00',
60+
)
61+
parser.add_argument(
62+
'-f',
63+
'--finish',
64+
type=str,
65+
required=False,
66+
help='finish time',
67+
default='2400/01/01-00:00:00',
68+
)
69+
parser.add_argument(
70+
'-b',
71+
'--branch',
72+
type=str,
73+
required=False,
74+
help='branch to select commits, by default use "default" repository branch, use "all" to get all commits from all branches',
75+
default=None,
76+
)
77+
parser.add_argument(
78+
'--google_token',
79+
type=str,
80+
required=False,
81+
help='Specify path to google token file',
82+
)
83+
parser.add_argument(
84+
'--table_id',
85+
type=str,
86+
required=False,
87+
help='Specify Google sheet document id (can find in url)',
88+
)
89+
parser.add_argument(
90+
'--sheet_id',
91+
type=str,
92+
required=False,
93+
help='Specify title for a sheet in a document in which data will be printed',
94+
)
3795
args = parser.parse_args()
3896

3997
if args.export_google_sheets:

0 commit comments

Comments
 (0)