Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always open PR, get rid of demoAddBranch directive entirely #2038

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function instanceHeader(
});
});
$scope.showPrCallout = function () {
return demoFlowService.isInDemoFlow() && demoFlowService.shouldAddPR() && !demoFlowService.getItem('clickedPrLink');
return demoFlowService.isInDemoFlow() && !demoFlowService.getItem('clickedPrLink');
};
$scope.isInGuide = ahaGuide.isInGuide;

Expand Down
150 changes: 0 additions & 150 deletions client/directives/instances/instanceList/DemoAddBranchController.js

This file was deleted.

20 changes: 0 additions & 20 deletions client/directives/instances/instanceList/demoAddBranchDirective.js

This file was deleted.

46 changes: 0 additions & 46 deletions client/directives/instances/instanceList/demoAddBranchView.jade

This file was deleted.

20 changes: 7 additions & 13 deletions client/services/demoFlowService.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,13 @@ function demoFlowService(
unregisterContainerUrlClickListener();
forkNewInstance(instance)
.then(function () {
if (currentOrg.isPersonalAccount()) {
submitDemoPR(instance)
.catch(function (err) {
if (keypather.get(err, 'errors[0].message').match(/(pull request.*exists)/)) {
return instance;
}
errs.handler(err);
});
}
submitDemoPR(instance)
.catch(function (err) {
if (keypather.get(err, 'errors[0].message').match(/(pull request.*exists)/)) {
return instance;
}
errs.handler(err);
});
});
});
}
Expand Down Expand Up @@ -170,9 +168,6 @@ function demoFlowService(
return endDemoFlow();
});

function shouldAddPR () {
return currentOrg.isPersonalAccount();
}
function shouldShowTeamCTA () {
return currentOrg.isPersonalAccount() && isInDemoFlow() && getItem('clickedPrLink');
}
Expand All @@ -194,7 +189,6 @@ function demoFlowService(
hasAddedBranch: hasAddedBranch,
hasSeenHangTightMessage: hasSeenHangTightMessage,
hasSeenUrlCallout: hasSeenUrlCallout,
shouldAddPR: shouldAddPR,
isInDemoFlow: isInDemoFlow,
resetFlags: resetFlags,
setItem: setItem,
Expand Down
Loading