Skip to content

Commit

Permalink
fix: address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-sentry committed Jun 17, 2024
1 parent 96ed4e6 commit e5f9f17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion codecov_cli/services/commit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def create_commit_logic(
def send_commit_data(
commit_sha, parent_sha, pr, branch, slug, token, service, enterprise_url
):
tokenless = os.environ.get
tokenless = os.environ.get("TOKENLESS")
if tokenless:
headers = None # type: ignore
branch = tokenless # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion tests/services/commit/test_commit_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_commit_sender_with_forked_repo(mocker):
return_value=mocker.MagicMock(status_code=200, text="success"),
)

mocker.patch("os.environ.get", "user_forked_repo/codecov-cli:branch")
mocker.patch("os.environ", dict(TOKENLESS="user_forked_repo/codecov-cli:branch"))
res = send_commit_data(
"commit_sha",
"parent_sha",
Expand Down

0 comments on commit e5f9f17

Please sign in to comment.