payload: {"action":"created","comment":{"url":"https://api.github.com/repos/kytos/kytos-utils/pulls/comments/286133877","pull_request_review_id":240185373,"id":286133877,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4NjEzMzg3Nw==","diff_hunk":"@@ -453,14 +453,18 @@ def build_napp_package(napp_name):\n                 package that will be POSTed to the napp server.\n \n         \"\"\"\n-        ignored_extensions = ['.swp', '.pyc', '.napp']\n-        ignored_dirs = ['__pycache__', '.git', '.tox']\n         files = os.listdir()\n-        for filename in files:\n-            if os.path.isfile(filename) and '.' in filename and \\\n-                    filename.rsplit('.', 1)[1] in ignored_extensions:\n-                files.remove(filename)\n-            elif os.path.isdir(filename) and filename in ignored_dirs:\n+        ignored_files = [\".git\"]\n+        with open(\".gitignore\", 'r') as kytosignore:\n+            for line in kytosignore:\n+                if re.search(r\"^(#+|\\s*$)\", line):\n+                    continue\n+                line = re.sub(\"^[*]|^/|(/|\\n)$\", '', line)","path":"kytos/utils/napps.py","position":17,"original_position":17,"commit_id":"26a820d445c459192017116b26157d4a1ea6dfb2","original_commit_id":"26a820d445c459192017116b26157d4a1ea6dfb2","user":{"login":"hdiogenes","id":3139,"node_id":"MDQ6VXNlcjMxMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/3139?v=4","gravatar_id":"","url":"https://api.github.com/users/hdiogenes","html_url":"https://github.com/hdiogenes","followers_url":"https://api.github.com/users/hdiogenes/followers","following_url":"https://api.github.com/users/hdiogenes/following{/other_user}","gists_url":"https://api.github.com/users/hdiogenes/gists{/gist_id}","starred_url":"https://api.github.com/users/hdiogenes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdiogenes/subscriptions","organizations_url":"https://api.github.com/users/hdiogenes/orgs","repos_url":"https://api.github.com/users/hdiogenes/repos","events_url":"https://api.github.com/users/hdiogenes/events{/privacy}","received_events_url":"https://api.github.com/users/hdiogenes/received_events","type":"User","site_admin":false},"body":"Please add a comment telling readers what is the intention behind this regexp substitution. ","created_at":"2019-05-21T17:14:38Z","updated_at":"2019-05-21T17:14:38Z","html_url":"https://github.com/kytos/kytos-utils/pull/220#discussion_r286133877","pull_request_url":"https://api.github.com/repos/kytos/kytos-utils/pulls/220","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kytos/kytos-utils/pulls/comments/286133877"},"html":{"href":"https://github.com/kytos/kytos-utils/pull/220#discussion_r286133877"},"pull_request":{"href":"https://api.github.com/repos/kytos/kytos-utils/pulls/220"}}},"pull_request":{"url":"https://api.github.com/repos/kytos/kytos-utils/pulls/220","id":276272445,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc2MjcyNDQ1","html_url":"https://github.com/kytos/kytos-utils/pull/220","diff_url":"https://github.com/kytos/kytos-utils/pull/220.diff","patch_url":"https://github.com/kytos/kytos-utils/pull/220.patch","issue_url":"https://api.github.com/repos/kytos/kytos-utils/issues/220","number":220,"state":"open","locked":false,"title":"Ignore files from .gitignore when packaging a NApp (#899)","user":{"login":"gleybersonandrade","id":20271875,"node_id":"MDQ6VXNlcjIwMjcxODc1","avatar_url":"https://avatars2.githubusercontent.com/u/20271875?v=4","gravatar_id":"","url":"https://api.github.com/users/gleybersonandrade","html_url":"https://github.com/gleybersonandrade","followers_url":"https://api.github.com/users/gleybersonandrade/followers","following_url":"https://api.github.com/users/gleybersonandrade/following{/other_user}","gists_url":"https://api.github.com/users/gleybersonandrade/gists{/gist_id}","starred_url":"https://api.github.com/users/gleybersonandrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gleybersonandrade/subscriptions","organizations_url":"https://api.github.com/users/gleybersonandrade/orgs","repos_url":"https://api.github.com/users/gleybersonandrade/repos","events_url":"https://api.github.com/users/gleybersonandrade/events{/privacy}","received_events_url":"https://api.github.com/users/gleybersonandrade/received_events","type":"User","site_admin":false},"body":"Now, a .gitignore file is created to manage the files that can be uploaded to the napps server.","created_at":"2019-05-06T17:44:48Z","updated_at":"2019-05-21T17:14:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0698a0edce225887fdfa0a51e45b149419e34828","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kytos/kytos-utils/pulls/220/commits","review_comments_url":"https://api.github.com/repos/kytos/kytos-utils/pulls/220/comments","review_comment_url":"https://api.github.com/repos/kytos/kytos-utils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kytos/kytos-utils/issues/220/comments","statuses_url":"https://api.github.com/repos/kytos/kytos-utils/statuses/26a820d445c459192017116b26157d4a1ea6dfb2","head":{"label":"gleybersonandrade:kytosignore","ref":"kytosignore","sha":"26a820d445c459192017116b26157d4a1ea6dfb2","user":{"login":"gleybersonandrade","id":20271875,"node_id":"MDQ6VXNlcjIwMjcxODc1","avatar_url":"https://avatars2.githubusercontent.com/u/20271875?v=4","gravatar_id":"","url":"https://api.github.com/users/gleybersonandrade","html_url":"https://github.com/gleybersonandrade","followers_url":"https://api.github.com/users/gleybersonandrade/followers","following_url":"https://api.github.com/users/gleybersonandrade/following{/other_user}","gists_url":"https://api.github.com/users/gleybersonandrade/gists{/gist_id}","starred_url":"https://api.github.com/users/gleybersonandrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gleybersonandrade/subscriptions","organizations_url":"https://api.github.com/users/gleybersonandrade/orgs","repos_url":"https://api.github.com/users/gleybersonandrade/repos","events_url":"https://api.github.com/users/gleybersonandrade/events{/privacy}","received_events_url":"https://api.github.com/users/gleybersonandrade/received_events","type":"User","site_admin":false},"repo":{"id":175715072,"node_id":"MDEwOlJlcG9zaXRvcnkxNzU3MTUwNzI=","name":"kytos-utils","full_name":"gleybersonandrade/kytos-utils","private":false,"owner":{"login":"gleybersonandrade","id":20271875,"node_id":"MDQ6VXNlcjIwMjcxODc1","avatar_url":"https://avatars2.githubusercontent.com/u/20271875?v=4","gravatar_id":"","url":"https://api.github.com/users/gleybersonandrade","html_url":"https://github.com/gleybersonandrade","followers_url":"https://api.github.com/users/gleybersonandrade/followers","following_url":"https://api.github.com/users/gleybersonandrade/following{/other_user}","gists_url":"https://api.github.com/users/gleybersonandrade/gists{/gist_id}","starred_url":"https://api.github.com/users/gleybersonandrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gleybersonandrade/subscriptions","organizations_url":"https://api.github.com/users/gleybersonandrade/orgs","repos_url":"https://api.github.com/users/gleybersonandrade/repos","events_url":"https://api.github.com/users/gleybersonandrade/events{/privacy}","received_events_url":"https://api.github.com/users/gleybersonandrade/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gleybersonandrade/kytos-utils","description":"Command line interface (cli) for Kytos SDN Platform","fork":true,"url":"https://api.github.com/repos/gleybersonandrade/kytos-utils","forks_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/forks","keys_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/teams","hooks_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/hooks","issue_events_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/issues/events{/number}","events_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/events","assignees_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/assignees{/user}","branches_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/branches{/branch}","tags_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/tags","blobs_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/languages","stargazers_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/stargazers","contributors_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/contributors","subscribers_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/subscribers","subscription_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/subscription","commits_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/contents/{+path}","compare_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/merges","archive_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/downloads","issues_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/issues{/number}","pulls_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/labels{/name}","releases_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/releases{/id}","deployments_url":"https://api.github.com/repos/gleybersonandrade/kytos-utils/deployments","created_at":"2019-03-14T23:25:59Z","updated_at":"2019-05-15T17:32:49Z","pushed_at":"2019-05-16T13:02:32Z","git_url":"git://github.com/gleybersonandrade/kytos-utils.git","ssh_url":"git@github.com:gleybersonandrade/kytos-utils.git","clone_url":"https://github.com/gleybersonandrade/kytos-utils.git","svn_url":"https://github.com/gleybersonandrade/kytos-utils","homepage":"https://kytos.io/","size":430,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kytos:master","ref":"master","sha":"aba43505a79a31037c62f9a70196e01c5aca1805","user":{"login":"kytos","id":16357103,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MzU3MTAz","avatar_url":"https://avatars1.githubusercontent.com/u/16357103?v=4","gravatar_id":"","url":"https://api.github.com/users/kytos","html_url":"https://github.com/kytos","followers_url":"https://api.github.com/users/kytos/followers","following_url":"https://api.github.com/users/kytos/following{/other_user}","gists_url":"https://api.github.com/users/kytos/gists{/gist_id}","starred_url":"https://api.github.com/users/kytos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kytos/subscriptions","organizations_url":"https://api.github.com/users/kytos/orgs","repos_url":"https://api.github.com/users/kytos/repos","events_url":"https://api.github.com/users/kytos/events{/privacy}","received_events_url":"https://api.github.com/users/kytos/received_events","type":"Organization","site_admin":false},"repo":{"id":69367186,"node_id":"MDEwOlJlcG9zaXRvcnk2OTM2NzE4Ng==","name":"kytos-utils","full_name":"kytos/kytos-utils","private":false,"owner":{"login":"kytos","id":16357103,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MzU3MTAz","avatar_url":"https://avatars1.githubusercontent.com/u/16357103?v=4","gravatar_id":"","url":"https://api.github.com/users/kytos","html_url":"https://github.com/kytos","followers_url":"https://api.github.com/users/kytos/followers","following_url":"https://api.github.com/users/kytos/following{/other_user}","gists_url":"https://api.github.com/users/kytos/gists{/gist_id}","starred_url":"https://api.github.com/users/kytos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kytos/subscriptions","organizations_url":"https://api.github.com/users/kytos/orgs","repos_url":"https://api.github.com/users/kytos/repos","events_url":"https://api.github.com/users/kytos/events{/privacy}","received_events_url":"https://api.github.com/users/kytos/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kytos/kytos-utils","description":"Command line interface (cli) for Kytos SDN Platform","fork":false,"url":"https://api.github.com/repos/kytos/kytos-utils","forks_url":"https://api.github.com/repos/kytos/kytos-utils/forks","keys_url":"https://api.github.com/repos/kytos/kytos-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kytos/kytos-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kytos/kytos-utils/teams","hooks_url":"https://api.github.com/repos/kytos/kytos-utils/hooks","issue_events_url":"https://api.github.com/repos/kytos/kytos-utils/issues/events{/number}","events_url":"https://api.github.com/repos/kytos/kytos-utils/events","assignees_url":"https://api.github.com/repos/kytos/kytos-utils/assignees{/user}","branches_url":"https://api.github.com/repos/kytos/kytos-utils/branches{/branch}","tags_url":"https://api.github.com/repos/kytos/kytos-utils/tags","blobs_url":"https://api.github.com/repos/kytos/kytos-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kytos/kytos-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kytos/kytos-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/kytos/kytos-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kytos/kytos-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/kytos/kytos-utils/languages","stargazers_url":"https://api.github.com/repos/kytos/kytos-utils/stargazers","contributors_url":"https://api.github.com/repos/kytos/kytos-utils/contributors","subscribers_url":"https://api.github.com/repos/kytos/kytos-utils/subscribers","subscription_url":"https://api.github.com/repos/kytos/kytos-utils/subscription","commits_url":"https://api.github.com/repos/kytos/kytos-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/kytos/kytos-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/kytos/kytos-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/kytos/kytos-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/kytos/kytos-utils/contents/{+path}","compare_url":"https://api.github.com/repos/kytos/kytos-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kytos/kytos-utils/merges","archive_url":"https://api.github.com/repos/kytos/kytos-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kytos/kytos-utils/downloads","issues_url":"https://api.github.com/repos/kytos/kytos-utils/issues{/number}","pulls_url":"https://api.github.com/repos/kytos/kytos-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/kytos/kytos-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/kytos/kytos-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kytos/kytos-utils/labels{/name}","releases_url":"https://api.github.com/repos/kytos/kytos-utils/releases{/id}","deployments_url":"https://api.github.com/repos/kytos/kytos-utils/deployments","created_at":"2016-09-27T14:46:56Z","updated_at":"2019-05-03T14:17:57Z","pushed_at":"2019-05-17T22:32:26Z","git_url":"git://github.com/kytos/kytos-utils.git","ssh_url":"git@github.com:kytos/kytos-utils.git","clone_url":"https://github.com/kytos/kytos-utils.git","svn_url":"https://github.com/kytos/kytos-utils","homepage":"https://kytos.io/","size":417,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":16,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":11,"open_issues":16,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kytos/kytos-utils/pulls/220"},"html":{"href":"https://github.com/kytos/kytos-utils/pull/220"},"issue":{"href":"https://api.github.com/repos/kytos/kytos-utils/issues/220"},"comments":{"href":"https://api.github.com/repos/kytos/kytos-utils/issues/220/comments"},"review_comments":{"href":"https://api.github.com/repos/kytos/kytos-utils/pulls/220/comments"},"review_comment":{"href":"https://api.github.com/repos/kytos/kytos-utils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kytos/kytos-utils/pulls/220/commits"},"statuses":{"href":"https://api.github.com/repos/kytos/kytos-utils/statuses/26a820d445c459192017116b26157d4a1ea6dfb2"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"hdiogenes"}}