'.$request_body->comment->body.'
'); $request->set_param('commentable_type','task'); $comment_contoller_response = $comment_controller->store($request); $activity_data = $comment_contoller_response['activity']['data'] ; $activity_data['meta']['int_source'] = 'github' ; Activity::where('id',$activity_data['id'] ) ->update(['meta' => serialize($activity_data['meta'])]); $result = [ 'action' => $request_body->action, 'project_id' => $task->project_id, 'primary_key' => $request_body->comment->id, 'foreign_key' => $comment_contoller_response['data']['id'], 'type' => 'issues_comments', 'source' => 'Github', ]; $integrations = Integrations::create( $result ); return $integrations ; } if($request_body->action == 'edited'){ if($request->get_header('X-GitHub-Event') == 'issues'){ $task = Integrations::where( 'primary_key', $request_body->issue->id ) ->where('type','issues') ->first(); $request->set_param('project_id',$task->project_id); $request->set_param('task_id',$task->foreign_key); $request->set_param('title',$request_body->issue->title); $request->set_param('description',$request_body->issue->body); $task_controller_response = $task_controller->update($request); $activity_data = $task_controller_response['activity']['data'] ; $activity_data['meta']['int_source'] = 'github' ; Activity::where('id',$activity_data['id'] ) ->update(['meta' => serialize($activity_data['meta'])]); } if($request->get_header('X-GitHub-Event') == 'issue_comment'){ $integrations = Integrations::where( 'primary_key', $request_body->comment->id ) ->where('type','issues_comments') ->first(); $comment = Comment::where( 'id', $integrations->foreign_key )->first(); $request->set_param('project_id',$comment->project_id); $request->set_param('comment_id',$comment->id); $request->set_param('content',$request_body->comment->body); $request->set_param('commentable_id',$comment->commentable_id); $request->set_param('commentable_type','task'); $comment_controller_response = $comment_controller->update($request); $activity_data = $comment_controller_response['activity']['data'] ; $activity_data['meta']['int_source'] = 'github' ; Activity::where('id',$activity_data['id'] ) ->update(['meta' => serialize($activity_data['meta'])]); } } } } } }-
Notifications
You must be signed in to change notification settings - Fork 0
This repo is made only for testing purpose
License
OpuRockey/Hello-rockey
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
This repo is made only for testing purpose
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published