【分支管理】 web 添加保护分支管理员动态消息,app 需同步 · TonyScript/Coding-iOS@bffe241 · GitHub
Skip to content

Commit bffe241

Browse files
committed
【分支管理】 web 添加保护分支管理员动态消息,app 需同步
1 parent f339848 commit bffe241

4 files changed

Lines changed: 38 additions & 1 deletion

File tree

Coding_iOS/Controllers/ProjectMemberActivityListViewController.m

Lines changed: 10 additions & 0 deletions

Coding_iOS/Controllers/ProjectViewController.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,16 @@ - (void)goToVCWithItem:(HtmlMediaItem *)clickedItem activity:(ProjectActivity *)
551551
}else{
552552
linkPath = proAct.wiki_path;
553553
}
554+
}else if ([target_type isEqualToString:@"BranchMember"]){
555+
if ([@[@"add", @"remove"] containsObject:proAct.action]) {
556+
linkPath = [NSString stringWithFormat:@"/u/%@", proAct.target_user.global_key];
557+
}else{//deny_push/allow_push
558+
ProjectViewController *vc = [ProjectViewController codeVCWithCodeRef:proAct.ref_name andProject:project];
559+
[self.navigationController pushViewController:vc animated:YES];
560+
}
561+
}else if ([target_type isEqualToString:@"ProtectedBranch"]){
562+
ProjectViewController *vc = [ProjectViewController codeVCWithCodeRef:proAct.ref_name andProject:project];
563+
[self.navigationController pushViewController:vc animated:YES];
554564
}else{
555565
if ([target_type isEqualToString:@"Project"]){//转让项目之类的
556566
// }else if ([target_type isEqualToString:@"MergeRequestComment"]){//过期类型,已用CommitLineNote替代

Coding_iOS/Models/ProjectActivity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
@interface ProjectActivity : NSObject
2222
@property (readwrite, nonatomic, strong) NSNumber *id;
23-
@property (readwrite, nonatomic, strong) NSString *target_type, *action, *action_msg, *type, *ref, *ref_type, *ref_path, *pull_request_title, *merge_request_title, *comment_content, *merge_request_path, *pull_request_path, *version, *wiki_title, *wiki_path, *old_name;
23+
@property (readwrite, nonatomic, strong) NSString *target_type, *action, *action_msg, *type, *ref, *ref_type, *ref_path, *pull_request_title, *merge_request_title, *comment_content, *merge_request_path, *pull_request_path, *version, *wiki_title, *wiki_path, *old_name, *ref_name;
2424
@property (readwrite, nonatomic, strong) User *user, *target_user, *watcher;
2525
@property (readwrite, nonatomic, strong) NSDate *created_at;
2626
@property (readwrite, nonatomic, strong) Task *origin_task, *task;

Coding_iOS/Models/ProjectActivity.m

Lines changed: 17 additions & 0 deletions

0 commit comments

Comments
 (0)