mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
Re-add support for github-access-token, but mark as deprecated.
This commit is contained in:
parent
ef2a14be19
commit
5a35cc29bf
2 changed files with 11 additions and 1 deletions
|
@ -146,7 +146,17 @@ struct GitArchiveInputScheme : InputScheme
|
|||
auto tokens = settings.accessTokens.get();
|
||||
auto pat = tokens.find(host);
|
||||
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 pat->second;
|
||||
}
|
||||
|
||||
|
|
|
@ -861,7 +861,7 @@ public:
|
|||
)"};
|
||||
|
||||
Setting<std::string> githubAccessToken{this, "", "github-access-token",
|
||||
"GitHub access token to get access to GitHub data through the GitHub API for `github:<..>` flakes."};
|
||||
"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",
|
||||
R"(
|
||||
|
|
Loading…
Reference in a new issue