Skip to content

Commit

Permalink
🔥 Drops dead helper functions
Browse files Browse the repository at this point in the history
These functions are not longer used, refs #8
  • Loading branch information
AndreMiras committed Dec 1, 2020
1 parent 501c024 commit 11f538f
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,6 @@ def run_coveralls(repo_token, parallel=False, flag_name=False, base_path=False):
log.info(result["url"])


def get_github_sha():
"""e.g. ffac537e6cbbf934b08745a378932722df287a53"""
return os.environ.get("GITHUB_SHA")


def get_github_ref():
"""
The branch or tag ref that triggered the workflow.
For example, refs/heads/feature-branch-1.
If neither a branch or tag is available for the variable will not exist.
- for pull_request events: refs/pull/<pull_request_number>/merge
- for push event: refs/heads/<branch>
https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
"""
return os.environ.get("GITHUB_REF")


def get_github_repository():
"""e.g. octocat/Hello-World"""
return os.environ.get("GITHUB_REPOSITORY")
Expand All @@ -99,18 +82,6 @@ def get_github_run_id():
return os.environ.get("GITHUB_RUN_ID")


def get_pull_request_number(github_ref):
"""
>>> get_pull_request_number("refs/pull/<pull_request_number>/merge")
"<pull_request_number>"
"""
return github_ref.split("/")[2]


def is_pull_request(github_ref):
return github_ref and github_ref.startswith("refs/pull/")


def post_webhook(repo_token):
"""https://docs.coveralls.io/parallel-build-webhook"""
url = "https://coveralls.io/webhook"
Expand Down

0 comments on commit 11f538f

Please sign in to comment.