{"action":"created","comment":{"url":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/comments/230601101","pull_request_review_id":171374944,"id":230601101,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDYwMTEwMQ==","diff_hunk":"@@ -1,7 +1,9 @@\n-import { BaseEntity } from './../../shared';\n+import { BaseEntity } from 'app/shared';\n import { Course } from '../course';\n import { Participation } from '../participation';\n+import * as moment from 'moment';\n import { Moment } from 'moment';\n+import { EntityArrayResponseType, EntityResponseType } from 'app/entities/exercise/exercise.service';","path":"src/main/webapp/app/entities/exercise/exercise.model.ts","position":7,"original_position":7,"commit_id":"4ce514c09930fac9cda129068dc7d1240bd9252b","original_commit_id":"4ce514c09930fac9cda129068dc7d1240bd9252b","user":{"login":"krusche","id":744067,"node_id":"MDQ6VXNlcjc0NDA2Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/744067?v=4","gravatar_id":"","url":"https://api.github.com/users/krusche","html_url":"https://github.com/krusche","followers_url":"https://api.github.com/users/krusche/followers","following_url":"https://api.github.com/users/krusche/following{/other_user}","gists_url":"https://api.github.com/users/krusche/gists{/gist_id}","starred_url":"https://api.github.com/users/krusche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krusche/subscriptions","organizations_url":"https://api.github.com/users/krusche/orgs","repos_url":"https://api.github.com/users/krusche/repos","events_url":"https://api.github.com/users/krusche/events{/privacy}","received_events_url":"https://api.github.com/users/krusche/received_events","type":"User","site_admin":false},"body":"I am not sure if it is a good idea that the model code depends on something defined in the service class. Therefore, I would suggest to move the static `convert...` functions into the exercise.service","created_at":"2018-11-04T19:11:24Z","updated_at":"2018-11-04T19:11:24Z","html_url":"https://github.com/ls1intum/ArTEMiS/pull/113#discussion_r230601101","pull_request_url":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/113","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/comments/230601101"},"html":{"href":"https://github.com/ls1intum/ArTEMiS/pull/113#discussion_r230601101"},"pull_request":{"href":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/113"}}},"pull_request":{"url":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/113","id":228033398,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MDMzMzk4","html_url":"https://github.com/ls1intum/ArTEMiS/pull/113","diff_url":"https://github.com/ls1intum/ArTEMiS/pull/113.diff","patch_url":"https://github.com/ls1intum/ArTEMiS/pull/113.patch","issue_url":"https://api.github.com/repos/ls1intum/ArTEMiS/issues/113","number":113,"state":"open","locked":false,"title":"Deduplicate code for managing code in Exercise class","user":{"login":"rpadovani","id":1713343,"node_id":"MDQ6VXNlcjE3MTMzNDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1713343?v=4","gravatar_id":"","url":"https://api.github.com/users/rpadovani","html_url":"https://github.com/rpadovani","followers_url":"https://api.github.com/users/rpadovani/followers","following_url":"https://api.github.com/users/rpadovani/following{/other_user}","gists_url":"https://api.github.com/users/rpadovani/gists{/gist_id}","starred_url":"https://api.github.com/users/rpadovani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpadovani/subscriptions","organizations_url":"https://api.github.com/users/rpadovani/orgs","repos_url":"https://api.github.com/users/rpadovani/repos","events_url":"https://api.github.com/users/rpadovani/events{/privacy}","received_events_url":"https://api.github.com/users/rpadovani/received_events","type":"User","site_admin":false},"body":"`Exercise` class has a `releaseDate` and `dueDate` fields, which need some transformations with `moment`.\r\n\r\nAt the moment, the function for transformations is duplicate in every class which extends `Exercise`.\r\n\r\nWith this pull request, I deduplicate the code including the methods in the base `Exercise` class, and I use Typescript generics to do not lose any type checking","created_at":"2018-11-02T19:11:11Z","updated_at":"2018-11-04T19:11:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59284bcfd85532c809364f46581543864c492ae0","assignee":{"login":"krusche","id":744067,"node_id":"MDQ6VXNlcjc0NDA2Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/744067?v=4","gravatar_id":"","url":"https://api.github.com/users/krusche","html_url":"https://github.com/krusche","followers_url":"https://api.github.com/users/krusche/followers","following_url":"https://api.github.com/users/krusche/following{/other_user}","gists_url":"https://api.github.com/users/krusche/gists{/gist_id}","starred_url":"https://api.github.com/users/krusche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krusche/subscriptions","organizations_url":"https://api.github.com/users/krusche/orgs","repos_url":"https://api.github.com/users/krusche/repos","events_url":"https://api.github.com/users/krusche/events{/privacy}","received_events_url":"https://api.github.com/users/krusche/received_events","type":"User","site_admin":false},"assignees":[{"login":"krusche","id":744067,"node_id":"MDQ6VXNlcjc0NDA2Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/744067?v=4","gravatar_id":"","url":"https://api.github.com/users/krusche","html_url":"https://github.com/krusche","followers_url":"https://api.github.com/users/krusche/followers","following_url":"https://api.github.com/users/krusche/following{/other_user}","gists_url":"https://api.github.com/users/krusche/gists{/gist_id}","starred_url":"https://api.github.com/users/krusche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krusche/subscriptions","organizations_url":"https://api.github.com/users/krusche/orgs","repos_url":"https://api.github.com/users/krusche/repos","events_url":"https://api.github.com/users/krusche/events{/privacy}","received_events_url":"https://api.github.com/users/krusche/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/113/commits","review_comments_url":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/113/comments","review_comment_url":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ls1intum/ArTEMiS/issues/113/comments","statuses_url":"https://api.github.com/repos/ls1intum/ArTEMiS/statuses/4ce514c09930fac9cda129068dc7d1240bd9252b","head":{"label":"ls1intum:feature/improve-webapp-date-management","ref":"feature/improve-webapp-date-management","sha":"4ce514c09930fac9cda129068dc7d1240bd9252b","user":{"login":"ls1intum","id":11064260,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMDY0MjYw","avatar_url":"https://avatars3.githubusercontent.com/u/11064260?v=4","gravatar_id":"","url":"https://api.github.com/users/ls1intum","html_url":"https://github.com/ls1intum","followers_url":"https://api.github.com/users/ls1intum/followers","following_url":"https://api.github.com/users/ls1intum/following{/other_user}","gists_url":"https://api.github.com/users/ls1intum/gists{/gist_id}","starred_url":"https://api.github.com/users/ls1intum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ls1intum/subscriptions","organizations_url":"https://api.github.com/users/ls1intum/orgs","repos_url":"https://api.github.com/users/ls1intum/repos","events_url":"https://api.github.com/users/ls1intum/events{/privacy}","received_events_url":"https://api.github.com/users/ls1intum/received_events","type":"Organization","site_admin":false},"repo":{"id":69562331,"node_id":"MDEwOlJlcG9zaXRvcnk2OTU2MjMzMQ==","name":"ArTEMiS","full_name":"ls1intum/ArTEMiS","private":false,"owner":{"login":"ls1intum","id":11064260,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMDY0MjYw","avatar_url":"https://avatars3.githubusercontent.com/u/11064260?v=4","gravatar_id":"","url":"https://api.github.com/users/ls1intum","html_url":"https://github.com/ls1intum","followers_url":"https://api.github.com/users/ls1intum/followers","following_url":"https://api.github.com/users/ls1intum/following{/other_user}","gists_url":"https://api.github.com/users/ls1intum/gists{/gist_id}","starred_url":"https://api.github.com/users/ls1intum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ls1intum/subscriptions","organizations_url":"https://api.github.com/users/ls1intum/orgs","repos_url":"https://api.github.com/users/ls1intum/repos","events_url":"https://api.github.com/users/ls1intum/events{/privacy}","received_events_url":"https://api.github.com/users/ls1intum/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ls1intum/ArTEMiS","description":"AuTomated assEssment Management System for Interactive Learning","fork":false,"url":"https://api.github.com/repos/ls1intum/ArTEMiS","forks_url":"https://api.github.com/repos/ls1intum/ArTEMiS/forks","keys_url":"https://api.github.com/repos/ls1intum/ArTEMiS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ls1intum/ArTEMiS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ls1intum/ArTEMiS/teams","hooks_url":"https://api.github.com/repos/ls1intum/ArTEMiS/hooks","issue_events_url":"https://api.github.com/repos/ls1intum/ArTEMiS/issues/events{/number}","events_url":"https://api.github.com/repos/ls1intum/ArTEMiS/events","assignees_url":"https://api.github.com/repos/ls1intum/ArTEMiS/assignees{/user}","branches_url":"https://api.github.com/repos/ls1intum/ArTEMiS/branches{/branch}","tags_url":"https://api.github.com/repos/ls1intum/ArTEMiS/tags","blobs_url":"https://api.github.com/repos/ls1intum/ArTEMiS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ls1intum/ArTEMiS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ls1intum/ArTEMiS/git/refs{/sha}","trees_url":"https://api.github.com/repos/ls1intum/ArTEMiS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ls1intum/ArTEMiS/statuses/{sha}","languages_url":"https://api.github.com/repos/ls1intum/ArTEMiS/languages","stargazers_url":"https://api.github.com/repos/ls1intum/ArTEMiS/stargazers","contributors_url":"https://api.github.com/repos/ls1intum/ArTEMiS/contributors","subscribers_url":"https://api.github.com/repos/ls1intum/ArTEMiS/subscribers","subscription_url":"https://api.github.com/repos/ls1intum/ArTEMiS/subscription","commits_url":"https://api.github.com/repos/ls1intum/ArTEMiS/commits{/sha}","git_commits_url":"https://api.github.com/repos/ls1intum/ArTEMiS/git/commits{/sha}","comments_url":"https://api.github.com/repos/ls1intum/ArTEMiS/comments{/number}","issue_comment_url":"https://api.github.com/repos/ls1intum/ArTEMiS/issues/comments{/number}","contents_url":"https://api.github.com/repos/ls1intum/ArTEMiS/contents/{+path}","compare_url":"https://api.github.com/repos/ls1intum/ArTEMiS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ls1intum/ArTEMiS/merges","archive_url":"https://api.github.com/repos/ls1intum/ArTEMiS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ls1intum/ArTEMiS/downloads","issues_url":"https://api.github.com/repos/ls1intum/ArTEMiS/issues{/number}","pulls_url":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls{/number}","milestones_url":"https://api.github.com/repos/ls1intum/ArTEMiS/milestones{/number}","notifications_url":"https://api.github.com/repos/ls1intum/ArTEMiS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ls1intum/ArTEMiS/labels{/name}","releases_url":"https://api.github.com/repos/ls1intum/ArTEMiS/releases{/id}","deployments_url":"https://api.github.com/repos/ls1intum/ArTEMiS/deployments","created_at":"2016-09-29T11:46:05Z","updated_at":"2018-11-04T09:28:24Z","pushed_at":"2018-11-04T14:08:53Z","git_url":"git://github.com/ls1intum/ArTEMiS.git","ssh_url":"git@github.com:ls1intum/ArTEMiS.git","clone_url":"https://github.com/ls1intum/ArTEMiS.git","svn_url":"https://github.com/ls1intum/ArTEMiS","homepage":"http://www.interactive-learning.org","size":19553,"stargazers_count":31,"watchers_count":31,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":13,"open_issues":26,"watchers":31,"default_branch":"develop"}},"base":{"label":"ls1intum:develop","ref":"develop","sha":"8e0d81644f9547fa9d50115701b7a6cb98e28430","user":{"login":"ls1intum","id":11064260,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMDY0MjYw","avatar_url":"https://avatars3.githubusercontent.com/u/11064260?v=4","gravatar_id":"","url":"https://api.github.com/users/ls1intum","html_url":"https://github.com/ls1intum","followers_url":"https://api.github.com/users/ls1intum/followers","following_url":"https://api.github.com/users/ls1intum/following{/other_user}","gists_url":"https://api.github.com/users/ls1intum/gists{/gist_id}","starred_url":"https://api.github.com/users/ls1intum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ls1intum/subscriptions","organizations_url":"https://api.github.com/users/ls1intum/orgs","repos_url":"https://api.github.com/users/ls1intum/repos","events_url":"https://api.github.com/users/ls1intum/events{/privacy}","received_events_url":"https://api.github.com/users/ls1intum/received_events","type":"Organization","site_admin":false},"repo":{"id":69562331,"node_id":"MDEwOlJlcG9zaXRvcnk2OTU2MjMzMQ==","name":"ArTEMiS","full_name":"ls1intum/ArTEMiS","private":false,"owner":{"login":"ls1intum","id":11064260,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMDY0MjYw","avatar_url":"https://avatars3.githubusercontent.com/u/11064260?v=4","gravatar_id":"","url":"https://api.github.com/users/ls1intum","html_url":"https://github.com/ls1intum","followers_url":"https://api.github.com/users/ls1intum/followers","following_url":"https://api.github.com/users/ls1intum/following{/other_user}","gists_url":"https://api.github.com/users/ls1intum/gists{/gist_id}","starred_url":"https://api.github.com/users/ls1intum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ls1intum/subscriptions","organizations_url":"https://api.github.com/users/ls1intum/orgs","repos_url":"https://api.github.com/users/ls1intum/repos","events_url":"https://api.github.com/users/ls1intum/events{/privacy}","received_events_url":"https://api.github.com/users/ls1intum/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ls1intum/ArTEMiS","description":"AuTomated assEssment Management System for Interactive Learning","fork":false,"url":"https://api.github.com/repos/ls1intum/ArTEMiS","forks_url":"https://api.github.com/repos/ls1intum/ArTEMiS/forks","keys_url":"https://api.github.com/repos/ls1intum/ArTEMiS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ls1intum/ArTEMiS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ls1intum/ArTEMiS/teams","hooks_url":"https://api.github.com/repos/ls1intum/ArTEMiS/hooks","issue_events_url":"https://api.github.com/repos/ls1intum/ArTEMiS/issues/events{/number}","events_url":"https://api.github.com/repos/ls1intum/ArTEMiS/events","assignees_url":"https://api.github.com/repos/ls1intum/ArTEMiS/assignees{/user}","branches_url":"https://api.github.com/repos/ls1intum/ArTEMiS/branches{/branch}","tags_url":"https://api.github.com/repos/ls1intum/ArTEMiS/tags","blobs_url":"https://api.github.com/repos/ls1intum/ArTEMiS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ls1intum/ArTEMiS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ls1intum/ArTEMiS/git/refs{/sha}","trees_url":"https://api.github.com/repos/ls1intum/ArTEMiS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ls1intum/ArTEMiS/statuses/{sha}","languages_url":"https://api.github.com/repos/ls1intum/ArTEMiS/languages","stargazers_url":"https://api.github.com/repos/ls1intum/ArTEMiS/stargazers","contributors_url":"https://api.github.com/repos/ls1intum/ArTEMiS/contributors","subscribers_url":"https://api.github.com/repos/ls1intum/ArTEMiS/subscribers","subscription_url":"https://api.github.com/repos/ls1intum/ArTEMiS/subscription","commits_url":"https://api.github.com/repos/ls1intum/ArTEMiS/commits{/sha}","git_commits_url":"https://api.github.com/repos/ls1intum/ArTEMiS/git/commits{/sha}","comments_url":"https://api.github.com/repos/ls1intum/ArTEMiS/comments{/number}","issue_comment_url":"https://api.github.com/repos/ls1intum/ArTEMiS/issues/comments{/number}","contents_url":"https://api.github.com/repos/ls1intum/ArTEMiS/contents/{+path}","compare_url":"https://api.github.com/repos/ls1intum/ArTEMiS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ls1intum/ArTEMiS/merges","archive_url":"https://api.github.com/repos/ls1intum/ArTEMiS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ls1intum/ArTEMiS/downloads","issues_url":"https://api.github.com/repos/ls1intum/ArTEMiS/issues{/number}","pulls_url":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls{/number}","milestones_url":"https://api.github.com/repos/ls1intum/ArTEMiS/milestones{/number}","notifications_url":"https://api.github.com/repos/ls1intum/ArTEMiS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ls1intum/ArTEMiS/labels{/name}","releases_url":"https://api.github.com/repos/ls1intum/ArTEMiS/releases{/id}","deployments_url":"https://api.github.com/repos/ls1intum/ArTEMiS/deployments","created_at":"2016-09-29T11:46:05Z","updated_at":"2018-11-04T09:28:24Z","pushed_at":"2018-11-04T14:08:53Z","git_url":"git://github.com/ls1intum/ArTEMiS.git","ssh_url":"git@github.com:ls1intum/ArTEMiS.git","clone_url":"https://github.com/ls1intum/ArTEMiS.git","svn_url":"https://github.com/ls1intum/ArTEMiS","homepage":"http://www.interactive-learning.org","size":19553,"stargazers_count":31,"watchers_count":31,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":13,"open_issues":26,"watchers":31,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/113"},"html":{"href":"https://github.com/ls1intum/ArTEMiS/pull/113"},"issue":{"href":"https://api.github.com/repos/ls1intum/ArTEMiS/issues/113"},"comments":{"href":"https://api.github.com/repos/ls1intum/ArTEMiS/issues/113/comments"},"review_comments":{"href":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/113/comments"},"review_comment":{"href":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ls1intum/ArTEMiS/pulls/113/commits"},"statuses":{"href":"https://api.github.com/repos/ls1intum/ArTEMiS/statuses/4ce514c09930fac9cda129068dc7d1240bd9252b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"krusche"}}