From 873c966ce718f6b3a5c15fb03e8e2fa894a2545a Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Wed, 17 Jun 2020 21:38:51 +0200 Subject: [PATCH 1/2] Rename a function --- taskboot/config.py | 8 ++++---- taskboot/git.py | 2 +- taskboot/github.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/taskboot/config.py b/taskboot/config.py index 8cb2e0b..eaa64a4 100644 --- a/taskboot/config.py +++ b/taskboot/config.py @@ -82,11 +82,11 @@ def has_pypi_auth(self): return False return "username" in pypi and "password" in pypi - def has_github_auth(self): - github = self.config.get("github") - if github is None: + def has_git_auth(self): + git = self.config.get("github") + if git is None: return False - return "token" in github + return "token" in git def has_cargo_auth(self): cargo = self.config.get("cargo") diff --git a/taskboot/git.py b/taskboot/git.py index 3b0485a..132cf7f 100644 --- a/taskboot/git.py +++ b/taskboot/git.py @@ -18,7 +18,7 @@ def git_push(target, args): # Load config from file/secret config = Configuration(args) - assert config.has_github_auth(), "Missing GitHub authentication" + assert config.has_git_auth(), "Missing Git authentication" # Set remote repository repo_link = "https://{}:{}@{}.git".format( diff --git a/taskboot/github.py b/taskboot/github.py index a3f444e..1f602f8 100644 --- a/taskboot/github.py +++ b/taskboot/github.py @@ -74,7 +74,7 @@ def github_release(target, args): # Load config from file/secret config = Configuration(args) - assert config.has_github_auth(), "Missing Github authentication" + assert config.has_git_auth(), "Missing Github authentication" # Check if local or dependent task assets are used if args.local_asset is None: From 1a89cf121ea6a0f003afdf6edd9d99adcd1dca88 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Wed, 17 Jun 2020 23:31:48 +0200 Subject: [PATCH 2/2] Fix wrong name --- taskboot/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskboot/config.py b/taskboot/config.py index eaa64a4..48ae367 100644 --- a/taskboot/config.py +++ b/taskboot/config.py @@ -83,7 +83,7 @@ def has_pypi_auth(self): return "username" in pypi and "password" in pypi def has_git_auth(self): - git = self.config.get("github") + git = self.config.get("git") if git is None: return False return "token" in git