Skip to content

suggested color changes for cherry-picker output #120

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Next Next commit
suggested color changes for cherry-picker output
  • Loading branch information
smontanaro committed Feb 15, 2024
commit 696648d18961586280b3ecee4cf05b83be204be4
15 changes: 8 additions & 7 deletions cherry_picker/cherry_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def cherry_pick(self):
click.echo(self.run_cmd(cmd))
except subprocess.CalledProcessError as err:
click.echo(f"Error cherry-pick {self.commit_sha1}.")
click.echo(err.output)
click.secho(err.output, fg=(128, 128, 128))
raise CherryPickException(f"Error cherry-pick {self.commit_sha1}.")

def get_exit_message(self, branch):
Expand Down Expand Up @@ -387,7 +387,7 @@ def amend_commit_message(self, cherry_pick_branch):
return updated_commit_message

def pause_after_committing(self, cherry_pick_branch):
click.echo(
click.secho(
f"""
Finished cherry-pick {self.commit_sha1} into {cherry_pick_branch} \U0001F600
--no-push option used.
Expand All @@ -397,7 +397,8 @@ def pause_after_committing(self, cherry_pick_branch):

To abort the cherry-pick and cleanup:
$ cherry_picker --abort
"""
""",
fg="red"
)
self.set_paused_state()

Expand Down Expand Up @@ -468,8 +469,8 @@ def open_pr(self, url):
if self.dry_run:
click.echo(f" dry-run: Create new PR: {url}")
else:
click.echo("Backport PR URL:")
click.echo(url)
click.secho("Backport PR URL:", fg="red")
click.secho(url, fg="red")
webbrowser.open_new_tab(url)

def delete_branch(self, branch):
Expand Down Expand Up @@ -530,9 +531,9 @@ def backport(self):
commit_message = self.amend_commit_message(cherry_pick_branch)
except subprocess.CalledProcessError as cpe:
click.echo(cpe.output)
click.echo(self.get_exit_message(maint_branch))
click.secho(self.get_exit_message(maint_branch), fg="red")
except CherryPickException:
click.echo(self.get_exit_message(maint_branch))
click.secho(self.get_exit_message(maint_branch), fg="red")
self.set_paused_state()
raise
else:
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy