Skip to content

Commit

Permalink
ignore open prs by default
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rc1e committed Oct 6, 2023
1 parent c5381b6 commit b5d48a9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/gftools/scripts/manage_traffic_jam.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ def display_item(self, push_item: PushItem):
pprint(res)

def update_server(self, push_item: PushItem, servers: GFServers):
if not push_item.merged:
return
item = push_item.item()
if item == None:
log.warning(f"Cannot update server for {push_item}.")
Expand Down Expand Up @@ -167,6 +169,9 @@ def main(args=None):
parser.add_argument(
"-f", "--filter", choices=(None, "lists", "in_dev", "in_sandbox"), default=None
)
parser.add_argument(
"-p", "--show-open-prs", action="store_true", default=False
)
parser.add_argument("-s", "--server-data", default=(Path("~") / ".gf_server_data.json").expanduser())
args = parser.parse_args(args)

Expand All @@ -183,6 +188,8 @@ def main(args=None):
os.chdir(args.fonts_repo)

push_items = PushItems.from_traffic_jam()
if not args.show_open_prs:
push_items = PushItems(i for i in push_items if i.merged == True)
if args.filter == "lists":
prod_path = args.fonts_repo / "to_production.txt"
production_file = PushItems.from_server_file(prod_path, PushStatus.IN_SANDBOX)
Expand Down

0 comments on commit b5d48a9

Please sign in to comment.