Skip to content

Commit 9b7ffea

Browse files
committed
Remove branch parameter from repository commands as node is branch agnostic
1 parent 2c1ebf5 commit 9b7ffea

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

infrahub_sdk/ctl/repository.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,11 @@ async def add(
6969
name: str,
7070
location: str,
7171
description: str = "",
72-
username: str | None = None,
72+
username: str = "",
7373
password: str = "",
7474
ref: str = "",
7575
read_only: bool = False,
7676
debug: bool = False,
77-
branch: str = typer.Option(None, help="Branch on which to add the repository."),
7877
_: str = CONFIG_PARAM,
7978
) -> None:
8079
"""Add a new repository."""
@@ -111,18 +110,17 @@ async def add(
111110
query={"ok": None},
112111
)
113112

114-
await client.execute_graphql(query=query.render(), branch_name=branch, tracker="mutation-repository-create")
113+
await client.execute_graphql(query=query.render(), tracker="mutation-repository-create")
115114

116115

117116
@app.command()
118117
async def list(
119-
branch: str | None = None,
120118
debug: bool = False,
121119
_: str = CONFIG_PARAM,
122120
) -> None:
123121
init_logging(debug=debug)
124122

125-
client = initialize_client(branch=branch)
123+
client = initialize_client()
126124

127125
repo_status_query = {
128126
"CoreGenericRepository": {
@@ -142,7 +140,7 @@ async def list(
142140
}
143141

144142
query = Query(name="GetRepositoryStatus", query=repo_status_query)
145-
resp = await client.execute_graphql(query=query.render(), branch_name=branch, tracker="query-repository-list")
143+
resp = await client.execute_graphql(query=query.render(), tracker="query-repository-list")
146144

147145
table = Table(title="List of all Repositories")
148146

0 commit comments

Comments
 (0)