MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / setup_github_parser

Function setup_github_parser

scripts/agents/devops/src/cli.py:173–200  ·  view source on GitHub ↗

Set up the argument parser for GitHub commands.

(subparsers)

Source from the content-addressed store, hash-verified

171
172
173def setup_github_parser(subparsers):
174 """Set up the argument parser for GitHub commands."""
175 github_parser = subparsers.add_parser('github', help='GitHub operations')
176 github_subparsers = github_parser.add_subparsers(dest='github_command', help='GitHub command')
177
178 # List repositories command
179 list_repos_parser = github_subparsers.add_parser('list-repos', help='List GitHub repositories')
180 list_repos_parser.add_argument('--org', help='GitHub organization')
181 list_repos_parser.add_argument('--user', help='GitHub username')
182 list_repos_parser.add_argument('--output', choices=['json', 'table'], default='table', help='Output format')
183
184 # Get repository command
185 get_repo_parser = github_subparsers.add_parser('get-repo', help='Get GitHub repository details')
186 get_repo_parser.add_argument('repo', help='Repository name or full path (owner/repo)')
187 get_repo_parser.add_argument('--owner', help='Repository owner')
188 get_repo_parser.add_argument('--output', choices=['json', 'table'], default='table', help='Output format')
189
190 # Get README command
191 get_readme_parser = github_subparsers.add_parser('get-readme', help='Get README from GitHub repository')
192 get_readme_parser.add_argument('repo', help='Repository name or full path (owner/repo)')
193 get_readme_parser.add_argument('--owner', help='Repository owner')
194 get_readme_parser.add_argument('--ref', help='Git reference (branch, tag, commit)')
195
196 # List branches command
197 list_branches_parser = github_subparsers.add_parser('list-branches', help='List branches in GitHub repository')
198 list_branches_parser.add_argument('repo', help='Repository name or full path (owner/repo)')
199 list_branches_parser.add_argument('--owner', help='Repository owner')
200 list_branches_parser.add_argument('--output', choices=['json', 'table'], default='table', help='Output format')
201
202
203def setup_deploy_parser(subparsers):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected