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
56e6bd32
Unverified
Commit
56e6bd32
authored
7 years ago
by
Rhys Arkins
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
refactor: log if repository is a configured fork (#1071)
parent
7b16802e
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
+8
-4
8 additions, 4 deletions
lib/workers/repository/index.js
test/workers/repository/index.spec.js
+9
-0
9 additions, 0 deletions
test/workers/repository/index.spec.js
with
17 additions
and
4 deletions
lib/workers/repository/index.js
+
8
−
4
View file @
56e6bd32
...
...
@@ -47,10 +47,14 @@ async function renovateRepository(repoConfig, token) {
await
cleanup
.
pruneStaleBranches
(
config
,
[]);
return
null
;
}
if
(
config
.
isFork
&&
!
config
.
renovateJsonPresent
)
{
logger
.
debug
(
'
repository is a fork and not manually configured
'
);
await
cleanup
.
pruneStaleBranches
(
config
,
[]);
return
null
;
if
(
config
.
isFork
)
{
if
(
config
.
renovateJsonPresent
)
{
logger
.
info
(
'
Processing forked repository
'
);
}
else
{
logger
.
debug
(
'
repository is a fork and not manually configured
'
);
await
cleanup
.
pruneStaleBranches
(
config
,
[]);
return
null
;
}
}
if
(
config
.
baseBranch
)
{
// Renovate should read content and target PRs here
...
...
This diff is collapsed.
Click to expand it.
test/workers/repository/index.spec.js
+
9
−
0
View file @
56e6bd32
...
...
@@ -76,6 +76,15 @@ describe('workers/repository', () => {
await
repositoryWorker
.
renovateRepository
(
config
);
expect
(
manager
.
detectPackageFiles
.
mock
.
calls
.
length
).
toBe
(
0
);
});
it
(
'
does not skip repository if its a configured fork
'
,
async
()
=>
{
config
.
isFork
=
true
;
config
.
renovateJsonPresent
=
true
;
manager
.
detectPackageFiles
.
mockImplementationOnce
(
input
=>
({
...
input
,
...{
packageFiles
:
[]
},
}));
await
repositoryWorker
.
renovateRepository
(
config
);
});
it
(
'
sets custom base branch
'
,
async
()
=>
{
config
.
baseBranch
=
'
some-branch
'
;
config
.
api
.
branchExists
.
mockReturnValueOnce
(
true
);
...
...
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