File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -439,12 +439,21 @@ - (void)goToVCWithItem:(HtmlMediaItem *)clickedItem activity:(ProjectActivity *)
439
439
}else {
440
440
[NSObject showHudTipStr: @" 没找到 Fork 到哪里去了~" ];
441
441
}
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
+ }
442
455
}else {
443
456
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:@""];
448
457
[self .navigationController pushViewController: vc animated: YES ];
449
458
}
450
459
}else if ([target_type isEqualToString: @" PullRequestBean" ] ||
You can’t perform that action at this time.
0 commit comments