Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ alias dv := dynaconf-validate
@setup-ruff:
uv tool install ruff

test:
@echo {{ justfile_directory() }}

@cc:
@cache:
uv clean cache

@build:
@build-local:
uv build

@publish:
@publish-local:
uv publish --token $PYPI_TOKEN

@sync:
uv sync

@lint:
ruff check .

Expand All @@ -36,3 +36,6 @@ test:

@dynaconf-validate:
dynaconf -i github_rest_cli.config.settings validate

test:
@echo {{ justfile_directory() }}
10 changes: 5 additions & 5 deletions src/github_rest_cli/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def create_repository(name: str, visibility: str, org: str = None):
url,
headers=headers,
json=data,
success_msg=f"Repository successfully created in {owner or org }/{name}",
success_msg=f"Repository successfully created in {org or owner}/{name}.",
error_msg={
401: "Unauthorized access. Please check your token or credentials.",
422: "Repository name already exists on this account or organization.",
Expand All @@ -106,7 +106,7 @@ def delete_repository(name: str, org: str = None):
"DELETE",
url,
headers=headers,
success_msg=f"Repository sucessfully deleted in {owner or org}/{name}",
success_msg=f"Repository sucessfully deleted in {org or owner}/{name}.",
error_msg={
403: "The authenticated user does not have sufficient permissions to delete this repository.",
404: "The requested repository does not exist.",
Expand Down Expand Up @@ -162,7 +162,7 @@ def dependabot_security(name: str, enabled: bool, org: str = None):
"DELETE",
url=full_url,
headers=headers,
success_msg=f"Dependabot has been disabled on repository {owner or org}/{name}.",
success_msg=f"Dependabot has been disabled on repository {org or owner}/{name}.",
error_msg={401: "Unauthorized. Please check your credentials."},
)

Expand All @@ -180,8 +180,8 @@ def deployment_environment(name: str, env: str, org: str = None):
"PUT",
url,
headers=headers,
success_msg=f"Environment {env} has been created successfully in {owner or org}/{name}.",
success_msg=f"Environment {env} has been created successfully in {org or owner}/{name}.",
error_msg={
422: f"Failed to create repository enviroment {owner or org}/{name}"
422: f"Failed to create repository enviroment {owner or org}/{name}."
},
)
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.