From 983f68df7616264d97c7fcfd0cc439f87d02cfc7 Mon Sep 17 00:00:00 2001 From: pseusys Date: Sat, 11 Mar 2023 22:58:28 +0100 Subject: [PATCH] docs and default env file updated --- .env.example | 1 + sources/manager_github.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index c5a72fe..f46d827 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,7 @@ INPUT_WAKATIME_API_KEY=YOUR_WAKATIME_API_KEY INPUT_GH_TOKEN=YOUR_GITHUB_TOKEN_KEY INPUT_PUSH_BRANCH_NAME=main +INPUT_PULL_BRANCH_NAME=main INPUT_SECTION_NAME=waka INPUT_SHOW_TIMEZONE=True INPUT_SHOW_PROJECTS=True diff --git a/sources/manager_github.py b/sources/manager_github.py index e7d652d..89199f7 100644 --- a/sources/manager_github.py +++ b/sources/manager_github.py @@ -77,9 +77,10 @@ class GitHubManager: @staticmethod def branch(requested_branch: str) -> str: """ - Gets name of branch to commit to specified by environmental variables. - It is the default branch (regularly, 'main' or 'master') or a branch specified by user. + Gets requested branch name or the default branch name if requested branch wasn't found. + The default branch name is regularly, 'main' or 'master'. + :param requested_branch: Requested branch name. :returns: Commit author. """ return GitHubManager.REMOTE.default_branch if requested_branch == "" else requested_branch