Permalink
Browse files

fix(work-tree): fix work-tree dir when checking out new sha/pr

  • Loading branch information...
jkuri committed Sep 10, 2017
1 parent f026a64 commit dd20c759c4c3de036ad9379de6274dc733f3cb4f
@@ -8,7 +8,7 @@ exports.config = {
capabilities: {
browserName: 'chrome',
chromeOptions: {
/* args: ['--headless', '--disable-gpu', '--window-size=1024,768'] */
args: ['--headless', '--disable-gpu', '--window-size=1024,768']
}
},
directConnect: true,
@@ -727,10 +727,10 @@ function checkoutShaOrPr(sha: string, pr: number, dir: string): Promise<void> {

if (pr) {
fetch = `${gitDir} fetch origin pull/${pr}/head:pr${pr}`;
checkout = `${gitDir} checkout pr${pr}`;
checkout = `${gitDir} --work-tree ${dir} checkout pr${pr}`;
} else if (sha) {
fetch = `${gitDir} fetch --unshallow`;
checkout = `${gitDir} checkout ${sha}`;
checkout = `${gitDir} --work-tree ${dir} checkout ${sha}`;
}

if (fetch && checkout) {
@@ -124,11 +124,9 @@ export function startBuild(data: any): Promise<any> {
branch: branch,
pr: pr,
sha: sha,
access_token: repository.access_token
access_token: repository.access_token || null
};

console.log(repo);

return getRemoteParsedConfig(repo);
})
.then(parsedConfig => config = parsedConfig)
@@ -242,10 +242,6 @@
display: flex
justify-content: flex-end

.status-badge
width: 110px
height: 20px

.search-input-container
display: inline-block
position: relative
@@ -11,5 +11,4 @@
justify-content: center

.status-badge-repositories
transform: scale(1.3)
margin: 7px 10px 0 0
margin: 7px 0 0 0
@@ -1,7 +1,5 @@
.status-badge-repo
transform: scale(1.3)
margin: 7px 0 0 20px
display: block

.mr15
margin-right: 15px

0 comments on commit dd20c75

Please sign in to comment.