Skip to content

Commit 8693edb

Browse files
committed
Changed output messages.
1 parent c7b52ab commit 8693edb

2 files changed

Lines changed: 31 additions & 13 deletions

File tree

github_deploy/commands/delete.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,20 @@ async def handle_file_delete(
116116
)
117117

118118
if delete_response:
119-
return "Successfully deleted contents at {repo}/{dest}".format(
120-
repo=repo,
121-
dest=dest,
119+
return click.style(
120+
"Successfully deleted contents at {repo}/{dest}".format(
121+
repo=repo,
122+
dest=dest,
123+
),
124+
fg="green",
125+
bold=True,
122126
)
123127

124-
return "No content found at {repo}/{dest}".format(repo=repo, dest=dest)
128+
return click.style(
129+
"No content found at {repo}/{dest}".format(repo=repo, dest=dest),
130+
fg="blue",
131+
bold=True,
132+
)
125133

126134

127135
async def list_repos(*, session, org, token):
@@ -214,7 +222,7 @@ async def main(org, token, dest):
214222
err=True,
215223
)
216224
else:
217-
click.echo(click.style(result, fg="green", bold=True))
225+
click.echo(result)
218226

219227

220228
if __name__ == "__main__":

github_deploy/commands/upload.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,14 @@ async def handle_file_upload(
113113
exists = current_sha is not None
114114

115115
if exists and not overwrite:
116-
return "Skipped uploading {source} to {repo}: Found an existing copy.".format(
117-
source=source, repo=repo
116+
return click.style(
117+
"Skipped uploading {source} to {repo}/{path}: Found an existing copy.".format(
118+
source=source,
119+
repo=repo,
120+
path=dest,
121+
),
122+
fg="blue",
123+
bold=True
118124
)
119125

120126
else:
@@ -141,10 +147,14 @@ async def handle_file_upload(
141147
)
142148

143149
if upload_response:
144-
return "Successfully uploaded '{source}' to {repo}/{dest}".format(
145-
source=upload_response["content"]["name"],
146-
repo=repo,
147-
dest=upload_response["content"]["path"],
150+
return click.style(
151+
"Successfully uploaded '{source}' to {repo}/{dest}".format(
152+
source=upload_response["content"]["name"],
153+
repo=repo,
154+
dest=upload_response["content"]["path"],
155+
),
156+
fg="green",
157+
bold=True
148158
)
149159

150160

@@ -185,7 +195,7 @@ async def list_repos(*, session, org, token):
185195
)
186196
@click.option(
187197
"--overwrite/--no-overwrite",
188-
prompt=click.style("Should we overwrite existing contents at this path", fg="cyan"),
198+
prompt=click.style("Should we overwrite existing contents at this path", fg="blue"),
189199
help="Overwrite existing files.",
190200
default=False,
191201
)
@@ -268,7 +278,7 @@ async def main(org, token, source, dest, overwrite):
268278
err=True,
269279
)
270280
else:
271-
click.echo(click.style(result, fg="green", bold=True))
281+
click.echo(result)
272282

273283

274284
if __name__ == "__main__":

0 commit comments

Comments
 (0)