{"action":"created","comment":{"url":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/comments/210020831","pull_request_review_id":146150036,"id":210020831,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDAyMDgzMQ==","diff_hunk":"@@ -341,6 +350,27 @@ def test_typo_fix_spec_hook(self, spec_object):\n         assert '- This is changelog entry with some intentional typos' in spec_object.spec_content.sections[\n             '%changelog']\n \n+    def test_paths_to_rpm_macros_spec_hook(self, spec_object):\n+        files = {\n+            '/usr/share/man/man1/*': '%{_mandir}/man1/*',\n+            '/usr/bin/%{name}': '%{_bindir}/%{name}',\n+            '%config(noreplace) /etc/test/test.conf': '%config(noreplace) %{_sysconfdir}/test/test.conf',\n+        }\n+        files_devel = {\n+            '/usr/share/test1.txt': '%{_datadir}/test1.txt',\n+            '/no/macros/here': '/no/macros/here',\n+        }\n+        for path in files:\n+            assert path in spec_object.spec_content.sections['%files']\n+        for path in files_devel:\n+            assert path in spec_object.spec_content.sections['%files devel']\n+        PathsToRPMMacrosHook.run(spec_object, spec_object)\n+\n+        for expected_output in six.itervalues(files):\n+            assert expected_output in spec_object.spec_content.sections['%files']\n+        for expected_output in six.itervalues(files_devel):\n+            assert expected_output in spec_object.spec_content.sections['%files devel']\n+","path":"rebasehelper/tests/test_specfile.py","position":67,"original_position":67,"commit_id":"277ae29da36ba6de696170e15c5854df8795f0da","original_commit_id":"277ae29da36ba6de696170e15c5854df8795f0da","user":{"login":"nforro","id":14923067,"node_id":"MDQ6VXNlcjE0OTIzMDY3","avatar_url":"https://avatars3.githubusercontent.com/u/14923067?v=4","gravatar_id":"","url":"https://api.github.com/users/nforro","html_url":"https://github.com/nforro","followers_url":"https://api.github.com/users/nforro/followers","following_url":"https://api.github.com/users/nforro/following{/other_user}","gists_url":"https://api.github.com/users/nforro/gists{/gist_id}","starred_url":"https://api.github.com/users/nforro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nforro/subscriptions","organizations_url":"https://api.github.com/users/nforro/orgs","repos_url":"https://api.github.com/users/nforro/repos","events_url":"https://api.github.com/users/nforro/events{/privacy}","received_events_url":"https://api.github.com/users/nforro/received_events","type":"User","site_admin":false},"body":"Because you are not really testing that the specified paths changed as expected (line index is discarded), if someone adds a different path that is equal to some of the current paths after processing, the test will no longer be reliable.\r\nBut I suppose it's not really such a big problem here.","created_at":"2018-08-14T16:36:08Z","updated_at":"2018-08-14T16:36:09Z","html_url":"https://github.com/rebase-helper/rebase-helper/pull/509#discussion_r210020831","pull_request_url":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/509","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/comments/210020831"},"html":{"href":"https://github.com/rebase-helper/rebase-helper/pull/509#discussion_r210020831"},"pull_request":{"href":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/509"}},"in_reply_to_id":210007485},"pull_request":{"url":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/509","id":197107147,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3MTA3MTQ3","html_url":"https://github.com/rebase-helper/rebase-helper/pull/509","diff_url":"https://github.com/rebase-helper/rebase-helper/pull/509.diff","patch_url":"https://github.com/rebase-helper/rebase-helper/pull/509.patch","issue_url":"https://api.github.com/repos/rebase-helper/rebase-helper/issues/509","number":509,"state":"open","locked":false,"title":"Add PathsToRPMMacros SPEC Hook","user":{"login":"FrNecas","id":28452337,"node_id":"MDQ6VXNlcjI4NDUyMzM3","avatar_url":"https://avatars1.githubusercontent.com/u/28452337?v=4","gravatar_id":"","url":"https://api.github.com/users/FrNecas","html_url":"https://github.com/FrNecas","followers_url":"https://api.github.com/users/FrNecas/followers","following_url":"https://api.github.com/users/FrNecas/following{/other_user}","gists_url":"https://api.github.com/users/FrNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/FrNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrNecas/subscriptions","organizations_url":"https://api.github.com/users/FrNecas/orgs","repos_url":"https://api.github.com/users/FrNecas/repos","events_url":"https://api.github.com/users/FrNecas/events{/privacy}","received_events_url":"https://api.github.com/users/FrNecas/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-25T13:08:57Z","updated_at":"2018-08-14T16:36:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e07ec9a0cba60410a3b616c7fb39b2c40f0240dc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/509/commits","review_comments_url":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/509/comments","review_comment_url":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rebase-helper/rebase-helper/issues/509/comments","statuses_url":"https://api.github.com/repos/rebase-helper/rebase-helper/statuses/277ae29da36ba6de696170e15c5854df8795f0da","head":{"label":"rebase-helper:frnecas-paths-to-rpm-macros","ref":"frnecas-paths-to-rpm-macros","sha":"277ae29da36ba6de696170e15c5854df8795f0da","user":{"login":"rebase-helper","id":20593189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNTkzMTg5","avatar_url":"https://avatars3.githubusercontent.com/u/20593189?v=4","gravatar_id":"","url":"https://api.github.com/users/rebase-helper","html_url":"https://github.com/rebase-helper","followers_url":"https://api.github.com/users/rebase-helper/followers","following_url":"https://api.github.com/users/rebase-helper/following{/other_user}","gists_url":"https://api.github.com/users/rebase-helper/gists{/gist_id}","starred_url":"https://api.github.com/users/rebase-helper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebase-helper/subscriptions","organizations_url":"https://api.github.com/users/rebase-helper/orgs","repos_url":"https://api.github.com/users/rebase-helper/repos","events_url":"https://api.github.com/users/rebase-helper/events{/privacy}","received_events_url":"https://api.github.com/users/rebase-helper/received_events","type":"Organization","site_admin":false},"repo":{"id":12696975,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY5Njk3NQ==","name":"rebase-helper","full_name":"rebase-helper/rebase-helper","owner":{"login":"rebase-helper","id":20593189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNTkzMTg5","avatar_url":"https://avatars3.githubusercontent.com/u/20593189?v=4","gravatar_id":"","url":"https://api.github.com/users/rebase-helper","html_url":"https://github.com/rebase-helper","followers_url":"https://api.github.com/users/rebase-helper/followers","following_url":"https://api.github.com/users/rebase-helper/following{/other_user}","gists_url":"https://api.github.com/users/rebase-helper/gists{/gist_id}","starred_url":"https://api.github.com/users/rebase-helper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebase-helper/subscriptions","organizations_url":"https://api.github.com/users/rebase-helper/orgs","repos_url":"https://api.github.com/users/rebase-helper/repos","events_url":"https://api.github.com/users/rebase-helper/events{/privacy}","received_events_url":"https://api.github.com/users/rebase-helper/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rebase-helper/rebase-helper","description":"This tool helps you to rebase your package to the latest version","fork":false,"url":"https://api.github.com/repos/rebase-helper/rebase-helper","forks_url":"https://api.github.com/repos/rebase-helper/rebase-helper/forks","keys_url":"https://api.github.com/repos/rebase-helper/rebase-helper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rebase-helper/rebase-helper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rebase-helper/rebase-helper/teams","hooks_url":"https://api.github.com/repos/rebase-helper/rebase-helper/hooks","issue_events_url":"https://api.github.com/repos/rebase-helper/rebase-helper/issues/events{/number}","events_url":"https://api.github.com/repos/rebase-helper/rebase-helper/events","assignees_url":"https://api.github.com/repos/rebase-helper/rebase-helper/assignees{/user}","branches_url":"https://api.github.com/repos/rebase-helper/rebase-helper/branches{/branch}","tags_url":"https://api.github.com/repos/rebase-helper/rebase-helper/tags","blobs_url":"https://api.github.com/repos/rebase-helper/rebase-helper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rebase-helper/rebase-helper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rebase-helper/rebase-helper/git/refs{/sha}","trees_url":"https://api.github.com/repos/rebase-helper/rebase-helper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rebase-helper/rebase-helper/statuses/{sha}","languages_url":"https://api.github.com/repos/rebase-helper/rebase-helper/languages","stargazers_url":"https://api.github.com/repos/rebase-helper/rebase-helper/stargazers","contributors_url":"https://api.github.com/repos/rebase-helper/rebase-helper/contributors","subscribers_url":"https://api.github.com/repos/rebase-helper/rebase-helper/subscribers","subscription_url":"https://api.github.com/repos/rebase-helper/rebase-helper/subscription","commits_url":"https://api.github.com/repos/rebase-helper/rebase-helper/commits{/sha}","git_commits_url":"https://api.github.com/repos/rebase-helper/rebase-helper/git/commits{/sha}","comments_url":"https://api.github.com/repos/rebase-helper/rebase-helper/comments{/number}","issue_comment_url":"https://api.github.com/repos/rebase-helper/rebase-helper/issues/comments{/number}","contents_url":"https://api.github.com/repos/rebase-helper/rebase-helper/contents/{+path}","compare_url":"https://api.github.com/repos/rebase-helper/rebase-helper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rebase-helper/rebase-helper/merges","archive_url":"https://api.github.com/repos/rebase-helper/rebase-helper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rebase-helper/rebase-helper/downloads","issues_url":"https://api.github.com/repos/rebase-helper/rebase-helper/issues{/number}","pulls_url":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls{/number}","milestones_url":"https://api.github.com/repos/rebase-helper/rebase-helper/milestones{/number}","notifications_url":"https://api.github.com/repos/rebase-helper/rebase-helper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rebase-helper/rebase-helper/labels{/name}","releases_url":"https://api.github.com/repos/rebase-helper/rebase-helper/releases{/id}","deployments_url":"https://api.github.com/repos/rebase-helper/rebase-helper/deployments","created_at":"2013-09-09T08:48:30Z","updated_at":"2018-08-03T19:45:32Z","pushed_at":"2018-08-14T15:30:17Z","git_url":"git://github.com/rebase-helper/rebase-helper.git","ssh_url":"git@github.com:rebase-helper/rebase-helper.git","clone_url":"https://github.com/rebase-helper/rebase-helper.git","svn_url":"https://github.com/rebase-helper/rebase-helper","homepage":"https://rebase-helper.readthedocs.io/","size":3461,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":40,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":15,"open_issues":40,"watchers":30,"default_branch":"master"}},"base":{"label":"rebase-helper:master","ref":"master","sha":"caf6beb378ff10787f9c8400b6f085d5fa5c92cd","user":{"login":"rebase-helper","id":20593189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNTkzMTg5","avatar_url":"https://avatars3.githubusercontent.com/u/20593189?v=4","gravatar_id":"","url":"https://api.github.com/users/rebase-helper","html_url":"https://github.com/rebase-helper","followers_url":"https://api.github.com/users/rebase-helper/followers","following_url":"https://api.github.com/users/rebase-helper/following{/other_user}","gists_url":"https://api.github.com/users/rebase-helper/gists{/gist_id}","starred_url":"https://api.github.com/users/rebase-helper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebase-helper/subscriptions","organizations_url":"https://api.github.com/users/rebase-helper/orgs","repos_url":"https://api.github.com/users/rebase-helper/repos","events_url":"https://api.github.com/users/rebase-helper/events{/privacy}","received_events_url":"https://api.github.com/users/rebase-helper/received_events","type":"Organization","site_admin":false},"repo":{"id":12696975,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY5Njk3NQ==","name":"rebase-helper","full_name":"rebase-helper/rebase-helper","owner":{"login":"rebase-helper","id":20593189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNTkzMTg5","avatar_url":"https://avatars3.githubusercontent.com/u/20593189?v=4","gravatar_id":"","url":"https://api.github.com/users/rebase-helper","html_url":"https://github.com/rebase-helper","followers_url":"https://api.github.com/users/rebase-helper/followers","following_url":"https://api.github.com/users/rebase-helper/following{/other_user}","gists_url":"https://api.github.com/users/rebase-helper/gists{/gist_id}","starred_url":"https://api.github.com/users/rebase-helper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebase-helper/subscriptions","organizations_url":"https://api.github.com/users/rebase-helper/orgs","repos_url":"https://api.github.com/users/rebase-helper/repos","events_url":"https://api.github.com/users/rebase-helper/events{/privacy}","received_events_url":"https://api.github.com/users/rebase-helper/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rebase-helper/rebase-helper","description":"This tool helps you to rebase your package to the latest version","fork":false,"url":"https://api.github.com/repos/rebase-helper/rebase-helper","forks_url":"https://api.github.com/repos/rebase-helper/rebase-helper/forks","keys_url":"https://api.github.com/repos/rebase-helper/rebase-helper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rebase-helper/rebase-helper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rebase-helper/rebase-helper/teams","hooks_url":"https://api.github.com/repos/rebase-helper/rebase-helper/hooks","issue_events_url":"https://api.github.com/repos/rebase-helper/rebase-helper/issues/events{/number}","events_url":"https://api.github.com/repos/rebase-helper/rebase-helper/events","assignees_url":"https://api.github.com/repos/rebase-helper/rebase-helper/assignees{/user}","branches_url":"https://api.github.com/repos/rebase-helper/rebase-helper/branches{/branch}","tags_url":"https://api.github.com/repos/rebase-helper/rebase-helper/tags","blobs_url":"https://api.github.com/repos/rebase-helper/rebase-helper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rebase-helper/rebase-helper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rebase-helper/rebase-helper/git/refs{/sha}","trees_url":"https://api.github.com/repos/rebase-helper/rebase-helper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rebase-helper/rebase-helper/statuses/{sha}","languages_url":"https://api.github.com/repos/rebase-helper/rebase-helper/languages","stargazers_url":"https://api.github.com/repos/rebase-helper/rebase-helper/stargazers","contributors_url":"https://api.github.com/repos/rebase-helper/rebase-helper/contributors","subscribers_url":"https://api.github.com/repos/rebase-helper/rebase-helper/subscribers","subscription_url":"https://api.github.com/repos/rebase-helper/rebase-helper/subscription","commits_url":"https://api.github.com/repos/rebase-helper/rebase-helper/commits{/sha}","git_commits_url":"https://api.github.com/repos/rebase-helper/rebase-helper/git/commits{/sha}","comments_url":"https://api.github.com/repos/rebase-helper/rebase-helper/comments{/number}","issue_comment_url":"https://api.github.com/repos/rebase-helper/rebase-helper/issues/comments{/number}","contents_url":"https://api.github.com/repos/rebase-helper/rebase-helper/contents/{+path}","compare_url":"https://api.github.com/repos/rebase-helper/rebase-helper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rebase-helper/rebase-helper/merges","archive_url":"https://api.github.com/repos/rebase-helper/rebase-helper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rebase-helper/rebase-helper/downloads","issues_url":"https://api.github.com/repos/rebase-helper/rebase-helper/issues{/number}","pulls_url":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls{/number}","milestones_url":"https://api.github.com/repos/rebase-helper/rebase-helper/milestones{/number}","notifications_url":"https://api.github.com/repos/rebase-helper/rebase-helper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rebase-helper/rebase-helper/labels{/name}","releases_url":"https://api.github.com/repos/rebase-helper/rebase-helper/releases{/id}","deployments_url":"https://api.github.com/repos/rebase-helper/rebase-helper/deployments","created_at":"2013-09-09T08:48:30Z","updated_at":"2018-08-03T19:45:32Z","pushed_at":"2018-08-14T15:30:17Z","git_url":"git://github.com/rebase-helper/rebase-helper.git","ssh_url":"git@github.com:rebase-helper/rebase-helper.git","clone_url":"https://github.com/rebase-helper/rebase-helper.git","svn_url":"https://github.com/rebase-helper/rebase-helper","homepage":"https://rebase-helper.readthedocs.io/","size":3461,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":40,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":15,"open_issues":40,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/509"},"html":{"href":"https://github.com/rebase-helper/rebase-helper/pull/509"},"issue":{"href":"https://api.github.com/repos/rebase-helper/rebase-helper/issues/509"},"comments":{"href":"https://api.github.com/repos/rebase-helper/rebase-helper/issues/509/comments"},"review_comments":{"href":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/509/comments"},"review_comment":{"href":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rebase-helper/rebase-helper/pulls/509/commits"},"statuses":{"href":"https://api.github.com/repos/rebase-helper/rebase-helper/statuses/277ae29da36ba6de696170e15c5854df8795f0da"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"nforro"}}