-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implementation for CLI #35
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9cbecb6
save
jeromy-cannon c75336a
save
jeromy-cannon 319d9e1
save
jeromy-cannon f75280e
save
jeromy-cannon 920f9f3
save
jeromy-cannon c6466b0
save
jeromy-cannon 6607cfb
save
jeromy-cannon fd9fd06
save
jeromy-cannon ab9ef15
save
jeromy-cannon e50d2d5
save
jeromy-cannon c8bc811
save
jeromy-cannon b2286af
save
jeromy-cannon 9f35511
save
jeromy-cannon 76414c1
save
jeromy-cannon 7af0dc0
save
jeromy-cannon 7749e80
Update .gitignore
jeromy-cannon db0fe5a
Update .gitignore
jeromy-cannon 5daa0ff
save
jeromy-cannon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# EditorConfig is awesome: https://editorconfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
max_line_length=120 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jeromy-cannon marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
versiontwo-venv | ||
versiontwo-venv-312 |
jeromy-cannon marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from version_two_config import VersionTwoConfig | ||
|
||
|
||
def main(): | ||
config = VersionTwoConfig() | ||
config.display_config() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
jeromy-cannon marked this conversation as resolved.
Show resolved
Hide resolved
jeromy-cannon marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
import argparse | ||
|
||
|
||
class VersionTwoConfig: | ||
def __init__(self): | ||
parser = argparse.ArgumentParser( | ||
prog='VersionTwo', | ||
description="Render an HTML page from a collection of GitHub Issues and Pull Requests, " | ||
"NOTE: `--include-user GITHUB_USER_ID` is a required parameter", | ||
) | ||
|
||
parser.add_argument( | ||
"--include-user", | ||
dest="include_user", | ||
action="append", | ||
type=str, | ||
nargs="+", | ||
help="Include all issues and PRs for the provided user [Required Parameter]", | ||
required=True,) | ||
|
||
parser.add_argument( | ||
"--include-repository", | ||
dest="include_repository", | ||
action="append", | ||
type=str, | ||
nargs="+", | ||
help="Include all issues and PRs from the specified repository",) | ||
|
||
parser.add_argument( | ||
"--include-organization-repository", | ||
dest="include_organization_repository", | ||
action="append", | ||
type=str, | ||
nargs="+", | ||
help="Include all issues and PRs from the specified organization/repository",) | ||
|
||
parser.add_argument( | ||
"--include-label", | ||
dest="include_label", | ||
action="append", | ||
type=str, | ||
nargs="+", | ||
help="Include all issues and PRs with the specified label",) | ||
|
||
parser.add_argument( | ||
"--exclude-organization", | ||
dest="exclude_organization", | ||
action="append", | ||
type=str, | ||
nargs="+", | ||
help="Exclude all issues and PRs from the specified organization",) | ||
|
||
parser.add_argument( | ||
"--exclude-repository", | ||
dest="exclude_repository", | ||
action="append", | ||
type=str, | ||
nargs="+", | ||
help="Exclude all issues and PRs from the specified repository",) | ||
|
||
parser.add_argument( | ||
"--exclude-organization-repository", | ||
dest="exclude_organization_repository", | ||
action="append", | ||
type=str, | ||
nargs="+", | ||
help="Exclude all issues and PRs from the specified " | ||
"organization/repository",) | ||
|
||
parser.add_argument( | ||
"--exclude-user", | ||
dest="exclude_user", | ||
action="append", | ||
type=str, | ||
nargs="+", | ||
help="Exclude all issues and PRs for the provided user",) | ||
|
||
parser.add_argument( | ||
"--exclude-label", | ||
dest="exclude_label", | ||
action="append", | ||
type=str, | ||
nargs="+", | ||
help="Exclude all issues and PRs with the specified label",) | ||
|
||
parser.add_argument( | ||
"--publish-board", | ||
dest="publish_board", | ||
action="store_const", | ||
help="The organization/board to publish (add) the collection of GitHub Issues and Pull Requests",) | ||
|
||
parsed_args = parser.parse_args() | ||
|
||
self.include_user = parsed_args.include_user | ||
self.include_repository = parsed_args.include_repository | ||
self.include_organization_repository = parsed_args.include_organization_repository | ||
self.include_label = parsed_args.include_label | ||
self.exclude_organization = parsed_args.exclude_organization | ||
self.exclude_repository = parsed_args.exclude_repository | ||
self.exclude_organization_repository = parsed_args.exclude_organization_repository | ||
self.exclude_user = parsed_args.exclude_user | ||
self.exclude_label = parsed_args.exclude_label | ||
self.publish_board = parsed_args.publish_board | ||
|
||
def display_config(self): | ||
print("Configuration:") | ||
print(f"Include Repository: {self.include_repository}") | ||
print(f"Include Organization/Repository: {self.include_organization_repository}") | ||
print(f"Include User: {self.include_user}") | ||
print(f"Include Label: {self.include_label}") | ||
print(f"Exclude Organization: {self.exclude_organization}") | ||
print(f"Exclude Repository: {self.exclude_repository}") | ||
print(f"Exclude Organization/Repository: {self.exclude_organization_repository}") | ||
print(f"Exclude User: {self.exclude_user}") | ||
print(f"Exclude Label: {self.exclude_label}") | ||
print(f"Publish Board: {self.publish_board}") |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.