validate repo name format: owner/repo
| 54 | |
| 55 | // validate repo name format: owner/repo |
| 56 | static bool validate_repo_name(const std::string & repo) { |
| 57 | static const std::regex repo_regex(R"(^[A-Za-z0-9_.\-]+\/[A-Za-z0-9_.\-]+$)"); |
| 58 | return std::regex_match(repo, repo_regex); |
| 59 | } |
| 60 | |
| 61 | static std::string get_manifest_path(const std::string & repo, const std::string & tag) { |
| 62 | // we use "=" to avoid clashing with other component, while still being allowed on windows |