mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
branch_changer: distinguish terminal output
maintainer-scripts/ChangeLog: * branch_changer.py: Generate URL only when emitting to terminal.
This commit is contained in:
parent
a0bb9b3b9d
commit
7d7481ecbc
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user