Skip to content
Snippets Groups Projects
Commit 7d7481ec authored by Martin Liska's avatar Martin Liska
Browse files

branch_changer: distinguish terminal output

maintainer-scripts/ChangeLog:

	* branch_changer.py: Generate URL only when emitting
	to terminal.
parent a0bb9b3b
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@
import argparse
import json
import re
import sys
import requests
......@@ -83,7 +84,10 @@ class Bug:
def name(self):
bugid = self.data['id']
url = f'https://gcc.gnu.org/bugzilla/show_bug.cgi?id={bugid}'
return f'\u001b]8;;{url}\u001b\\PR{bugid}\u001b]8;;\u001b\\ ({self.data["summary"]})'
if sys.stdout.isatty():
return f'\u001b]8;;{url}\u001b\\PR{bugid}\u001b]8;;\u001b\\ ({self.data["summary"]})'
else:
return f'PR{bugid} ({self.data["summary"]})'
def remove_release(self, release):
self.versions = list(filter(lambda x: x != release, self.versions))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment