diff --git a/test/gh-refs.cpp b/test/gh-refs.cpp index 31725637..61e1f553 100644 --- a/test/gh-refs.cpp +++ b/test/gh-refs.cpp @@ -2,6 +2,7 @@ #include #include
+#include "utils.hpp"
 
 int main(int argc, char** argv) {
 
@@ -17,10 +18,7 @@ int main(int argc, char** argv) {
     std::cout << "Successfully retrieved " << refs.size() << " refs from github.com/grpc/grpc - which is a PASS" << std::endl;
   });
 
-  gh::auth auth{ 
-    std::getenv("GH_USER"),
-    std::getenv("GH_PASS")
-  };
+  auto auth = test_utils::get_auth();
 
   gh::get_refs("boostorg", "fusion", gh::filter_refs::TAGS, [](gh::git_data::refs&& tags) {
     std::cout << pre::json::to_json(tags).dump(2) << std::endl;
diff --git a/test/gh-repos.cpp b/test/gh-repos.cpp
index 62469ea3..b9da31e4 100644
--- a/test/gh-repos.cpp
+++ b/test/gh-repos.cpp
@@ -14,10 +14,7 @@ int main(int argc, char** argv) {
     std::cout << pre::json::to_json(r).dump(2) << std::endl;
   });
 
-  gh::auth auth{ 
-    std::getenv("GH_USER"),
-    std::getenv("GH_PASS")
-  };
+  auto auth = test_utils::get_auth();
 
   gh::repos_get("cpp-pre", "json", [](gh::repos::repository_t&& r) {
     std::cout << pre::json::to_json(r).dump(2) << std::endl;