File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -439,12 +439,21 @@ - (void)goToVCWithItem:(HtmlMediaItem *)clickedItem activity:(ProjectActivity *)
439439 }else {
440440 [NSObject showHudTipStr: @" 没找到 Fork 到哪里去了~" ];
441441 }
442+ }else if ([proAct.action isEqualToString: @" push" ]){
443+ if (proAct.commits .count == 1 ) {
444+ Commit *firstCommit = [proAct.commits firstObject ];
445+ NSString *request_path = [NSString stringWithFormat: @" %@ /commit/%@ " , proAct.depot.path, firstCommit.sha];
446+ CommitFilesViewController *vc = [CommitFilesViewController vcWithPath: request_path];
447+ [self .navigationController pushViewController: vc animated: YES ];
448+ }else {
449+ NSString *ref = proAct.ref ? proAct.ref : @" master" ;
450+ ProjectCommitsViewController *vc = [ProjectCommitsViewController new ];
451+ vc.curProject = project;
452+ vc.curCommits = [Commits commitsWithRef: ref Path: @" " ];
453+ [self .navigationController pushViewController: vc animated: YES ];
454+ }
442455 }else {
443456 ProjectViewController *vc = [ProjectViewController codeVCWithCodeRef: proAct.ref andProject: project];
444- // NSString *ref = proAct.ref? proAct.ref : @"master";
445- // ProjectCommitsViewController *vc = [ProjectCommitsViewController new];
446- // vc.curProject = project;
447- // vc.curCommits = [Commits commitsWithRef:ref Path:@""];
448457 [self .navigationController pushViewController: vc animated: YES ];
449458 }
450459 }else if ([target_type isEqualToString: @" PullRequestBean" ] ||
You can’t perform that action at this time.
0 commit comments