forked from lix-project/lix
Remove github-access-token in favor of access-token.
This commit is contained in:
parent
66c3959e8c
commit
5e7838512e
|
@ -147,17 +147,7 @@ struct GitArchiveInputScheme : InputScheme
|
||||||
auto tokens = settings.accessTokens.get();
|
auto tokens = settings.accessTokens.get();
|
||||||
auto pat = tokens.find(host);
|
auto pat = tokens.find(host);
|
||||||
if (pat == tokens.end())
|
if (pat == tokens.end())
|
||||||
{
|
|
||||||
if ("github.com" == host)
|
|
||||||
{
|
|
||||||
auto oldcfg = settings.githubAccessToken.get();
|
|
||||||
if (!oldcfg.empty()) {
|
|
||||||
warn("using deprecated 'github-access-token' config value; please use 'access-tokens' instead");
|
|
||||||
return oldcfg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
|
||||||
return pat->second;
|
return pat->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -859,9 +859,6 @@ public:
|
||||||
are loaded as plugins (non-recursively).
|
are loaded as plugins (non-recursively).
|
||||||
)"};
|
)"};
|
||||||
|
|
||||||
Setting<std::string> githubAccessToken{this, "", "github-access-token",
|
|
||||||
"GitHub access token to get access to GitHub data through the GitHub API for `github:<..>` flakes (deprecated, please use 'access-tokens' instead)."};
|
|
||||||
|
|
||||||
Setting<StringMap> accessTokens{this, {}, "access-tokens",
|
Setting<StringMap> accessTokens{this, {}, "access-tokens",
|
||||||
R"(
|
R"(
|
||||||
Access tokens used to access protected GitHub, GitLab, or
|
Access tokens used to access protected GitHub, GitLab, or
|
||||||
|
|
Loading…
Reference in a new issue