docs and default env file updated

This commit is contained in:
pseusys
2023-03-11 22:58:28 +01:00
parent ee1e9dadec
commit 983f68df76
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
INPUT_WAKATIME_API_KEY=YOUR_WAKATIME_API_KEY INPUT_WAKATIME_API_KEY=YOUR_WAKATIME_API_KEY
INPUT_GH_TOKEN=YOUR_GITHUB_TOKEN_KEY INPUT_GH_TOKEN=YOUR_GITHUB_TOKEN_KEY
INPUT_PUSH_BRANCH_NAME=main INPUT_PUSH_BRANCH_NAME=main
INPUT_PULL_BRANCH_NAME=main
INPUT_SECTION_NAME=waka INPUT_SECTION_NAME=waka
INPUT_SHOW_TIMEZONE=True INPUT_SHOW_TIMEZONE=True
INPUT_SHOW_PROJECTS=True INPUT_SHOW_PROJECTS=True

View File

@@ -77,9 +77,10 @@ class GitHubManager:
@staticmethod @staticmethod
def branch(requested_branch: str) -> str: def branch(requested_branch: str) -> str:
""" """
Gets name of branch to commit to specified by environmental variables. Gets requested branch name or the default branch name if requested branch wasn't found.
It is the default branch (regularly, 'main' or 'master') or a branch specified by user. The default branch name is regularly, 'main' or 'master'.
:param requested_branch: Requested branch name.
:returns: Commit author. :returns: Commit author.
""" """
return GitHubManager.REMOTE.default_branch if requested_branch == "" else requested_branch return GitHubManager.REMOTE.default_branch if requested_branch == "" else requested_branch