Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
861cce01
Commit
861cce01
authored
6 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
feat: detect/print renovate version
parent
0b89e13d
Loading
Loading
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/platform/github/index.js
+1
-0
1 addition, 0 deletions
lib/platform/github/index.js
lib/workers/global/index.js
+10
-0
10 additions, 0 deletions
lib/workers/global/index.js
with
11 additions
and
0 deletions
lib/platform/github/index.js
+
1
−
0
View file @
861cce01
...
...
@@ -100,6 +100,7 @@ async function initRepo({
localDir
,
})
{
logger
.
debug
(
`initRepo("
${
repository
}
")`
);
logger
.
info
(
'
Using renovate version:
'
+
global
.
renovateVersion
);
const
opts
=
hostRules
.
find
({
platform
:
'
github
'
},
{
token
,
endpoint
});
if
(
!
opts
.
token
)
{
throw
new
Error
(
`No token found for GitHub repository
${
repository
}
`
);
...
...
This diff is collapsed.
Click to expand it.
lib/workers/global/index.js
+
10
−
0
View file @
861cce01
...
...
@@ -45,6 +45,7 @@ async function start() {
config
.
global
[
key
]
=
config
[
key
];
delete
config
[
key
];
});
detectRenovateVersion
();
// Iterate through repositories sequentially
for
(
const
repository
of
config
.
repositories
)
{
const
repoConfig
=
getRepositoryConfig
(
config
,
repository
);
...
...
@@ -57,6 +58,15 @@ async function start() {
}
}
// istanbul ignore next
function
detectRenovateVersion
()
{
try
{
global
.
renovateVersion
=
require
(
'
../../../package.json
'
).
version
;
// eslint-disable-line global-require
}
catch
(
err
)
{
logger
.
debug
({
err
},
'
Error getting renovate version
'
);
}
}
function
getRepositoryConfig
(
globalConfig
,
repository
)
{
const
repoConfig
=
configParser
.
mergeChildConfig
(
globalConfig
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment