{"action":"created","comment":{"url":"https://api.github.com/repos/alv-ch/alv-portal/pulls/comments/224401220","pull_request_review_id":163754976,"id":224401220,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDQwMTIyMA==","diff_hunk":"@@ -0,0 +1,97 @@\n+import {Injectable} from \"@angular/core\";\n+import { Notification, NotificationType } from './notification.model';\n+\n+export const STICKY_TIMEOUT = 5000;\n+\n+/**\n+ * A notification service holds the array of notifications of the types\n+ * default, success, info, warning and error\n+ * the notifications are added with `add` function and sorted with respect to their priority.\n+ * The notifications can be manually removed using `remove`.\n+ * Sticky notifications are removed automatically\n+ * @author pado in Panta project, minor modifications by iuka\n+ */\n+@Injectable()\n+export class NotificationsService {\n+\n+  public notifications: Notification[] = [];\n+\n+  private currentId = 0;\n+\n+  private context = {\n+    timeout: STICKY_TIMEOUT\n+  };\n+\n+  constructor() {\n+  }\n+\n+  public default(messageKey: string, isSticky?: boolean) {\n+    this.add({\n+      id: this.currentId,\n+      type: NotificationType.DEFAULT,\n+      messageKey: messageKey,\n+      isSticky: isSticky\n+    });\n+  }\n+\n+  public info(messageKey: string, isSticky?: boolean) {\n+    this.add({\n+      id: this.currentId,\n+      type: NotificationType.INFO,\n+      messageKey: messageKey,\n+      isSticky: isSticky\n+    });\n+  }\n+\n+  public success(messageKey: string, isSticky?: boolean) {\n+    this.add({\n+      id: this.currentId,\n+      type: NotificationType.SUCCESS,\n+      messageKey: messageKey,\n+      isSticky: isSticky\n+    });\n+  }\n+\n+  public warning(messageKey: string, isSticky?: boolean) {\n+    this.add({\n+      id: this.currentId,\n+      type: NotificationType.WARNING,\n+      messageKey: messageKey,\n+      isSticky: isSticky\n+    });\n+  }\n+\n+  public error(messageKey: string, isSticky?: boolean) {\n+    this.add({\n+      id: this.currentId,\n+      type: NotificationType.ERROR,\n+      messageKey: messageKey,\n+      isSticky: (isSticky ? isSticky : true)\n+    });\n+  }\n+\n+  public add(notification: Notification) {","path":"alv-portal-ui/src/app/shared/layout/notifications/notifications.service.ts","position":73,"original_position":73,"commit_id":"cb5ec14805bb7822809d423e9107cc80ebe84336","original_commit_id":"cb5ec14805bb7822809d423e9107cc80ebe84336","user":{"login":"ganqqwerty","id":697308,"node_id":"MDQ6VXNlcjY5NzMwOA==","avatar_url":"https://avatars2.githubusercontent.com/u/697308?v=4","gravatar_id":"","url":"https://api.github.com/users/ganqqwerty","html_url":"https://github.com/ganqqwerty","followers_url":"https://api.github.com/users/ganqqwerty/followers","following_url":"https://api.github.com/users/ganqqwerty/following{/other_user}","gists_url":"https://api.github.com/users/ganqqwerty/gists{/gist_id}","starred_url":"https://api.github.com/users/ganqqwerty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganqqwerty/subscriptions","organizations_url":"https://api.github.com/users/ganqqwerty/orgs","repos_url":"https://api.github.com/users/ganqqwerty/repos","events_url":"https://api.github.com/users/ganqqwerty/events{/privacy}","received_events_url":"https://api.github.com/users/ganqqwerty/received_events","type":"User","site_admin":false},"body":"done","created_at":"2018-10-11T10:47:56Z","updated_at":"2018-10-11T10:47:56Z","html_url":"https://github.com/alv-ch/alv-portal/pull/39#discussion_r224401220","pull_request_url":"https://api.github.com/repos/alv-ch/alv-portal/pulls/39","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/alv-ch/alv-portal/pulls/comments/224401220"},"html":{"href":"https://github.com/alv-ch/alv-portal/pull/39#discussion_r224401220"},"pull_request":{"href":"https://api.github.com/repos/alv-ch/alv-portal/pulls/39"}},"in_reply_to_id":224125261},"pull_request":{"url":"https://api.github.com/repos/alv-ch/alv-portal/pulls/39","id":221822362,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxODIyMzYy","html_url":"https://github.com/alv-ch/alv-portal/pull/39","diff_url":"https://github.com/alv-ch/alv-portal/pull/39.diff","patch_url":"https://github.com/alv-ch/alv-portal/pull/39.patch","issue_url":"https://api.github.com/repos/alv-ch/alv-portal/issues/39","number":39,"state":"open","locked":false,"title":"Feature/notifications","user":{"login":"ganqqwerty","id":697308,"node_id":"MDQ6VXNlcjY5NzMwOA==","avatar_url":"https://avatars2.githubusercontent.com/u/697308?v=4","gravatar_id":"","url":"https://api.github.com/users/ganqqwerty","html_url":"https://github.com/ganqqwerty","followers_url":"https://api.github.com/users/ganqqwerty/followers","following_url":"https://api.github.com/users/ganqqwerty/following{/other_user}","gists_url":"https://api.github.com/users/ganqqwerty/gists{/gist_id}","starred_url":"https://api.github.com/users/ganqqwerty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganqqwerty/subscriptions","organizations_url":"https://api.github.com/users/ganqqwerty/orgs","repos_url":"https://api.github.com/users/ganqqwerty/repos","events_url":"https://api.github.com/users/ganqqwerty/events{/privacy}","received_events_url":"https://api.github.com/users/ganqqwerty/received_events","type":"User","site_admin":false},"body":"notification service and component","created_at":"2018-10-10T14:55:39Z","updated_at":"2018-10-11T10:47:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e093a037dde92098fc1ae1706c0c95a538764091","assignee":null,"assignees":[],"requested_reviewers":[{"login":"birom","id":21288589,"node_id":"MDQ6VXNlcjIxMjg4NTg5","avatar_url":"https://avatars0.githubusercontent.com/u/21288589?v=4","gravatar_id":"","url":"https://api.github.com/users/birom","html_url":"https://github.com/birom","followers_url":"https://api.github.com/users/birom/followers","following_url":"https://api.github.com/users/birom/following{/other_user}","gists_url":"https://api.github.com/users/birom/gists{/gist_id}","starred_url":"https://api.github.com/users/birom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/birom/subscriptions","organizations_url":"https://api.github.com/users/birom/orgs","repos_url":"https://api.github.com/users/birom/repos","events_url":"https://api.github.com/users/birom/events{/privacy}","received_events_url":"https://api.github.com/users/birom/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alv-ch/alv-portal/pulls/39/commits","review_comments_url":"https://api.github.com/repos/alv-ch/alv-portal/pulls/39/comments","review_comment_url":"https://api.github.com/repos/alv-ch/alv-portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alv-ch/alv-portal/issues/39/comments","statuses_url":"https://api.github.com/repos/alv-ch/alv-portal/statuses/cb5ec14805bb7822809d423e9107cc80ebe84336","head":{"label":"alv-ch:feature/notifications","ref":"feature/notifications","sha":"cb5ec14805bb7822809d423e9107cc80ebe84336","user":{"login":"alv-ch","id":7008756,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcwMDg3NTY=","avatar_url":"https://avatars0.githubusercontent.com/u/7008756?v=4","gravatar_id":"","url":"https://api.github.com/users/alv-ch","html_url":"https://github.com/alv-ch","followers_url":"https://api.github.com/users/alv-ch/followers","following_url":"https://api.github.com/users/alv-ch/following{/other_user}","gists_url":"https://api.github.com/users/alv-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/alv-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alv-ch/subscriptions","organizations_url":"https://api.github.com/users/alv-ch/orgs","repos_url":"https://api.github.com/users/alv-ch/repos","events_url":"https://api.github.com/users/alv-ch/events{/privacy}","received_events_url":"https://api.github.com/users/alv-ch/received_events","type":"Organization","site_admin":false},"repo":{"id":149744438,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk3NDQ0Mzg=","name":"alv-portal","full_name":"alv-ch/alv-portal","private":false,"owner":{"login":"alv-ch","id":7008756,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcwMDg3NTY=","avatar_url":"https://avatars0.githubusercontent.com/u/7008756?v=4","gravatar_id":"","url":"https://api.github.com/users/alv-ch","html_url":"https://github.com/alv-ch","followers_url":"https://api.github.com/users/alv-ch/followers","following_url":"https://api.github.com/users/alv-ch/following{/other_user}","gists_url":"https://api.github.com/users/alv-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/alv-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alv-ch/subscriptions","organizations_url":"https://api.github.com/users/alv-ch/orgs","repos_url":"https://api.github.com/users/alv-ch/repos","events_url":"https://api.github.com/users/alv-ch/events{/privacy}","received_events_url":"https://api.github.com/users/alv-ch/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/alv-ch/alv-portal","description":null,"fork":false,"url":"https://api.github.com/repos/alv-ch/alv-portal","forks_url":"https://api.github.com/repos/alv-ch/alv-portal/forks","keys_url":"https://api.github.com/repos/alv-ch/alv-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alv-ch/alv-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alv-ch/alv-portal/teams","hooks_url":"https://api.github.com/repos/alv-ch/alv-portal/hooks","issue_events_url":"https://api.github.com/repos/alv-ch/alv-portal/issues/events{/number}","events_url":"https://api.github.com/repos/alv-ch/alv-portal/events","assignees_url":"https://api.github.com/repos/alv-ch/alv-portal/assignees{/user}","branches_url":"https://api.github.com/repos/alv-ch/alv-portal/branches{/branch}","tags_url":"https://api.github.com/repos/alv-ch/alv-portal/tags","blobs_url":"https://api.github.com/repos/alv-ch/alv-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alv-ch/alv-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alv-ch/alv-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/alv-ch/alv-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alv-ch/alv-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/alv-ch/alv-portal/languages","stargazers_url":"https://api.github.com/repos/alv-ch/alv-portal/stargazers","contributors_url":"https://api.github.com/repos/alv-ch/alv-portal/contributors","subscribers_url":"https://api.github.com/repos/alv-ch/alv-portal/subscribers","subscription_url":"https://api.github.com/repos/alv-ch/alv-portal/subscription","commits_url":"https://api.github.com/repos/alv-ch/alv-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/alv-ch/alv-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/alv-ch/alv-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/alv-ch/alv-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/alv-ch/alv-portal/contents/{+path}","compare_url":"https://api.github.com/repos/alv-ch/alv-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alv-ch/alv-portal/merges","archive_url":"https://api.github.com/repos/alv-ch/alv-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alv-ch/alv-portal/downloads","issues_url":"https://api.github.com/repos/alv-ch/alv-portal/issues{/number}","pulls_url":"https://api.github.com/repos/alv-ch/alv-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/alv-ch/alv-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/alv-ch/alv-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alv-ch/alv-portal/labels{/name}","releases_url":"https://api.github.com/repos/alv-ch/alv-portal/releases{/id}","deployments_url":"https://api.github.com/repos/alv-ch/alv-portal/deployments","created_at":"2018-09-21T09:51:00Z","updated_at":"2018-10-11T07:49:31Z","pushed_at":"2018-10-11T07:49:31Z","git_url":"git://github.com/alv-ch/alv-portal.git","ssh_url":"git@github.com:alv-ch/alv-portal.git","clone_url":"https://github.com/alv-ch/alv-portal.git","svn_url":"https://github.com/alv-ch/alv-portal","homepage":null,"size":2057,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"alv-ch:master","ref":"master","sha":"4fd17e23c1058bf79bbf005f2018c2e1921692b7","user":{"login":"alv-ch","id":7008756,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcwMDg3NTY=","avatar_url":"https://avatars0.githubusercontent.com/u/7008756?v=4","gravatar_id":"","url":"https://api.github.com/users/alv-ch","html_url":"https://github.com/alv-ch","followers_url":"https://api.github.com/users/alv-ch/followers","following_url":"https://api.github.com/users/alv-ch/following{/other_user}","gists_url":"https://api.github.com/users/alv-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/alv-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alv-ch/subscriptions","organizations_url":"https://api.github.com/users/alv-ch/orgs","repos_url":"https://api.github.com/users/alv-ch/repos","events_url":"https://api.github.com/users/alv-ch/events{/privacy}","received_events_url":"https://api.github.com/users/alv-ch/received_events","type":"Organization","site_admin":false},"repo":{"id":149744438,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk3NDQ0Mzg=","name":"alv-portal","full_name":"alv-ch/alv-portal","private":false,"owner":{"login":"alv-ch","id":7008756,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcwMDg3NTY=","avatar_url":"https://avatars0.githubusercontent.com/u/7008756?v=4","gravatar_id":"","url":"https://api.github.com/users/alv-ch","html_url":"https://github.com/alv-ch","followers_url":"https://api.github.com/users/alv-ch/followers","following_url":"https://api.github.com/users/alv-ch/following{/other_user}","gists_url":"https://api.github.com/users/alv-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/alv-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alv-ch/subscriptions","organizations_url":"https://api.github.com/users/alv-ch/orgs","repos_url":"https://api.github.com/users/alv-ch/repos","events_url":"https://api.github.com/users/alv-ch/events{/privacy}","received_events_url":"https://api.github.com/users/alv-ch/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/alv-ch/alv-portal","description":null,"fork":false,"url":"https://api.github.com/repos/alv-ch/alv-portal","forks_url":"https://api.github.com/repos/alv-ch/alv-portal/forks","keys_url":"https://api.github.com/repos/alv-ch/alv-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alv-ch/alv-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alv-ch/alv-portal/teams","hooks_url":"https://api.github.com/repos/alv-ch/alv-portal/hooks","issue_events_url":"https://api.github.com/repos/alv-ch/alv-portal/issues/events{/number}","events_url":"https://api.github.com/repos/alv-ch/alv-portal/events","assignees_url":"https://api.github.com/repos/alv-ch/alv-portal/assignees{/user}","branches_url":"https://api.github.com/repos/alv-ch/alv-portal/branches{/branch}","tags_url":"https://api.github.com/repos/alv-ch/alv-portal/tags","blobs_url":"https://api.github.com/repos/alv-ch/alv-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alv-ch/alv-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alv-ch/alv-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/alv-ch/alv-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alv-ch/alv-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/alv-ch/alv-portal/languages","stargazers_url":"https://api.github.com/repos/alv-ch/alv-portal/stargazers","contributors_url":"https://api.github.com/repos/alv-ch/alv-portal/contributors","subscribers_url":"https://api.github.com/repos/alv-ch/alv-portal/subscribers","subscription_url":"https://api.github.com/repos/alv-ch/alv-portal/subscription","commits_url":"https://api.github.com/repos/alv-ch/alv-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/alv-ch/alv-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/alv-ch/alv-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/alv-ch/alv-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/alv-ch/alv-portal/contents/{+path}","compare_url":"https://api.github.com/repos/alv-ch/alv-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alv-ch/alv-portal/merges","archive_url":"https://api.github.com/repos/alv-ch/alv-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alv-ch/alv-portal/downloads","issues_url":"https://api.github.com/repos/alv-ch/alv-portal/issues{/number}","pulls_url":"https://api.github.com/repos/alv-ch/alv-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/alv-ch/alv-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/alv-ch/alv-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alv-ch/alv-portal/labels{/name}","releases_url":"https://api.github.com/repos/alv-ch/alv-portal/releases{/id}","deployments_url":"https://api.github.com/repos/alv-ch/alv-portal/deployments","created_at":"2018-09-21T09:51:00Z","updated_at":"2018-10-11T07:49:31Z","pushed_at":"2018-10-11T07:49:31Z","git_url":"git://github.com/alv-ch/alv-portal.git","ssh_url":"git@github.com:alv-ch/alv-portal.git","clone_url":"https://github.com/alv-ch/alv-portal.git","svn_url":"https://github.com/alv-ch/alv-portal","homepage":null,"size":2057,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alv-ch/alv-portal/pulls/39"},"html":{"href":"https://github.com/alv-ch/alv-portal/pull/39"},"issue":{"href":"https://api.github.com/repos/alv-ch/alv-portal/issues/39"},"comments":{"href":"https://api.github.com/repos/alv-ch/alv-portal/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/alv-ch/alv-portal/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/alv-ch/alv-portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alv-ch/alv-portal/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/alv-ch/alv-portal/statuses/cb5ec14805bb7822809d423e9107cc80ebe84336"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ganqqwerty"}}