Skip to content

Commit

Permalink
Added some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
muffato committed Dec 20, 2024
1 parent 7b931f1 commit ec254d0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nf_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,16 @@ def get_repo_releases_branches(pipeline, wfs):


def get_repo_commit(pipeline, commit_id):
"""Check if the repo contains the requested commit_id, and expand it to long form if necessary.
Args:
pipeline (str): GitHub repo username/repo
commit_id: The requested commit ID (SHA). It can be in standard long/short form, or any length.
Returns:
commit_id: String or None
"""

commit_response = gh_api.get(
f"https://api.github.com/repos/{pipeline}/commits/{commit_id}", headers={"Accept": "application/vnd.github.sha"}
)
Expand Down

0 comments on commit ec254d0

Please sign in to comment.