{"action":"created","comment":{"url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/comments/45752380","id":45752380,"diff_hunk":"@@ -0,0 +1,354 @@\n+require 'resque'\n+require 'pathname'\n+require 'find'\n+require 'full-name-splitter'\n+\n+# Adds folders/files from extracted email account as new ContentFiles, Instances, and Works,\n+class EmailIngestJob\n+\n+  @queue = :email_ingest\n+\n+  # Ingest individual emails into Valhal\n+  # @param base_dir_path: the name of the folder in which the emails, attachments, and metadata are contained\n+  # @param email_dir_name: the name of the folder from where to ingest emails\n+  # @param attachment_dir_name: the name of the folder in which the attachments are contained\n+  # @param export_file_name: name for Aid4Mail XML file\n+  # @param donor_id: Person id of the donor of the email account\n+  def self.perform(base_dir_path, email_dir_name, attachment_dir_name, export_file_name, donor_id)\n+\n+    fail ArgumentError, 'A path, without trailing slash, to a folder containing data should be given' if\n+        base_dir_path.nil? || base_dir_path.empty?\n+\n+    fail ArgumentError, 'The folder containing data does not exist!' unless File.directory? base_dir_path\n+\n+    fail ArgumentError, 'The Person id of the donor of the email account should be given' if donor_id.nil?\n+\n+    if email_dir_name.nil? || email_dir_name.empty?\n+      email_dir_name = EMAIL_DIR_NAME\n+    end\n+\n+    if attachment_dir_name.nil? || attachment_dir_name.empty?\n+      attachment_dir_name = EMAIL_ATTACHMENT_DIR_NAME\n+    end\n+\n+    if export_file_name.nil? || export_file_name.empty?\n+        export_file_name = EMAIL_EXPORT_FILE_NAME\n+    end\n+\n+    email_dir_path = base_dir_path + '/' + email_dir_name\n+    fail ArgumentError, 'The email folder does not exist!' unless File.directory? email_dir_path\n+\n+    attachment_dir_path = base_dir_path + '/' + attachment_dir_name\n+    fail ArgumentError, 'The attachment folder does not exist!' unless File.directory? attachment_dir_path\n+\n+    export_file_path = base_dir_path + '/' + export_file_name\n+    fail ArgumentError, 'The Aid4Mail export xml file does not exist!' unless File.file? export_file_path\n+\n+    fail 'A MyArchive activity does not exist!' unless Administration::Activity.where(activity: 'MyArchive').size != 0\n+\n+\n+    # Extract metadata from Aid4Mail XML file\n+    email_metadata = EmailXMLIngest.email_xml_ingest(export_file_path, email_dir_path)\n+\n+    dirs_works = Hash.new\n+\n+    # Traverse (in depth first order) the folders present in the email_dir_path and ingest files and folders\n+    Find.find(email_dir_path) do |path|\n+      pathname = Pathname.new(path)\n+\n+      if File.directory?(pathname)\n+        begin\n+          if path != email_dir_path\n+            dirs_works = email_create_folder(pathname, email_metadata, dirs_works, donor_id)\n+          end\n+        rescue => e\n+          Resque.logger.error \"A Valhal object for folder #{pathname} could not be created! Error inspect:\n+                              #{e.inspect}, Error backtrace:  #{e.backtrace.join(\"\\n\")}\"\n+        end\n+      else\n+        begin\n+          if Rails.env == 'test'\n+            EmailCreateEmailJob.perform(pathname.to_s, email_dir_name.to_s, attachment_dir_name.to_s, email_metadata,\n+                                     dirs_works)\n+          else\n+            Resque.enqueue(EmailCreateEmailJob, pathname.to_s, email_dir_name.to_s, attachment_dir_name.to_s,\n+                           email_metadata, dirs_works)\n+          end\n+        rescue => e\n+          Resque.logger.error \"A Valhal object for an email or an attachment could not be created! Error inspect:\n+                              #{e.inspect}, Error backtrace:  #{e.backtrace.join(\"\\n\")}\"\n+        end\n+      end\n+    end\n+  end\n+\n+  # Creates Valhal folder related objects\n+  # @param folder_path: the complete path of the folder\n+  # @param email_metadata: a hash map containing email metadata for the complete email account\n+  # @param dir_works: Hash map containing pairs of paths to folders and their associated works\n+  # @param donor_id: Person id of the donor of the email account\n+  def self.email_create_folder(folder_path, email_metadata, dir_works, donor_id)\n+\n+    work, dir_works = create_work(folder_path, email_metadata, dir_works, nil, nil, donor_id)\n+\n+    instance = create_instance(folder_path, email_metadata, work)\n+\n+    if Rails.env == 'test'\n+      EmailCreateFileJob.perform(folder_path.to_s, instance.id)\n+    else\n+      Resque.enqueue(EmailCreateFileJob, folder_path.to_s, instance.id)\n+    end\n+\n+    Resque.logger.info \"Email ingest #{folder_path.basename.to_s} imported with id #{work.id}\"\n+\n+    return dir_works\n+  end\n+\n+  # Creates a Work\n+  # @param pathname: the complete path of the folder or file for which a Work should be created\n+  # @param email_metadata: a hash map containing email metadata for the complete email account\n+  # @param dir_works: Hash map containing pairs of paths to folders and their associated works\n+  # @param email_work: Work of an email containing attachments\n+  # @param email_work_path_without_suffix: Pathname of email file associated with email_work without suffix\n+  # @param donor_id: Person id of the donor of the email account\n+  def self.create_work(pathname, email_metadata, dir_works, email_work, email_work_path_without_suffix, donor_id)\n+\n+    @unknown = UNKNOWN_NAME\n+\n+    work = Work.new\n+\n+    ctime = File.ctime(pathname)\n+    ctime_iso8601 = ctime.iso8601\n+\n+    if EDTF.parse(ctime_iso8601).nil?\n+      work.origin_date = UNKNOWN_EDTF_DATE\n+    else\n+      work.origin_date = ctime_iso8601.to_s\n+    end\n+\n+\n+    pathname_without_suffix =  pathname.to_s.chomp(File.extname(pathname.to_s))\n+\n+    # A folder\n+    if File.directory?(pathname.to_s)\n+      work = create_folder_work(donor_id, pathname, work)\n+    end\n+\n+    # An email\n+    if File.file?(pathname) && email_metadata.include?(pathname_without_suffix)\n+      work = create_email_work(email_metadata, pathname_without_suffix, work)\n+    end\n+\n+    # An attachment\n+    if File.file?(pathname) &&  !email_work.nil? && email_metadata.include?(email_work_path_without_suffix) &&\n+        !email_metadata[email_work_path_without_suffix][\"attachments\"].empty?\n+      work = create_attachment_work(email_metadata, email_work, email_work_path_without_suffix, pathname, work)\n+    end\n+\n+    fail \"Work could not be saved #{work.errors.messages}\" unless work.save\n+\n+    # Work work relations\n+    parent_folder_path = File.expand_path('..', pathname)\n+\n+    parent_folder_work = dir_works[parent_folder_path]\n+\n+    parent_work = nil\n+    if !parent_folder_work.nil?\n+      parent_work = Work.find(parent_folder_work)\n+    end\n+\n+    if !parent_work.nil?\n+      work.is_part_of = parent_work\n+      parent_work.parts += [work]\n+\n+      fail \"Work could not be saved #{work.errors.messages}\" unless parent_work.save\n+    end\n+\n+    fail \"Work could not be saved #{work.errors.messages}\" unless work.save\n+\n+    if !File.file?(pathname)\n+      dir_works[pathname.to_s] = work.id\n+    end\n+\n+    return work, dir_works\n+  end\n+\n+  def self.create_folder_work(donor_id, pathname, work)\n+\n+    work.add_title({\"value\" => pathname.basename.to_s.chomp(File.extname(pathname.basename.to_s))})\n+    person_default = Authority::Person.find(donor_id)\n+\n+    work.add_author(person_default)\n+\n+    fail \"Folder Work could not be saved #{work.errors.messages}\" unless work.save\n+    return work\n+  end\n+\n+  def self.create_email_work(email_metadata, pathname_without_suffix, work)\n+\n+    # Subject\n+    work.add_title({\"value\" => email_metadata[pathname_without_suffix][\"subject\"].to_s})\n+\n+    # From\n+    if !email_metadata[pathname_without_suffix][\"fromName\"].empty?\n+      from_name = email_metadata[pathname_without_suffix][\"fromName\"].to_s\n+      names = FullNameSplitter.split(from_name)\n+      forename = names[0]\n+      surname = names[1]\n+      person_from = Authority::Person.find_or_create_person(forename, surname)\n+      work.add_author(person_from)\n+    else\n+      person_from = Authority::Person.find_or_create_person(@unknown, @unknown)\n+      work.add_author(person_from)\n+    end\n+\n+    # FromAddr\n+    if !email_metadata[pathname_without_suffix][\"fromAddr\"].empty?\n+      from_addr = email_metadata[pathname_without_suffix][\"fromAddr\"].to_s\n+      person_from.email += [from_addr]\n+      person_from.save\n+    else\n+      person_from.email += [@unknown]\n+      person_from.save\n+    end\n+\n+    # TO\n+    if !email_metadata[pathname_without_suffix][\"to\"].empty?\n+      to = email_metadata[pathname_without_suffix][\"to\"].to_s\n+      work = add_email_recipients(to, work)\n+    else\n+      person_to = Authority::Person.find_or_create_person(@unknown, @unknown)\n+      work.add_recipient(person_to)\n+    end\n+\n+    # CC\n+    if !email_metadata[pathname_without_suffix][\"cc\"].empty?","path":"app/jobs/email_ingest_job.rb","position":225,"original_position":225,"commit_id":"5254f48c842258739b9a4ca3d711227e86516994","original_commit_id":"5254f48c842258739b9a4ca3d711227e86516994","user":{"login":"jolf","id":2600237,"avatar_url":"https://avatars.githubusercontent.com/u/2600237?v=3","gravatar_id":"","url":"https://api.github.com/users/jolf","html_url":"https://github.com/jolf","followers_url":"https://api.github.com/users/jolf/followers","following_url":"https://api.github.com/users/jolf/following{/other_user}","gists_url":"https://api.github.com/users/jolf/gists{/gist_id}","starred_url":"https://api.github.com/users/jolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolf/subscriptions","organizations_url":"https://api.github.com/users/jolf/orgs","repos_url":"https://api.github.com/users/jolf/repos","events_url":"https://api.github.com/users/jolf/events{/privacy}","received_events_url":"https://api.github.com/users/jolf/received_events","type":"User","site_admin":false},"body":"\"blank?\" instead of \"empty?\"","created_at":"2015-11-24T15:49:30Z","updated_at":"2015-11-24T15:49:30Z","html_url":"https://github.com/Det-Kongelige-Bibliotek/valhal/pull/132#discussion_r45752380","pull_request_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/132","_links":{"self":{"href":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/comments/45752380"},"html":{"href":"https://github.com/Det-Kongelige-Bibliotek/valhal/pull/132#discussion_r45752380"},"pull_request":{"href":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/132"}}},"pull_request":{"url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/132","id":50137489,"html_url":"https://github.com/Det-Kongelige-Bibliotek/valhal/pull/132","diff_url":"https://github.com/Det-Kongelige-Bibliotek/valhal/pull/132.diff","patch_url":"https://github.com/Det-Kongelige-Bibliotek/valhal/pull/132.patch","issue_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/issues/132","number":132,"state":"open","locked":false,"title":"Email","user":{"login":"cjen","id":449661,"avatar_url":"https://avatars.githubusercontent.com/u/449661?v=3","gravatar_id":"","url":"https://api.github.com/users/cjen","html_url":"https://github.com/cjen","followers_url":"https://api.github.com/users/cjen/followers","following_url":"https://api.github.com/users/cjen/following{/other_user}","gists_url":"https://api.github.com/users/cjen/gists{/gist_id}","starred_url":"https://api.github.com/users/cjen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjen/subscriptions","organizations_url":"https://api.github.com/users/cjen/orgs","repos_url":"https://api.github.com/users/cjen/repos","events_url":"https://api.github.com/users/cjen/events{/privacy}","received_events_url":"https://api.github.com/users/cjen/received_events","type":"User","site_admin":false},"body":"Adding support for email ingest","created_at":"2015-11-09T15:42:58Z","updated_at":"2015-11-24T15:49:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c7c6568ea13eabe6b8ff597d305ab4c46f9c530a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/132/commits","review_comments_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/132/comments","review_comment_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/issues/132/comments","statuses_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/statuses/5254f48c842258739b9a4ca3d711227e86516994","head":{"label":"Det-Kongelige-Bibliotek:email","ref":"email","sha":"5254f48c842258739b9a4ca3d711227e86516994","user":{"login":"Det-Kongelige-Bibliotek","id":2632010,"avatar_url":"https://avatars.githubusercontent.com/u/2632010?v=3","gravatar_id":"","url":"https://api.github.com/users/Det-Kongelige-Bibliotek","html_url":"https://github.com/Det-Kongelige-Bibliotek","followers_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/followers","following_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/following{/other_user}","gists_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/gists{/gist_id}","starred_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/subscriptions","organizations_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/orgs","repos_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/repos","events_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/events{/privacy}","received_events_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/received_events","type":"Organization","site_admin":false},"repo":{"id":24938485,"name":"valhal","full_name":"Det-Kongelige-Bibliotek/valhal","owner":{"login":"Det-Kongelige-Bibliotek","id":2632010,"avatar_url":"https://avatars.githubusercontent.com/u/2632010?v=3","gravatar_id":"","url":"https://api.github.com/users/Det-Kongelige-Bibliotek","html_url":"https://github.com/Det-Kongelige-Bibliotek","followers_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/followers","following_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/following{/other_user}","gists_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/gists{/gist_id}","starred_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/subscriptions","organizations_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/orgs","repos_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/repos","events_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/events{/privacy}","received_events_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Det-Kongelige-Bibliotek/valhal","description":"Curation and management interface for KB's digital objects","fork":false,"url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal","forks_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/forks","keys_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/teams","hooks_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/hooks","issue_events_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/issues/events{/number}","events_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/events","assignees_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/assignees{/user}","branches_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/branches{/branch}","tags_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/tags","blobs_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/git/refs{/sha}","trees_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/statuses/{sha}","languages_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/languages","stargazers_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/stargazers","contributors_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/contributors","subscribers_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/subscribers","subscription_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/subscription","commits_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/commits{/sha}","git_commits_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/git/commits{/sha}","comments_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/comments{/number}","issue_comment_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/issues/comments{/number}","contents_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/contents/{+path}","compare_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/merges","archive_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/downloads","issues_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/issues{/number}","pulls_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls{/number}","milestones_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/milestones{/number}","notifications_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/labels{/name}","releases_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/releases{/id}","created_at":"2014-10-08T11:56:10Z","updated_at":"2014-12-19T12:33:29Z","pushed_at":"2015-11-18T10:47:54Z","git_url":"git://github.com/Det-Kongelige-Bibliotek/valhal.git","ssh_url":"git@github.com:Det-Kongelige-Bibliotek/valhal.git","clone_url":"https://github.com/Det-Kongelige-Bibliotek/valhal.git","svn_url":"https://github.com/Det-Kongelige-Bibliotek/valhal","homepage":"","size":9223,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":17,"forks":2,"open_issues":17,"watchers":0,"default_branch":"master"}},"base":{"label":"Det-Kongelige-Bibliotek:development","ref":"development","sha":"029d06dbf8a62652918bf30d9fe20985a50447bc","user":{"login":"Det-Kongelige-Bibliotek","id":2632010,"avatar_url":"https://avatars.githubusercontent.com/u/2632010?v=3","gravatar_id":"","url":"https://api.github.com/users/Det-Kongelige-Bibliotek","html_url":"https://github.com/Det-Kongelige-Bibliotek","followers_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/followers","following_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/following{/other_user}","gists_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/gists{/gist_id}","starred_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/subscriptions","organizations_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/orgs","repos_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/repos","events_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/events{/privacy}","received_events_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/received_events","type":"Organization","site_admin":false},"repo":{"id":24938485,"name":"valhal","full_name":"Det-Kongelige-Bibliotek/valhal","owner":{"login":"Det-Kongelige-Bibliotek","id":2632010,"avatar_url":"https://avatars.githubusercontent.com/u/2632010?v=3","gravatar_id":"","url":"https://api.github.com/users/Det-Kongelige-Bibliotek","html_url":"https://github.com/Det-Kongelige-Bibliotek","followers_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/followers","following_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/following{/other_user}","gists_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/gists{/gist_id}","starred_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/subscriptions","organizations_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/orgs","repos_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/repos","events_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/events{/privacy}","received_events_url":"https://api.github.com/users/Det-Kongelige-Bibliotek/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Det-Kongelige-Bibliotek/valhal","description":"Curation and management interface for KB's digital objects","fork":false,"url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal","forks_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/forks","keys_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/teams","hooks_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/hooks","issue_events_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/issues/events{/number}","events_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/events","assignees_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/assignees{/user}","branches_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/branches{/branch}","tags_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/tags","blobs_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/git/refs{/sha}","trees_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/statuses/{sha}","languages_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/languages","stargazers_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/stargazers","contributors_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/contributors","subscribers_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/subscribers","subscription_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/subscription","commits_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/commits{/sha}","git_commits_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/git/commits{/sha}","comments_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/comments{/number}","issue_comment_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/issues/comments{/number}","contents_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/contents/{+path}","compare_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/merges","archive_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/downloads","issues_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/issues{/number}","pulls_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls{/number}","milestones_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/milestones{/number}","notifications_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/labels{/name}","releases_url":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/releases{/id}","created_at":"2014-10-08T11:56:10Z","updated_at":"2014-12-19T12:33:29Z","pushed_at":"2015-11-18T10:47:54Z","git_url":"git://github.com/Det-Kongelige-Bibliotek/valhal.git","ssh_url":"git@github.com:Det-Kongelige-Bibliotek/valhal.git","clone_url":"https://github.com/Det-Kongelige-Bibliotek/valhal.git","svn_url":"https://github.com/Det-Kongelige-Bibliotek/valhal","homepage":"","size":9223,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":17,"forks":2,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/132"},"html":{"href":"https://github.com/Det-Kongelige-Bibliotek/valhal/pull/132"},"issue":{"href":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/issues/132"},"comments":{"href":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/issues/132/comments"},"review_comments":{"href":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/132/comments"},"review_comment":{"href":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/pulls/132/commits"},"statuses":{"href":"https://api.github.com/repos/Det-Kongelige-Bibliotek/valhal/statuses/5254f48c842258739b9a4ca3d711227e86516994"}}}}