Skip to content

Commit fd88cf7

Browse files
authored
Merge branch 'main' into signal/detect-type
2 parents d0f4ed1 + 64aefb4 commit fd88cf7

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

.github/workflows/ci.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040

4141
- name: Upload coverage
4242
uses: codecov/codecov-action@v3
43+
if: matrix.os == 'ubuntu-latest'
4344
with:
4445
env_vars: OS
4546

autobuild/autobuild_tool_install.py

+4
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ def download_package(package_url: str, timeout=120, creds=None, package_name="")
201201
token_var = CREDENTIAL_ENVVARS[creds]
202202
except KeyError:
203203
logger.warning(f"Unrecognized creds={creds} value")
204+
205+
if creds == "github":
206+
# Request octet-stream if creds=github, or else we'll get a JSON response back
207+
req.add_unredirected_header("Accept", "application/octet-stream")
204208

205209
token = os.environ.get(token_var)
206210
if token:

tests/test_install.py

+1
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,7 @@ def test_download_github(self, mock_urlopen: MagicMock):
762762
mock_urlopen.assert_called()
763763
got_req = mock_urlopen.mock_calls[0].args[0]
764764
self.assertEqual(got_req.unredirected_hdrs["Authorization"], "Bearer token-123")
765+
self.assertEqual(got_req.unredirected_hdrs["Accept"], "application/octet-stream")
765766

766767
@patch("urllib.request.urlopen")
767768
def test_download_gitlab(self, mock_urlopen: MagicMock):

0 commit comments

Comments
 (0)