Skip to content

Commit 8541cbb

Browse files
authored
Merge branch 'main' into 44-chore-load-github-json-and-updated-js-search
Signed-off-by: dpswirld <diogo.pereira@swirldslabs.com>
2 parents 919dea4 + 2cfb8c6 commit 8541cbb

3 files changed

Lines changed: 84 additions & 35 deletions

File tree

current-implemented-CLI.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,27 @@
22

33
## Currently Implemented
44

5+
56
- `include-team` - Include a team to the query
67
- `output-file` - Define the filename and location of the output file
8+
- `output-file` - Define the filename and location of the output file
9+
- `temp-dir` - The temporary directory to write JSON response files
10+
- `include-team` - Include a team to the query
11+
712

813
## To Be Implemented
914

10-
- `include_user` - Include a specific user to the query
11-
- `include_repository` - Include specific repo(s) to the query
12-
- `include_organization_repository` - Include specific org(s) repo(s) to the query
13-
- `include_label` - Include a specific label to the query
14-
- `exclude_organization` - Exclude specific org(s) from the output
15-
- `exclude_repository` - Exclude specific repo(s) from the output
16-
- `exclude_organization_repository` - Exclude specific org(s) repo(s) from the output
17-
- `exclude_user` - Exclude specific user from the output
18-
- `exclude_label` - Exclude issues with specific label from the output
19-
- `publish_board` - Copy output of script to a common board in GitHub by using the GH API
15+
- `include-user` - Include a specific user to the query
16+
- `include-repository` - Include specific repo to the query
17+
- `include-organization` - Include specific org to a query
18+
- `include-organization-repository` - Include specific org/repo to the query
19+
- `include-label` - Include a specific label to the query
20+
21+
- `exclude-team` - Exclude specific team from the output
22+
- `exclude-user` - Exclude specific user from the output
23+
- `exclude-repository` - Exclude specific repo from the output
24+
- `exclude-organization` - Exclude specific org from the output
25+
- `exclude-organization-repository` - Exclude specific org/repo from the output
26+
- `exclude-label` - Exclude issues with specific label from the output
27+
28+
- `publish-board` - Copy output of script to a common board in GitHub by using the GH API

src/static_site_generator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from jinja2 import Environment, FileSystemLoader
22
import logging
33

4+
45
class StaticSiteGenerator():
56

67
def __init__(self):

src/version2config.py

Lines changed: 64 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,15 @@ def init_parser(self):
3434
action="store",
3535
type=str,
3636
default="tmp.dir",
37-
help="The temporary directory to store the json data files",
37+
help="The temporary directory to store the json data files"
38+
)
39+
40+
parser.add_argument(
41+
"--include-team",
42+
dest="include_team",
43+
action="append",
44+
type=str,
45+
help="Include provided teams in the output"
3846
)
3947

4048
parser.add_argument(
@@ -43,7 +51,8 @@ def init_parser(self):
4351
action="append",
4452
type=str,
4553
nargs="+",
46-
help="Include all issues and PRs for the provided user [Required Parameter]",)
54+
help="Include all issues and PRs for the provided user [Required Parameter]"
55+
)
4756

4857
parser.add_argument(
4958
"--include-team",
@@ -66,80 +75,108 @@ def init_parser(self):
6675
dest="include_repository",
6776
action="append",
6877
type=str,
69-
help="Include all issues and PRs from the specified repository",)
78+
help="Include all issues and PRs from the specified repository"
79+
)
80+
81+
parser.add_argument(
82+
"--include-organization",
83+
dest="include_organization",
84+
action="append",
85+
type=str,
86+
help="Include all issues and PRs from the specified organization"
87+
)
7088

7189
parser.add_argument(
7290
"--include-organization-repository",
7391
dest="include_organization_repository",
7492
action="append",
7593
type=str,
76-
help="Include all issues and PRs from the specified organization/repository",)
94+
help="Include all issues and PRs from the specified organization/repository"
95+
)
7796

7897
parser.add_argument(
7998
"--include-label",
8099
dest="include_label",
81100
action="append",
82101
type=str,
83-
help="Include all issues and PRs with the specified label",)
102+
help="Include all issues and PRs with the specified label"
103+
)
104+
105+
parser.add_argument(
106+
"--exclude-team",
107+
dest="exclude_team",
108+
action="append",
109+
type=str,
110+
help="Exclude provided teams in the output"
111+
)
84112

85113
parser.add_argument(
86-
"--exclude-organization",
87-
dest="exclude_organization",
114+
"--exclude-user",
115+
dest="exclude_user",
88116
action="append",
89117
type=str,
90-
help="Exclude all issues and PRs from the specified organization",)
118+
help="Exclude all issues and PRs for the provided user"
119+
)
91120

92121
parser.add_argument(
93122
"--exclude-repository",
94123
dest="exclude_repository",
95124
action="append",
96125
type=str,
97-
help="Exclude all issues and PRs from the specified repository",)
126+
help="Exclude all issues and PRs from the specified repository"
127+
)
98128

99129
parser.add_argument(
100-
"--exclude-organization-repository",
101-
dest="exclude_organization_repository",
130+
"--exclude-organization",
131+
dest="exclude_organization",
102132
action="append",
103133
type=str,
104-
help="Exclude all issues and PRs from the specified "
105-
"organization/repository",)
134+
help="Exclude all issues and PRs from the specified organization"
135+
)
106136

107137
parser.add_argument(
108-
"--exclude-user",
109-
dest="exclude_user",
138+
"--exclude-organization-repository",
139+
dest="exclude_organization_repository",
110140
action="append",
111141
type=str,
112-
help="Exclude all issues and PRs for the provided user",)
142+
help="Exclude all issues and PRs from the specified "
143+
"organization/repository"
144+
)
113145

114146
parser.add_argument(
115147
"--exclude-label",
116148
dest="exclude_label",
117149
action="append",
118150
type=str,
119-
help="Exclude all issues and PRs with the specified label",)
151+
help="Exclude all issues and PRs with the specified label"
152+
)
120153

121154
parser.add_argument(
122155
"--publish-board",
123156
dest="publish_board",
124157
action="store_const",
125-
help="The organization/board to publish (add) the collection of GitHub Issues and Pull Requests",)
158+
help="The organization/board to publish (add) the collection of GitHub Issues and Pull Requests"
159+
)
126160

127161
parsed_args = parser.parse_args()
128162

163+
self.output_file = parsed_args.output_file
164+
self.temp_dir = parsed_args.temp_dir
165+
self.include_team = parsed_args.include_team
129166
self.include_user = parsed_args.include_user
130167
self.include_team = parsed_args.include_team
131168
self.include_repository = parsed_args.include_repository
169+
self.include_organization = parsed_args.include_organization
132170
self.include_organization_repository = parsed_args.include_organization_repository
133171
self.include_label = parsed_args.include_label
134-
self.exclude_organization = parsed_args.exclude_organization
172+
self.exclude_team = parsed_args.exclude_team
173+
self.exclude_user = parsed_args.exclude_user
135174
self.exclude_repository = parsed_args.exclude_repository
175+
self.exclude_organization = parsed_args.exclude_organization
136176
self.exclude_organization_repository = parsed_args.exclude_organization_repository
137-
self.exclude_user = parsed_args.exclude_user
138177
self.exclude_label = parsed_args.exclude_label
139178
self.exclude_team = parsed_args.exclude_team
140179
self.publish_board = parsed_args.publish_board
141-
self.output_file = parsed_args.output_file
142-
self.temp_dir = parsed_args.temp_dir
143180

144181
def init_logger(self):
145182
logging.basicConfig(level=self.LOG_LEVEL, format=self.LOG_FORMAT)
@@ -151,15 +188,17 @@ def display_config(self):
151188
logging.info("Configuration:")
152189
logging.info(f"Output File: {self.output_file}")
153190
logging.info(f"Temporary Directory: {self.temp_dir}")
191+
logging.info(f"Include Team: {self.include_team}")
154192
logging.info(f"Include User: {self.include_user}")
155193
logging.info(f"Include Repository: {self.include_repository}")
194+
logging.info(f"Include Organization: {self.include_organization}")
156195
logging.info(f"Include Organization/Repository: {self.include_organization_repository}")
157196
logging.info(f"Include Label: {self.include_label}")
158-
logging.info(f"Include Team: {self.include_team}")
159-
logging.info(f"Exclude Organization: {self.exclude_organization}")
197+
logging.info(f"Exclude Team: {self.exclude_team}")
198+
logging.info(f"Exclude User: {self.exclude_user}")
160199
logging.info(f"Exclude Repository: {self.exclude_repository}")
200+
logging.info(f"Exclude Organization: {self.exclude_organization}")
161201
logging.info(f"Exclude Organization/Repository: {self.exclude_organization_repository}")
162-
logging.info(f"Exclude User: {self.exclude_user}")
163202
logging.info(f"Exclude Label: {self.exclude_label}")
164203
logging.info(f"Exclude Team: {self.exclude_team}")
165204
logging.info(f"Publish Board: {self.publish_board}")

0 commit comments

Comments
 (0)