diff options
author | Kevin Quick <kquick@galois.com> | 2020-09-25 08:09:56 -0700 |
---|---|---|
committer | Kevin Quick <kquick@galois.com> | 2020-09-25 08:09:56 -0700 |
commit | 5a35cc29bffc88b88f883dfcdd1bb251eab53ecd (patch) | |
tree | 8061fea78f97713b539cedf640e638cf7870a65c /src/libfetchers | |
parent | ef2a14be190f7162e85e9bdd44dd45bd9ddfe391 (diff) |
Re-add support for github-access-token, but mark as deprecated.
Diffstat (limited to 'src/libfetchers')
-rw-r--r-- | src/libfetchers/github.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libfetchers/github.cc b/src/libfetchers/github.cc index 0e0655367..443644639 100644 --- a/src/libfetchers/github.cc +++ b/src/libfetchers/github.cc @@ -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; } |