Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitvinnakota-codecov committed Sep 19, 2024
2 parents 6e33f73 + 10fdd12 commit 38f419e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/integrations/codecov/codecov_client.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import requests

#TODO: Look into supertoken, fetch actual token

SUPERTOKEN = 'A98FAA96-BFD2-486F-AD4C-217F91CF8A3D'
CODECOV_TOKEN = 'FETCH FROM ENV'
class CodecovClient:
@staticmethod
def fetch_coverage(owner_username, repo_name, pullid, token=SUPERTOKEN):
def fetch_coverage(owner_username, repo_name, pullid, token=CODECOV_TOKEN):
url = f"https://api.codecov.io/api/v2/github/{owner_username}/repos/{repo_name}/pulls/{pullid}"
headers = {
"Authorization": f"Bearer {token}",
Expand All @@ -18,7 +17,7 @@ def fetch_coverage(owner_username, repo_name, pullid, token=SUPERTOKEN):
response.raise_for_status()

@staticmethod
def fetch_test_results_for_commit(owner_username, repo_name, latest_commit_sha, token=SUPERTOKEN):
def fetch_test_results_for_commit(owner_username, repo_name, latest_commit_sha, token=CODECOV_TOKEN):
url = f"https://api.codecov.io/api/v2/github/{owner_username}/repos/{repo_name}/test-results"
headers = {
"Authorization": f"Bearer {token}",
Expand Down

0 comments on commit 38f419e

Please sign in to comment.