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
3dbd470f
Commit
3dbd470f
authored
6 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
refactor: move repo processResult
parent
1eb37c43
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/workers/repository/index.js
+2
-33
2 additions, 33 deletions
lib/workers/repository/index.js
lib/workers/repository/result.js
+41
-0
41 additions, 0 deletions
lib/workers/repository/result.js
with
43 additions
and
33 deletions
lib/workers/repository/index.js
+
2
−
33
View file @
3dbd470f
...
...
@@ -5,7 +5,7 @@ const { ensureOnboardingPr } = require('./onboarding/pr');
const
{
writeUpdates
}
=
require
(
'
./write
'
);
const
{
handleError
}
=
require
(
'
./error
'
);
const
{
finaliseRepo
}
=
require
(
'
./finalise
'
);
const
{
processResult
}
=
require
(
'
./result
'
);
const
{
resolvePackageFiles
}
=
require
(
'
../../manager
'
);
module
.
exports
=
{
...
...
@@ -20,7 +20,6 @@ async function renovateRepository(repoConfig) {
logger
.
trace
({
config
},
'
renovateRepository()
'
);
let
commonConfig
;
let
res
;
let
status
;
try
{
config
=
await
initApis
(
config
);
config
=
await
initRepo
(
config
);
...
...
@@ -84,36 +83,6 @@ async function renovateRepository(repoConfig) {
}
catch
(
err
)
/* istanbul ignore next */
{
res
=
await
handleError
(
config
,
err
);
}
const
disabledStatuses
=
[
'
archived
'
,
'
blocked
'
,
'
disabled
'
,
'
forbidden
'
,
'
fork
'
,
'
no-package-files
'
,
'
not-found
'
,
'
renamed
'
,
'
uninitiated
'
,
];
const
errorStatuses
=
[
'
config-validation
'
,
'
error
'
,
'
unknown-error
'
,
'
not-found
'
,
];
// istanbul ignore next
if
(
disabledStatuses
.
includes
(
res
))
{
status
=
'
disabled
'
;
}
else
if
(
errorStatuses
.
includes
(
res
))
{
status
=
'
error
'
;
}
else
if
(
config
.
repoIsOnboarded
)
{
status
=
'
enabled
'
;
}
else
{
status
=
'
onboarding
'
;
if
(
res
===
'
onboarding
'
)
{
res
=
'
done
'
;
}
}
logger
.
info
(
'
Finished repository
'
);
return
{
res
,
status
}
;
return
processResult
(
config
,
res
)
;
}
This diff is collapsed.
Click to expand it.
lib/workers/repository/result.js
0 → 100644
+
41
−
0
View file @
3dbd470f
module
.
exports
=
{
processResult
,
};
function
processResult
(
config
,
result
)
{
let
res
=
result
;
const
disabledStatuses
=
[
'
archived
'
,
'
blocked
'
,
'
disabled
'
,
'
forbidden
'
,
'
fork
'
,
'
no-package-files
'
,
'
not-found
'
,
'
renamed
'
,
'
uninitiated
'
,
];
const
errorStatuses
=
[
'
config-validation
'
,
'
error
'
,
'
unknown-error
'
,
'
not-found
'
,
];
let
status
;
// istanbul ignore next
if
(
disabledStatuses
.
includes
(
res
))
{
status
=
'
disabled
'
;
}
else
if
(
errorStatuses
.
includes
(
res
))
{
status
=
'
error
'
;
}
else
if
(
config
.
repoIsOnboarded
)
{
status
=
'
enabled
'
;
}
else
{
status
=
'
onboarding
'
;
if
(
result
===
'
onboarding
'
)
{
res
=
'
done
'
;
}
else
{
res
=
result
;
}
}
return
{
res
,
status
};
}
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