Skip to content
Merged
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
5 changes: 1 addition & 4 deletions spec/workflow_reuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"""

import argparse
import base64
import difflib
import re
import sys
Expand Down Expand Up @@ -68,9 +67,7 @@ def fetch_dir(slug, path, ref):
def fetch(slug, path, ref):
"""Decoded downstream file content, or None if absent / not inline."""
content = audit.gh(f"repos/{slug}/contents/{path}?ref={ref}", ok404=True)
if content is None or content.get("encoding") != "base64":
return None
return base64.b64decode(content["content"]).decode("utf-8", "replace")
return audit.contents_text(content)


def norm_lines(text):
Expand Down
Loading