{"action":"created","comment":{"url":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/comments/204298500","pull_request_review_id":139351505,"id":204298500,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDI5ODUwMA==","diff_hunk":"@@ -0,0 +1,31 @@\n+#include \"ModulePackageMaker.hpp\"\n+#include \"modulemd/ModuleMetadata.hpp\"\n+\n+#include <memory>\n+\n+std::map<Id, std::shared_ptr<ModulePackage>> ModulePackageMaker::fromFile(Pool *pool, HyRepo repo, const std::string &filePath)\n+{\n+    auto metadata = ModuleMetadata::metadataFromFile(filePath);\n+    return createModulePackages(pool, repo, metadata);\n+}\n+\n+std::map<Id, std::shared_ptr<ModulePackage>> ModulePackageMaker::fromString(Pool *pool, HyRepo repo, const std::string &fileContent)\n+{\n+    auto metadata = ModuleMetadata::metadataFromString(fileContent);\n+    return createModulePackages(pool, repo, metadata);\n+}\n+\n+std::map<Id, std::shared_ptr<ModulePackage>> ModulePackageMaker::createModulePackages(Pool *pool, HyRepo repo, const std::vector<std::shared_ptr<ModuleMetadata>> &metadata)\n+{\n+    std::map<Id, std::shared_ptr<ModulePackage>> modules;\n+\n+    Repo *solvRepo = repo->libsolv_repo;\n+    Repo *clonedRepo = repo_create(pool, solvRepo->name);\n+\n+    for (auto data : metadata) {\n+        auto modulePackage = std::make_shared<ModulePackage>(pool, clonedRepo, data);\n+        modules.insert(std::make_pair(modulePackage->getId(), modulePackage));","path":"libdnf/module/ModulePackageMaker.cpp","position":27,"original_position":27,"commit_id":"bb4780523c76a5b1b7f65608be0fc0f6e5466159","original_commit_id":"bb4780523c76a5b1b7f65608be0fc0f6e5466159","user":{"login":"mhatina","id":7964232,"node_id":"MDQ6VXNlcjc5NjQyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/7964232?v=4","gravatar_id":"","url":"https://api.github.com/users/mhatina","html_url":"https://github.com/mhatina","followers_url":"https://api.github.com/users/mhatina/followers","following_url":"https://api.github.com/users/mhatina/following{/other_user}","gists_url":"https://api.github.com/users/mhatina/gists{/gist_id}","starred_url":"https://api.github.com/users/mhatina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhatina/subscriptions","organizations_url":"https://api.github.com/users/mhatina/orgs","repos_url":"https://api.github.com/users/mhatina/repos","events_url":"https://api.github.com/users/mhatina/events{/privacy}","received_events_url":"https://api.github.com/users/mhatina/received_events","type":"User","site_admin":false},"body":"Libsolv returns only id, which somehow needs to be mapped to ModulePackage.","created_at":"2018-07-23T07:04:48Z","updated_at":"2018-07-23T07:04:48Z","html_url":"https://github.com/rpm-software-management/libdnf/pull/494#discussion_r204298500","pull_request_url":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/494","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/comments/204298500"},"html":{"href":"https://github.com/rpm-software-management/libdnf/pull/494#discussion_r204298500"},"pull_request":{"href":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/494"}},"in_reply_to_id":202719889},"pull_request":{"url":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/494","id":200900448,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwOTAwNDQ4","html_url":"https://github.com/rpm-software-management/libdnf/pull/494","diff_url":"https://github.com/rpm-software-management/libdnf/pull/494.diff","patch_url":"https://github.com/rpm-software-management/libdnf/pull/494.patch","issue_url":"https://api.github.com/repos/rpm-software-management/libdnf/issues/494","number":494,"state":"open","locked":false,"title":"[modularity] introduce proper modular dependency solving","user":{"login":"mhatina","id":7964232,"node_id":"MDQ6VXNlcjc5NjQyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/7964232?v=4","gravatar_id":"","url":"https://api.github.com/users/mhatina","html_url":"https://github.com/mhatina","followers_url":"https://api.github.com/users/mhatina/followers","following_url":"https://api.github.com/users/mhatina/following{/other_user}","gists_url":"https://api.github.com/users/mhatina/gists{/gist_id}","starred_url":"https://api.github.com/users/mhatina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhatina/subscriptions","organizations_url":"https://api.github.com/users/mhatina/orgs","repos_url":"https://api.github.com/users/mhatina/repos","events_url":"https://api.github.com/users/mhatina/events{/privacy}","received_events_url":"https://api.github.com/users/mhatina/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-12T06:33:59Z","updated_at":"2018-07-23T07:04:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2da1f94544fade2f8deebc56a39969b467e56d42","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/494/commits","review_comments_url":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/494/comments","review_comment_url":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rpm-software-management/libdnf/issues/494/comments","statuses_url":"https://api.github.com/repos/rpm-software-management/libdnf/statuses/bb4780523c76a5b1b7f65608be0fc0f6e5466159","head":{"label":"mhatina:modular_depsolving","ref":"modular_depsolving","sha":"bb4780523c76a5b1b7f65608be0fc0f6e5466159","user":{"login":"mhatina","id":7964232,"node_id":"MDQ6VXNlcjc5NjQyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/7964232?v=4","gravatar_id":"","url":"https://api.github.com/users/mhatina","html_url":"https://github.com/mhatina","followers_url":"https://api.github.com/users/mhatina/followers","following_url":"https://api.github.com/users/mhatina/following{/other_user}","gists_url":"https://api.github.com/users/mhatina/gists{/gist_id}","starred_url":"https://api.github.com/users/mhatina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhatina/subscriptions","organizations_url":"https://api.github.com/users/mhatina/orgs","repos_url":"https://api.github.com/users/mhatina/repos","events_url":"https://api.github.com/users/mhatina/events{/privacy}","received_events_url":"https://api.github.com/users/mhatina/received_events","type":"User","site_admin":false},"repo":{"id":100239233,"node_id":"MDEwOlJlcG9zaXRvcnkxMDAyMzkyMzM=","name":"libdnf","full_name":"mhatina/libdnf","owner":{"login":"mhatina","id":7964232,"node_id":"MDQ6VXNlcjc5NjQyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/7964232?v=4","gravatar_id":"","url":"https://api.github.com/users/mhatina","html_url":"https://github.com/mhatina","followers_url":"https://api.github.com/users/mhatina/followers","following_url":"https://api.github.com/users/mhatina/following{/other_user}","gists_url":"https://api.github.com/users/mhatina/gists{/gist_id}","starred_url":"https://api.github.com/users/mhatina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhatina/subscriptions","organizations_url":"https://api.github.com/users/mhatina/orgs","repos_url":"https://api.github.com/users/mhatina/repos","events_url":"https://api.github.com/users/mhatina/events{/privacy}","received_events_url":"https://api.github.com/users/mhatina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhatina/libdnf","description":"Simple package manager built on top of hawkey and librepo","fork":true,"url":"https://api.github.com/repos/mhatina/libdnf","forks_url":"https://api.github.com/repos/mhatina/libdnf/forks","keys_url":"https://api.github.com/repos/mhatina/libdnf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhatina/libdnf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhatina/libdnf/teams","hooks_url":"https://api.github.com/repos/mhatina/libdnf/hooks","issue_events_url":"https://api.github.com/repos/mhatina/libdnf/issues/events{/number}","events_url":"https://api.github.com/repos/mhatina/libdnf/events","assignees_url":"https://api.github.com/repos/mhatina/libdnf/assignees{/user}","branches_url":"https://api.github.com/repos/mhatina/libdnf/branches{/branch}","tags_url":"https://api.github.com/repos/mhatina/libdnf/tags","blobs_url":"https://api.github.com/repos/mhatina/libdnf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhatina/libdnf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhatina/libdnf/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhatina/libdnf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhatina/libdnf/statuses/{sha}","languages_url":"https://api.github.com/repos/mhatina/libdnf/languages","stargazers_url":"https://api.github.com/repos/mhatina/libdnf/stargazers","contributors_url":"https://api.github.com/repos/mhatina/libdnf/contributors","subscribers_url":"https://api.github.com/repos/mhatina/libdnf/subscribers","subscription_url":"https://api.github.com/repos/mhatina/libdnf/subscription","commits_url":"https://api.github.com/repos/mhatina/libdnf/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhatina/libdnf/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhatina/libdnf/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhatina/libdnf/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhatina/libdnf/contents/{+path}","compare_url":"https://api.github.com/repos/mhatina/libdnf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhatina/libdnf/merges","archive_url":"https://api.github.com/repos/mhatina/libdnf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhatina/libdnf/downloads","issues_url":"https://api.github.com/repos/mhatina/libdnf/issues{/number}","pulls_url":"https://api.github.com/repos/mhatina/libdnf/pulls{/number}","milestones_url":"https://api.github.com/repos/mhatina/libdnf/milestones{/number}","notifications_url":"https://api.github.com/repos/mhatina/libdnf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhatina/libdnf/labels{/name}","releases_url":"https://api.github.com/repos/mhatina/libdnf/releases{/id}","deployments_url":"https://api.github.com/repos/mhatina/libdnf/deployments","created_at":"2017-08-14T07:14:49Z","updated_at":"2017-08-14T07:14:51Z","pushed_at":"2018-07-13T14:25:11Z","git_url":"git://github.com/mhatina/libdnf.git","ssh_url":"git@github.com:mhatina/libdnf.git","clone_url":"https://github.com/mhatina/libdnf.git","svn_url":"https://github.com/mhatina/libdnf","homepage":null,"size":6806,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rpm-software-management:master","ref":"master","sha":"d863a1560ac34270e31c4446b39eb1b807f7f6b0","user":{"login":"rpm-software-management","id":8504469,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MDQ0Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/8504469?v=4","gravatar_id":"","url":"https://api.github.com/users/rpm-software-management","html_url":"https://github.com/rpm-software-management","followers_url":"https://api.github.com/users/rpm-software-management/followers","following_url":"https://api.github.com/users/rpm-software-management/following{/other_user}","gists_url":"https://api.github.com/users/rpm-software-management/gists{/gist_id}","starred_url":"https://api.github.com/users/rpm-software-management/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpm-software-management/subscriptions","organizations_url":"https://api.github.com/users/rpm-software-management/orgs","repos_url":"https://api.github.com/users/rpm-software-management/repos","events_url":"https://api.github.com/users/rpm-software-management/events{/privacy}","received_events_url":"https://api.github.com/users/rpm-software-management/received_events","type":"Organization","site_admin":false},"repo":{"id":18206372,"node_id":"MDEwOlJlcG9zaXRvcnkxODIwNjM3Mg==","name":"libdnf","full_name":"rpm-software-management/libdnf","owner":{"login":"rpm-software-management","id":8504469,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MDQ0Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/8504469?v=4","gravatar_id":"","url":"https://api.github.com/users/rpm-software-management","html_url":"https://github.com/rpm-software-management","followers_url":"https://api.github.com/users/rpm-software-management/followers","following_url":"https://api.github.com/users/rpm-software-management/following{/other_user}","gists_url":"https://api.github.com/users/rpm-software-management/gists{/gist_id}","starred_url":"https://api.github.com/users/rpm-software-management/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpm-software-management/subscriptions","organizations_url":"https://api.github.com/users/rpm-software-management/orgs","repos_url":"https://api.github.com/users/rpm-software-management/repos","events_url":"https://api.github.com/users/rpm-software-management/events{/privacy}","received_events_url":"https://api.github.com/users/rpm-software-management/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rpm-software-management/libdnf","description":"Software management library.","fork":false,"url":"https://api.github.com/repos/rpm-software-management/libdnf","forks_url":"https://api.github.com/repos/rpm-software-management/libdnf/forks","keys_url":"https://api.github.com/repos/rpm-software-management/libdnf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rpm-software-management/libdnf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rpm-software-management/libdnf/teams","hooks_url":"https://api.github.com/repos/rpm-software-management/libdnf/hooks","issue_events_url":"https://api.github.com/repos/rpm-software-management/libdnf/issues/events{/number}","events_url":"https://api.github.com/repos/rpm-software-management/libdnf/events","assignees_url":"https://api.github.com/repos/rpm-software-management/libdnf/assignees{/user}","branches_url":"https://api.github.com/repos/rpm-software-management/libdnf/branches{/branch}","tags_url":"https://api.github.com/repos/rpm-software-management/libdnf/tags","blobs_url":"https://api.github.com/repos/rpm-software-management/libdnf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rpm-software-management/libdnf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rpm-software-management/libdnf/git/refs{/sha}","trees_url":"https://api.github.com/repos/rpm-software-management/libdnf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rpm-software-management/libdnf/statuses/{sha}","languages_url":"https://api.github.com/repos/rpm-software-management/libdnf/languages","stargazers_url":"https://api.github.com/repos/rpm-software-management/libdnf/stargazers","contributors_url":"https://api.github.com/repos/rpm-software-management/libdnf/contributors","subscribers_url":"https://api.github.com/repos/rpm-software-management/libdnf/subscribers","subscription_url":"https://api.github.com/repos/rpm-software-management/libdnf/subscription","commits_url":"https://api.github.com/repos/rpm-software-management/libdnf/commits{/sha}","git_commits_url":"https://api.github.com/repos/rpm-software-management/libdnf/git/commits{/sha}","comments_url":"https://api.github.com/repos/rpm-software-management/libdnf/comments{/number}","issue_comment_url":"https://api.github.com/repos/rpm-software-management/libdnf/issues/comments{/number}","contents_url":"https://api.github.com/repos/rpm-software-management/libdnf/contents/{+path}","compare_url":"https://api.github.com/repos/rpm-software-management/libdnf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rpm-software-management/libdnf/merges","archive_url":"https://api.github.com/repos/rpm-software-management/libdnf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rpm-software-management/libdnf/downloads","issues_url":"https://api.github.com/repos/rpm-software-management/libdnf/issues{/number}","pulls_url":"https://api.github.com/repos/rpm-software-management/libdnf/pulls{/number}","milestones_url":"https://api.github.com/repos/rpm-software-management/libdnf/milestones{/number}","notifications_url":"https://api.github.com/repos/rpm-software-management/libdnf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rpm-software-management/libdnf/labels{/name}","releases_url":"https://api.github.com/repos/rpm-software-management/libdnf/releases{/id}","deployments_url":"https://api.github.com/repos/rpm-software-management/libdnf/deployments","created_at":"2014-03-28T09:00:31Z","updated_at":"2018-07-22T12:52:48Z","pushed_at":"2018-07-23T06:25:57Z","git_url":"git://github.com/rpm-software-management/libdnf.git","ssh_url":"git@github.com:rpm-software-management/libdnf.git","clone_url":"https://github.com/rpm-software-management/libdnf.git","svn_url":"https://github.com/rpm-software-management/libdnf","homepage":"","size":6633,"stargazers_count":48,"watchers_count":48,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":61,"mirror_url":null,"archived":false,"open_issues_count":56,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":61,"open_issues":56,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/494"},"html":{"href":"https://github.com/rpm-software-management/libdnf/pull/494"},"issue":{"href":"https://api.github.com/repos/rpm-software-management/libdnf/issues/494"},"comments":{"href":"https://api.github.com/repos/rpm-software-management/libdnf/issues/494/comments"},"review_comments":{"href":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/494/comments"},"review_comment":{"href":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rpm-software-management/libdnf/pulls/494/commits"},"statuses":{"href":"https://api.github.com/repos/rpm-software-management/libdnf/statuses/bb4780523c76a5b1b7f65608be0fc0f6e5466159"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mhatina"}}