make "browse in diffusion" action work for commits in branches other than master
Summary: we do this by passing the "seenOnBranches" commit data detail through the stack Test Plan: browse in diffusion link worked for non-master checkins under git Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1949 Differential Revision: https://secure.phabricator.com/D3853
This commit is contained in:
@@ -269,6 +269,10 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
$change_list->setRenderURI('/diffusion/'.$callsign.'/diff/');
|
||||
$change_list->setRepository($repository);
|
||||
$change_list->setUser($user);
|
||||
// pick the first branch for "Browse in Diffusion" View Option
|
||||
$branches = $commit_data->getCommitDetail('seenOnBranches');
|
||||
$first_branch = reset($branches);
|
||||
$change_list->setBranch($first_branch);
|
||||
|
||||
$change_list->setStandaloneURI(
|
||||
'/diffusion/'.$callsign.'/diff/');
|
||||
|
||||
Reference in New Issue
Block a user