mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
fix(ghe): use full path for github datasource
This prevents accidentally querying GHE for things such as Node.js tags. Closes #2518
This commit is contained in:
parent
e66ededcfd
commit
6f0ceaecc5
1 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ async function getPreset(pkgName, presetName = 'default') {
|
|||
}
|
||||
let res;
|
||||
try {
|
||||
const url = `repos/${pkgName}/contents/renovate.json`;
|
||||
const url = `https://api.github.com/repos/${pkgName}/contents/renovate.json`;
|
||||
res = Buffer.from((await ghGot(url)).body.content, 'base64').toString();
|
||||
} catch (err) {
|
||||
logger.debug('Failed to retrieve renovate.json from repo');
|
||||
|
@ -50,13 +50,13 @@ async function getPkgReleases(purl, config) {
|
|||
}
|
||||
try {
|
||||
if (options.ref === 'release') {
|
||||
const url = `repos/${repo}/releases?per_page=100`;
|
||||
const url = `https://api.github.com/repos/${repo}/releases?per_page=100`;
|
||||
versions = (await ghGot(url, { paginate: true })).body.map(
|
||||
o => o.tag_name
|
||||
);
|
||||
} else {
|
||||
// tag
|
||||
const url = `repos/${repo}/tags?per_page=100`;
|
||||
const url = `https://api.github.com/repos/${repo}/tags?per_page=100`;
|
||||
versions = (await ghGot(url, {
|
||||
cache: process.env.RENOVATE_SKIP_CACHE ? undefined : map,
|
||||
paginate: true,
|
||||
|
|
Loading…
Reference in a new issue