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
e46966e3
Commit
e46966e3
authored
5 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
refactor: remove unused isGitHub/etc
parent
2946f29e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/workers/branch/parent.js
+0
-5
0 additions, 5 deletions
lib/workers/branch/parent.js
lib/workers/global/index.js
+0
-5
0 additions, 5 deletions
lib/workers/global/index.js
test/workers/branch/parent.spec.js
+0
-11
0 additions, 11 deletions
test/workers/branch/parent.spec.js
with
0 additions
and
21 deletions
lib/workers/branch/parent.js
+
0
−
5
View file @
e46966e3
...
@@ -63,11 +63,6 @@ async function getParentBranch(config) {
...
@@ -63,11 +63,6 @@ async function getParentBranch(config) {
logger
.
debug
(
'
PR is conflicted
'
);
logger
.
debug
(
'
PR is conflicted
'
);
if
(
pr
.
canRebase
)
{
if
(
pr
.
canRebase
)
{
logger
.
info
(
`Branch is not mergeable and needs rebasing`
);
logger
.
info
(
`Branch is not mergeable and needs rebasing`
);
// TODO: Move this down to api library
if
(
config
.
isGitLab
||
config
.
isAzure
)
{
logger
.
info
(
`Deleting unmergeable branch in order to recreate/rebase`
);
await
platform
.
deleteBranch
(
branchName
);
}
// Setting parentBranch back to undefined means that we'll use the default branch
// Setting parentBranch back to undefined means that we'll use the default branch
return
{
parentBranch
:
undefined
};
return
{
parentBranch
:
undefined
};
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/workers/global/index.js
+
0
−
5
View file @
e46966e3
...
@@ -104,11 +104,6 @@ async function getRepositoryConfig(globalConfig, repository) {
...
@@ -104,11 +104,6 @@ async function getRepositoryConfig(globalConfig, repository) {
globalConfig
,
globalConfig
,
is
.
string
(
repository
)
?
{
repository
}
:
repository
is
.
string
(
repository
)
?
{
repository
}
:
repository
);
);
repoConfig
.
isBitbucket
=
repoConfig
.
platform
===
'
bitbucket
'
;
repoConfig
.
isBitbucketServer
=
repoConfig
.
platform
===
'
bitbucket-server
'
;
repoConfig
.
isGitHub
=
repoConfig
.
platform
===
'
github
'
;
repoConfig
.
isGitLab
=
repoConfig
.
platform
===
'
gitlab
'
;
repoConfig
.
isAzure
=
repoConfig
.
platform
===
'
azure
'
;
repoConfig
.
localDir
=
path
.
join
(
repoConfig
.
localDir
=
path
.
join
(
repoConfig
.
baseDir
,
repoConfig
.
baseDir
,
`./repos/
${
repoConfig
.
platform
}
/
${
repoConfig
.
repository
}
`
`./repos/
${
repoConfig
.
platform
}
/
${
repoConfig
.
repository
}
`
...
...
This diff is collapsed.
Click to expand it.
test/workers/branch/parent.spec.js
+
0
−
11
View file @
e46966e3
...
@@ -75,17 +75,6 @@ describe('workers/branch/parent', () => {
...
@@ -75,17 +75,6 @@ describe('workers/branch/parent', () => {
const
res
=
await
getParentBranch
(
config
);
const
res
=
await
getParentBranch
(
config
);
expect
(
res
.
parentBranch
).
toBeUndefined
();
expect
(
res
.
parentBranch
).
toBeUndefined
();
});
});
it
(
'
returns undefined if unmergeable and can rebase (gitlab)
'
,
async
()
=>
{
config
.
isGitLab
=
true
;
platform
.
branchExists
.
mockReturnValue
(
true
);
platform
.
getBranchPr
.
mockReturnValue
({
isConflicted
:
true
,
canRebase
:
true
,
});
const
res
=
await
getParentBranch
(
config
);
expect
(
res
.
parentBranch
).
toBeUndefined
();
expect
(
platform
.
deleteBranch
).
toHaveBeenCalledTimes
(
1
);
});
it
(
'
returns branchName if automerge branch and not stale
'
,
async
()
=>
{
it
(
'
returns branchName if automerge branch and not stale
'
,
async
()
=>
{
config
.
automerge
=
true
;
config
.
automerge
=
true
;
config
.
automergeType
=
'
branch
'
;
config
.
automergeType
=
'
branch
'
;
...
...
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