From bf1c0d50554ebba1fc7ac8a8d1675dee0a79667c Mon Sep 17 00:00:00 2001 From: Yannic Staudt Date: Thu, 29 Feb 2024 15:14:44 +0100 Subject: [PATCH] :wrench: making tests easier to run by relying on less environment variables --- .github/workflows/ci.yml | 2 -- test/gh-branches.cpp | 5 +---- test/gh-releases.cpp | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f20cf45..98404d25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,6 @@ jobs: env: GH_USER: nxxmgh GH_PASS: ${{ secrets.USER_PAT_NXXMGH_TOKEN_FOR_GH }} - GH_RELEASE_TEST_REPO_OWNER: tipibuild - GH_RELEASE_TEST_REPO_NAME: test-gh-client-release steps: - name: checkout uses: actions/checkout@v2 diff --git a/test/gh-branches.cpp b/test/gh-branches.cpp index 4ec27ad9..4fe19a1a 100644 --- a/test/gh-branches.cpp +++ b/test/gh-branches.cpp @@ -21,10 +21,7 @@ int main(int argc, char** argv) { }, auth); // a repo with branch protections - std::string repo_owner = std::getenv("GH_RELEASE_TEST_REPO_OWNER"); - std::string repo_name = std::getenv("GH_RELEASE_TEST_REPO_NAME"); - - gh::list_branches(repo_owner, repo_name, [&](gh::repos::branches&& branches) { + gh::list_branches("tipibuild", "test-gh-client-release", [&](gh::repos::branches&& branches) { auto findit = std::find_if(branches.begin(), branches.end(), [](gh::repos::branch_t& b) { return b.is_protected; }); diff --git a/test/gh-releases.cpp b/test/gh-releases.cpp index 01450cfe..8e1b9cce 100644 --- a/test/gh-releases.cpp +++ b/test/gh-releases.cpp @@ -91,8 +91,8 @@ int main(int argc, char** argv) { // testing the release creation { - std::string repo_owner = std::getenv("GH_RELEASE_TEST_REPO_OWNER"); - std::string repo_name = std::getenv("GH_RELEASE_TEST_REPO_NAME"); + std::string repo_owner = "tipibuild"; + std::string repo_name = "test-gh-client-release"; std::stringstream release_tag_ss; release_tag_ss << "test-" << std::time(0);