diff --git a/src/manager/agents/common-module/constants/command_constants.cpp b/src/manager/agents/common-module/constants/command_constants.cpp index f424690..3d6d3ee 100644 --- a/src/manager/agents/common-module/constants/command_constants.cpp +++ b/src/manager/agents/common-module/constants/command_constants.cpp @@ -14,8 +14,6 @@ std::string const GitHubConstants::GIT_CLONE = "git clone"; std::string const GitHubConstants::RAW_GITHUB_PREFIX = "https://raw.githubusercontent.com/"; std::string const GitHubConstants::GITHUB_PREFIX = "https://github.com/"; std::string const GitHubConstants::TREE = "tree"; -std::string const GitHubConstants::CURL_GET_BRANCH_COMMAND = - "curl -s -H \"Accept: application/vnd.github.v3+json\" https://api.github.com/repos/"; std::string const GitHubConstants::GREP_DEFAULT_BRANCH_COMMAND = R"( | grep -w "default_branch" | cut -d ":" -f 2 | tr -d '," ')"; std::string const GitHubConstants::GITHUB_DOWNLOAD_FILE_COMMAND_PREFIX = diff --git a/src/manager/agents/common-module/constants/command_constants.hpp b/src/manager/agents/common-module/constants/command_constants.hpp index 48105a7..db6561a 100644 --- a/src/manager/agents/common-module/constants/command_constants.hpp +++ b/src/manager/agents/common-module/constants/command_constants.hpp @@ -39,7 +39,6 @@ class GitHubConstants static std::string const RAW_GITHUB_PREFIX; static std::string const GITHUB_PREFIX; static std::string const TREE; - static std::string const CURL_GET_BRANCH_COMMAND; static std::string const GREP_DEFAULT_BRANCH_COMMAND; static std::string const GITHUB_DOWNLOAD_FILE_COMMAND_PREFIX; static std::string const GITHUB_GET_DEFAULT_BRANCH_COMMAND_PREFIX; diff --git a/src/manager/agents/common-module/downloader/downloader_git.hpp b/src/manager/agents/common-module/downloader/downloader_git.hpp index d3d4137..a392682 100644 --- a/src/manager/agents/common-module/downloader/downloader_git.hpp +++ b/src/manager/agents/common-module/downloader/downloader_git.hpp @@ -124,8 +124,8 @@ class DownloaderGit : public Downloader static std::string GetDefaultBranch(std::string const & username, std::string const & repositoryName) { std::stringstream query; - query << GitHubConstants::GITHUB_GET_DEFAULT_BRANCH_COMMAND_PREFIX << GitHubConstants::CURL_GET_BRANCH_COMMAND - << username << SpecificationConstants::DIRECTORY_DELIMITER << repositoryName + query << GitHubConstants::GITHUB_GET_DEFAULT_BRANCH_COMMAND_PREFIX << username + << SpecificationConstants::DIRECTORY_DELIMITER << repositoryName << GitHubConstants::GREP_DEFAULT_BRANCH_COMMAND; ScExec exec{{query.str()}};