11/**
22 @name : aping-plugin-github
3- @version : 0.7.7 (24 -01-2016)
3+ @version : 0.7.8 (28 -01-2016)
44 @author : Jonathan Hornung
55 @url : https://github.com/JohnnyTheTank/apiNG-plugin-github
66 @license : MIT
@@ -178,11 +178,6 @@ angular.module("jtt_aping_github")
178178 case "repo" :
179179 returnObject = this . getRepoItemByJsonData ( _item ) ;
180180 break ;
181- /*
182- case "activity":
183- returnObject = this.getActivityItemByJsonData(_item);
184- break;
185- */
186181
187182 default :
188183 return false ;
@@ -194,7 +189,7 @@ angular.module("jtt_aping_github")
194189 this . getRepoItemByJsonData = function ( _item ) {
195190 var repoObject = apingModels . getNew ( "repo" , this . getThisPlatformString ( ) ) ;
196191
197- $ . extend ( true , repoObject , {
192+ angular . extend ( repoObject , {
198193 owner_name : _item . owner ? _item . owner . login : undefined ,
199194 owner_id : _item . owner ? _item . owner . id : undefined ,
200195 owner_link : _item . owner ? _item . owner . html_url : undefined ,
@@ -225,86 +220,6 @@ angular.module("jtt_aping_github")
225220
226221 return repoObject ;
227222 } ;
228- /*
229- this.getActivityItemByJsonData = function (_item) {
230- var activityObject = apingModels.getNew("activity", this.getThisPlatformString());
231-
232- $.extend(true, activityObject, {
233- body : undefined,
234-
235- actor_name : _item.actor ? _item.actor.login : undefined, //who?
236- actor_id : _item.actor ? _item.actor.id : undefined,
237- actor_url : _item.actor ? this.getThisPlatformLink()+_item.actor.login : undefined,
238- actor_img_url : _item.actor ? _item.actor.avatar_url : undefined,
239- actor_type: undefined,
240-
241- //action_name : undefined,
242- //action_message : undefined,
243- action_id : _item.id,
244- //action_url : undefined,
245- //action_img : undefined,
246- action_type: _item.type,
247-
248- object_name : _item.repo ? _item.repo.name : undefined,
249- object_id : _item.repo ? _item.repo.id : undefined,
250- object_img : undefined,
251- object_url : _item.repo ? this.getThisPlatformLink()+_item.repo.name : undefined,
252- object_type: _item.repo ? "repository" : undefined,
253-
254- //context : undefined,
255- timestamp : apingTimeHelper.getTimestampFromDateString(_item.created_at, 1000, 3600*1000),
256- date_time: new Date(_item.created_at),
257-
258- });
259-
260- var actionTempObject = this.getActionMessageByTypeAndPayload(_item.type, _item.payload);
261-
262- activityObject.action_message = actionTempObject.message;
263- activityObject.action_name = actionTempObject.name;
264- activityObject.action_url = actionTempObject.url;
265-
266- return activityObject;
267- };
268-
269- this.getActionMessageByTypeAndPayload = function (_type, _payload) {
270-
271- var returnObject ={
272- name : undefined,
273- message : "",
274- url : undefined,
275- };
276-
277- switch(_type) {
278- case "PushEvent":
279-
280- returnObject.name = "pushed";
281-
282- if(_payload.commits && _payload.commits.constructor === Array) {
283- angular.forEach(_payload.commits, function (value, key) {
284- if(returnObject.message === "") {
285- returnObject.message += value.message;
286- } else {
287- returnObject.message += "\n"+value.message;
288- }
289- });
290- }
291- break;
292-
293- case "PullRequestReviewCommentEvent":
294- returnObject.name = _payload.action + " pull request review comment";
295- returnObject.message = _payload.pull_request.title;
296- returnObject.url = _payload.pull_request.html_url;
297-
298- break;
299- }
300-
301- if(returnObject.message === "") {
302- returnObject.message = undefined;
303- }
304-
305- return returnObject;
306- };
307- */
308223 } ] ) ; ; "use strict" ;
309224
310225angular . module ( "jtt_github" , [ ] )
0 commit comments