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
2 changes: 1 addition & 1 deletion nixpkgs_review/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def print_console(self, pr: int | None) -> None:
if pr is not None:
pr_url = f"https://github.com/NixOS/nixpkgs/pull/{pr}"
info("\nLink to currently reviewing PR:")
Comment on lines 329 to 330
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pr_url = f"https://github.com/NixOS/nixpkgs/pull/{pr}"
info("\nLink to currently reviewing PR:")
info("\nLink to currently reviewing PR:")

link(f"\u001b]8;;{pr_url}\u001b\\{pr_url}\u001b]8;;\u001b\\\n")
link(pr_url)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
link(pr_url)
link(f"https://github.com/NixOS/nixpkgs/pull/{pr}")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rationale for this suggestion being?.. Either way seems fine, so unless there's a strong reason, I'd stick to status-quo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To the python virtual stack machine these two are nearly identical, but the former preserves git blame and may in the future see re-use


for system, report in self.system_reports.items():
info(f"--------- Report for '{system}' ---------")
Expand Down
9 changes: 8 additions & 1 deletion nixpkgs_review/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ def wrapper(text: str) -> None:
warn = color_text(31, file=sys.stderr)
info = color_text(32)
skipped = color_text(33)
link = color_text(34)


def link(text: str) -> None:
f = color_text(34)
if HAS_TTY:
f(f"\u001b]8;;{text}\u001b\\{text}\u001b]8;;\u001b\\\n")
else:
f(text)


def sh(
Expand Down