[
  {
    "path": ".gitignore",
    "content": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nenv/\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\n*.egg-info/\n.installed.cfg\n*.egg\n\n# PyInstaller\n#  Usually these files are written by a python script from a template\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n.hypothesis/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# pyenv\n.python-version\n\n# celery beat schedule file\ncelerybeat-schedule\n\n# SageMath parsed files\n*.sage.py\n\n# dotenv\n.env\n\n# virtualenv\n.venv\nvenv/\nENV/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n\n.DS_Store\ntypot.pem\nenvs.json\ntests/test_installation_id.json\n"
  },
  {
    "path": "Dockerfile",
    "content": "FROM python:3.4.5\n\nRUN apt-get update\nRUN apt-get install -y enchant\n\nADD ./requirements.txt /tmp/requirements.txt\nRUN pip install -qr /tmp/requirements.txt\n\nADD ./typot /opt/typot/\nWORKDIR /opt/typot\n\n# Expose is NOT supported by Heroku\n# EXPOSE 8000\n\nCMD hug -p $PORT -f /opt/typot/api.py \n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2017 chakki\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "Procfile",
    "content": "web: hug -f typot/api.py"
  },
  {
    "path": "README.md",
    "content": "# typot\n\n**typot** detects the typos in your pull request, and fix it by just selecting the modification candidates.\n\n![typot.gif](./docs/typot.gif)\n\n1. When you open the pull request, *typot* checks it and if there are typos, make review comments on it.\n2. If suitable fix is in suggested candidates, then select it! *typot* adopts it automatically. \n\nNow, README file and all `.md` and `.rst` files are check target.\n\n## Install\n\n**[Please Authorize typot from this Link!](https://github.com/apps/typot)**\n\n## Dependencies\n\n* [hug](http://www.hug.rest/)\n* [PyEnchant](http://pythonhosted.org/pyenchant/)\n* [unidiff](https://github.com/matiasb/python-unidiff)\n* [PyJWT](https://github.com/jpadilla/pyjwt)\n\n*icon's photo from [independentman](https://flic.kr/p/2mHSE)*\n"
  },
  {
    "path": "get_installations.py",
    "content": "import os\nimport argparse\nfrom datetime import datetime, timedelta\nimport requests\nimport jwt\n\n\ndef get_private_pem(file_path):\n    key = os.environ.get(\"PRIVATE_KEY\", \"\")\n    if not key:\n        default_path = os.path.join(os.path.dirname(__file__), file_path)\n        if os.path.exists(default_path):\n            with open(default_path, \"r\", encoding=\"utf-8\") as f:\n                key = f.readlines()\n                key = \"\".join(key)\n\n    return key\n\n\nparser = argparse.ArgumentParser(description=\"Get Installations count of your App.\")\nparser.add_argument(\"app_id\", help=\"app_id of Your apps\")\nparser.add_argument(\"--pem\", default=\"\", help=\"path to pem file\")\n\n\nif __name__ == \"__main__\":\n    url = \"https://api.github.com/app/installations\"\n\n    args = parser.parse_args()\n\n    pem_path = args.pem\n    if not pem_path:\n        path = os.path.abspath(os.path.dirname(__file__))\n        app_name = os.path.basename(path)\n        pem_path = app_name + \".pem\"\n    \n    if not os.path.exists(pem_path):\n        raise Exception(\"Pem file {} does not exist\".format(pem_path))\n\n    utcnow = datetime.utcnow() + timedelta(seconds=-5)\n    duration = timedelta(seconds=10)\n    payload = {\n        \"iat\": utcnow,\n        \"exp\": utcnow + duration,\n        \"iss\": args.app_id\n    }\n    pem = get_private_pem(pem_path)\n    encoded = jwt.encode(payload, pem, \"RS256\")\n    headers = {\n        \"Authorization\": \"Bearer \" + encoded.decode(\"utf-8\"),\n        \"Accept\": \"application/vnd.github.machine-man-preview+json\"\n        }\n    \n    r = requests.get(url, headers=headers)\n    if r.ok:\n        print(len(r.json()))\n    else:\n        r.raise_for_status()\n"
  },
  {
    "path": "requirements.txt",
    "content": "hug==2.3.0\nrequests==2.14.2\nunidiff==0.5.3\npyenchant==1.6.8\nPyJWT==1.5.0\ncryptography==1.8.2\n"
  },
  {
    "path": "tests/dummy_data.py",
    "content": "pull_request_created = \"\"\"\n{\n  \"action\": \"opened\",\n  \"number\": 2,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2\",\n    \"id\": 122156051,\n    \"html_url\": \"https://github.com/chakki-works/typot-demo/pull/2\",\n    \"diff_url\": \"https://github.com/chakki-works/typot-demo/pull/2.diff\",\n    \"patch_url\": \"https://github.com/chakki-works/typot-demo/pull/2.patch\",\n    \"issue_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/2\",\n    \"number\": 2,\n    \"state\": \"open\",\n    \"locked\": false,\n    \"title\": \"Update README.md\",\n    \"user\": {\n      \"login\": \"icoxfog417\",\n      \"id\": 544269,\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/544269?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/icoxfog417\",\n      \"html_url\": \"https://github.com/icoxfog417\",\n      \"followers_url\": \"https://api.github.com/users/icoxfog417/followers\",\n      \"following_url\": \"https://api.github.com/users/icoxfog417/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/icoxfog417/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/icoxfog417/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/icoxfog417/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/icoxfog417/orgs\",\n      \"repos_url\": \"https://api.github.com/users/icoxfog417/repos\",\n      \"events_url\": \"https://api.github.com/users/icoxfog417/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/icoxfog417/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Pull Request Create Test\",\n    \"created_at\": \"2017-05-24T06:50:51Z\",\n    \"updated_at\": \"2017-05-24T06:50:51Z\",\n    \"closed_at\": null,\n    \"merged_at\": null,\n    \"merge_commit_sha\": null,\n    \"assignee\": null,\n    \"assignees\": [\n\n    ],\n    \"requested_reviewers\": [\n\n    ],\n    \"milestone\": null,\n    \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2/commits\",\n    \"review_comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2/comments\",\n    \"review_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}\",\n    \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/2/comments\",\n    \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/2511e9cc5b0fa1f44feebc9c29d08304e7744269\",\n    \"head\": {\n      \"label\": \"chakki-works:dev\",\n      \"ref\": \"dev\",\n      \"sha\": \"2511e9cc5b0fa1f44feebc9c29d08304e7744269\",\n      \"user\": {\n        \"login\": \"chakki-works\",\n        \"id\": 25578516,\n        \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/chakki-works\",\n        \"html_url\": \"https://github.com/chakki-works\",\n        \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n        \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n        \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n        \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n        \"type\": \"Organization\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 92240778,\n        \"name\": \"typot-demo\",\n        \"full_name\": \"chakki-works/typot-demo\",\n        \"owner\": {\n          \"login\": \"chakki-works\",\n          \"id\": 25578516,\n          \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/chakki-works\",\n          \"html_url\": \"https://github.com/chakki-works\",\n          \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n          \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n          \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n          \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n          \"type\": \"Organization\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"description\": \"to test typot\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n        \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n        \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n        \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n        \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n        \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n        \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n        \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n        \"created_at\": \"2017-05-24T02:24:37Z\",\n        \"updated_at\": \"2017-05-24T02:24:37Z\",\n        \"pushed_at\": \"2017-05-24T02:39:34Z\",\n        \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n        \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n        \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n        \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"homepage\": null,\n        \"size\": 1,\n        \"stargazers_count\": 0,\n        \"watchers_count\": 0,\n        \"language\": null,\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_downloads\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"forks_count\": 0,\n        \"mirror_url\": null,\n        \"open_issues_count\": 1,\n        \"forks\": 0,\n        \"open_issues\": 1,\n        \"watchers\": 0,\n        \"default_branch\": \"master\"\n      }\n    },\n    \"base\": {\n      \"label\": \"chakki-works:master\",\n      \"ref\": \"master\",\n      \"sha\": \"a2573fb6cc5612219823765d0113938c666c1855\",\n      \"user\": {\n        \"login\": \"chakki-works\",\n        \"id\": 25578516,\n        \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/chakki-works\",\n        \"html_url\": \"https://github.com/chakki-works\",\n        \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n        \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n        \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n        \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n        \"type\": \"Organization\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 92240778,\n        \"name\": \"typot-demo\",\n        \"full_name\": \"chakki-works/typot-demo\",\n        \"owner\": {\n          \"login\": \"chakki-works\",\n          \"id\": 25578516,\n          \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/chakki-works\",\n          \"html_url\": \"https://github.com/chakki-works\",\n          \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n          \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n          \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n          \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n          \"type\": \"Organization\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"description\": \"to test typot\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n        \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n        \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n        \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n        \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n        \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n        \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n        \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n        \"created_at\": \"2017-05-24T02:24:37Z\",\n        \"updated_at\": \"2017-05-24T02:24:37Z\",\n        \"pushed_at\": \"2017-05-24T02:39:34Z\",\n        \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n        \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n        \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n        \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"homepage\": null,\n        \"size\": 1,\n        \"stargazers_count\": 0,\n        \"watchers_count\": 0,\n        \"language\": null,\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_downloads\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"forks_count\": 0,\n        \"mirror_url\": null,\n        \"open_issues_count\": 1,\n        \"forks\": 0,\n        \"open_issues\": 1,\n        \"watchers\": 0,\n        \"default_branch\": \"master\"\n      }\n    },\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/chakki-works/typot-demo/pull/2\"\n      },\n      \"issue\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/2\"\n      },\n      \"comments\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/2/comments\"\n      },\n      \"review_comments\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2/comments\"\n      },\n      \"review_comment\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}\"\n      },\n      \"commits\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2/commits\"\n      },\n      \"statuses\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/2511e9cc5b0fa1f44feebc9c29d08304e7744269\"\n      }\n    },\n    \"merged\": false,\n    \"mergeable\": null,\n    \"rebaseable\": null,\n    \"mergeable_state\": \"unknown\",\n    \"merged_by\": null,\n    \"comments\": 0,\n    \"review_comments\": 0,\n    \"maintainer_can_modify\": false,\n    \"commits\": 1,\n    \"additions\": 1,\n    \"deletions\": 1,\n    \"changed_files\": 1\n  },\n  \"repository\": {\n    \"id\": 92240778,\n    \"name\": \"typot-demo\",\n    \"full_name\": \"chakki-works/typot-demo\",\n    \"owner\": {\n      \"login\": \"chakki-works\",\n      \"id\": 25578516,\n      \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/chakki-works\",\n      \"html_url\": \"https://github.com/chakki-works\",\n      \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n      \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n      \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n      \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n      \"type\": \"Organization\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n    \"description\": \"to test typot\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n    \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n    \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n    \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n    \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n    \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n    \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n    \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n    \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n    \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n    \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n    \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n    \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n    \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n    \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n    \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n    \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n    \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n    \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n    \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n    \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n    \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n    \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n    \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n    \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n    \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n    \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n    \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n    \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n    \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n    \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n    \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n    \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n    \"created_at\": \"2017-05-24T02:24:37Z\",\n    \"updated_at\": \"2017-05-24T02:24:37Z\",\n    \"pushed_at\": \"2017-05-24T02:39:34Z\",\n    \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n    \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n    \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n    \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n    \"homepage\": null,\n    \"size\": 1,\n    \"stargazers_count\": 0,\n    \"watchers_count\": 0,\n    \"language\": null,\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_downloads\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"forks_count\": 0,\n    \"mirror_url\": null,\n    \"open_issues_count\": 1,\n    \"forks\": 0,\n    \"open_issues\": 1,\n    \"watchers\": 0,\n    \"default_branch\": \"master\"\n  },\n  \"organization\": {\n    \"login\": \"chakki-works\",\n    \"id\": 25578516,\n    \"url\": \"https://api.github.com/orgs/chakki-works\",\n    \"repos_url\": \"https://api.github.com/orgs/chakki-works/repos\",\n    \"events_url\": \"https://api.github.com/orgs/chakki-works/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/chakki-works/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/chakki-works/issues\",\n    \"members_url\": \"https://api.github.com/orgs/chakki-works/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/chakki-works/public_members{/member}\",\n    \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n    \"description\": \"Our mission is to enable everyone leave the office by the tea time\"\n  },\n  \"sender\": {\n    \"login\": \"icoxfog417\",\n    \"id\": 544269,\n    \"avatar_url\": \"https://avatars3.githubusercontent.com/u/544269?v=3\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/icoxfog417\",\n    \"html_url\": \"https://github.com/icoxfog417\",\n    \"followers_url\": \"https://api.github.com/users/icoxfog417/followers\",\n    \"following_url\": \"https://api.github.com/users/icoxfog417/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/icoxfog417/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/icoxfog417/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/icoxfog417/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/icoxfog417/orgs\",\n    \"repos_url\": \"https://api.github.com/users/icoxfog417/repos\",\n    \"events_url\": \"https://api.github.com/users/icoxfog417/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/icoxfog417/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"installation\": {\n    \"id\": 1111\n  }\n}\n\"\"\"\n\n\npull_request_closed = \"\"\"\n{\n  \"action\": \"closed\",\n  \"number\": 2,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2\",\n    \"id\": 122156051,\n    \"html_url\": \"https://github.com/chakki-works/typot-demo/pull/2\",\n    \"diff_url\": \"https://github.com/chakki-works/typot-demo/pull/2.diff\",\n    \"patch_url\": \"https://github.com/chakki-works/typot-demo/pull/2.patch\",\n    \"issue_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/2\",\n    \"number\": 2,\n    \"state\": \"closed\",\n    \"locked\": false,\n    \"title\": \"Update README.md\",\n    \"user\": {\n      \"login\": \"icoxfog417\",\n      \"id\": 544269,\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/544269?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/icoxfog417\",\n      \"html_url\": \"https://github.com/icoxfog417\",\n      \"followers_url\": \"https://api.github.com/users/icoxfog417/followers\",\n      \"following_url\": \"https://api.github.com/users/icoxfog417/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/icoxfog417/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/icoxfog417/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/icoxfog417/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/icoxfog417/orgs\",\n      \"repos_url\": \"https://api.github.com/users/icoxfog417/repos\",\n      \"events_url\": \"https://api.github.com/users/icoxfog417/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/icoxfog417/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Pull Request Create Test\",\n    \"created_at\": \"2017-05-24T06:50:51Z\",\n    \"updated_at\": \"2017-05-24T07:05:40Z\",\n    \"closed_at\": \"2017-05-24T07:05:39Z\",\n    \"merged_at\": \"2017-05-24T07:05:39Z\",\n    \"merge_commit_sha\": \"7d895e85cddbb7b0adf976d14ef717f2617a6876\",\n    \"assignee\": null,\n    \"assignees\": [\n\n    ],\n    \"requested_reviewers\": [\n\n    ],\n    \"milestone\": null,\n    \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2/commits\",\n    \"review_comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2/comments\",\n    \"review_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}\",\n    \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/2/comments\",\n    \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/2511e9cc5b0fa1f44feebc9c29d08304e7744269\",\n    \"head\": {\n      \"label\": \"chakki-works:dev\",\n      \"ref\": \"dev\",\n      \"sha\": \"2511e9cc5b0fa1f44feebc9c29d08304e7744269\",\n      \"user\": {\n        \"login\": \"chakki-works\",\n        \"id\": 25578516,\n        \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/chakki-works\",\n        \"html_url\": \"https://github.com/chakki-works\",\n        \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n        \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n        \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n        \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n        \"type\": \"Organization\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 92240778,\n        \"name\": \"typot-demo\",\n        \"full_name\": \"chakki-works/typot-demo\",\n        \"owner\": {\n          \"login\": \"chakki-works\",\n          \"id\": 25578516,\n          \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/chakki-works\",\n          \"html_url\": \"https://github.com/chakki-works\",\n          \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n          \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n          \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n          \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n          \"type\": \"Organization\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"description\": \"to test typot\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n        \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n        \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n        \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n        \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n        \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n        \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n        \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n        \"created_at\": \"2017-05-24T02:24:37Z\",\n        \"updated_at\": \"2017-05-24T02:24:37Z\",\n        \"pushed_at\": \"2017-05-24T07:05:39Z\",\n        \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n        \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n        \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n        \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"homepage\": null,\n        \"size\": 1,\n        \"stargazers_count\": 0,\n        \"watchers_count\": 0,\n        \"language\": null,\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_downloads\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"forks_count\": 0,\n        \"mirror_url\": null,\n        \"open_issues_count\": 0,\n        \"forks\": 0,\n        \"open_issues\": 0,\n        \"watchers\": 0,\n        \"default_branch\": \"master\"\n      }\n    },\n    \"base\": {\n      \"label\": \"chakki-works:master\",\n      \"ref\": \"master\",\n      \"sha\": \"a2573fb6cc5612219823765d0113938c666c1855\",\n      \"user\": {\n        \"login\": \"chakki-works\",\n        \"id\": 25578516,\n        \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/chakki-works\",\n        \"html_url\": \"https://github.com/chakki-works\",\n        \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n        \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n        \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n        \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n        \"type\": \"Organization\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 92240778,\n        \"name\": \"typot-demo\",\n        \"full_name\": \"chakki-works/typot-demo\",\n        \"owner\": {\n          \"login\": \"chakki-works\",\n          \"id\": 25578516,\n          \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/chakki-works\",\n          \"html_url\": \"https://github.com/chakki-works\",\n          \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n          \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n          \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n          \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n          \"type\": \"Organization\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"description\": \"to test typot\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n        \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n        \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n        \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n        \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n        \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n        \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n        \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n        \"created_at\": \"2017-05-24T02:24:37Z\",\n        \"updated_at\": \"2017-05-24T02:24:37Z\",\n        \"pushed_at\": \"2017-05-24T07:05:39Z\",\n        \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n        \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n        \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n        \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"homepage\": null,\n        \"size\": 1,\n        \"stargazers_count\": 0,\n        \"watchers_count\": 0,\n        \"language\": null,\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_downloads\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"forks_count\": 0,\n        \"mirror_url\": null,\n        \"open_issues_count\": 0,\n        \"forks\": 0,\n        \"open_issues\": 0,\n        \"watchers\": 0,\n        \"default_branch\": \"master\"\n      }\n    },\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/chakki-works/typot-demo/pull/2\"\n      },\n      \"issue\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/2\"\n      },\n      \"comments\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/2/comments\"\n      },\n      \"review_comments\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2/comments\"\n      },\n      \"review_comment\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}\"\n      },\n      \"commits\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/2/commits\"\n      },\n      \"statuses\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/2511e9cc5b0fa1f44feebc9c29d08304e7744269\"\n      }\n    },\n    \"merged\": true,\n    \"mergeable\": null,\n    \"rebaseable\": null,\n    \"mergeable_state\": \"unknown\",\n    \"merged_by\": {\n      \"login\": \"icoxfog417\",\n      \"id\": 544269,\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/544269?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/icoxfog417\",\n      \"html_url\": \"https://github.com/icoxfog417\",\n      \"followers_url\": \"https://api.github.com/users/icoxfog417/followers\",\n      \"following_url\": \"https://api.github.com/users/icoxfog417/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/icoxfog417/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/icoxfog417/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/icoxfog417/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/icoxfog417/orgs\",\n      \"repos_url\": \"https://api.github.com/users/icoxfog417/repos\",\n      \"events_url\": \"https://api.github.com/users/icoxfog417/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/icoxfog417/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"comments\": 1,\n    \"review_comments\": 0,\n    \"maintainer_can_modify\": false,\n    \"commits\": 1,\n    \"additions\": 1,\n    \"deletions\": 1,\n    \"changed_files\": 1\n  },\n  \"repository\": {\n    \"id\": 92240778,\n    \"name\": \"typot-demo\",\n    \"full_name\": \"chakki-works/typot-demo\",\n    \"owner\": {\n      \"login\": \"chakki-works\",\n      \"id\": 25578516,\n      \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/chakki-works\",\n      \"html_url\": \"https://github.com/chakki-works\",\n      \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n      \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n      \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n      \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n      \"type\": \"Organization\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n    \"description\": \"to test typot\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n    \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n    \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n    \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n    \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n    \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n    \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n    \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n    \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n    \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n    \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n    \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n    \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n    \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n    \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n    \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n    \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n    \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n    \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n    \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n    \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n    \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n    \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n    \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n    \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n    \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n    \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n    \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n    \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n    \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n    \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n    \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n    \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n    \"created_at\": \"2017-05-24T02:24:37Z\",\n    \"updated_at\": \"2017-05-24T02:24:37Z\",\n    \"pushed_at\": \"2017-05-24T07:05:39Z\",\n    \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n    \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n    \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n    \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n    \"homepage\": null,\n    \"size\": 1,\n    \"stargazers_count\": 0,\n    \"watchers_count\": 0,\n    \"language\": null,\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_downloads\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"forks_count\": 0,\n    \"mirror_url\": null,\n    \"open_issues_count\": 0,\n    \"forks\": 0,\n    \"open_issues\": 0,\n    \"watchers\": 0,\n    \"default_branch\": \"master\"\n  },\n  \"organization\": {\n    \"login\": \"chakki-works\",\n    \"id\": 25578516,\n    \"url\": \"https://api.github.com/orgs/chakki-works\",\n    \"repos_url\": \"https://api.github.com/orgs/chakki-works/repos\",\n    \"events_url\": \"https://api.github.com/orgs/chakki-works/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/chakki-works/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/chakki-works/issues\",\n    \"members_url\": \"https://api.github.com/orgs/chakki-works/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/chakki-works/public_members{/member}\",\n    \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n    \"description\": \"Our mission is to enable everyone leave the office by the tea time\"\n  },\n  \"sender\": {\n    \"login\": \"icoxfog417\",\n    \"id\": 544269,\n    \"avatar_url\": \"https://avatars3.githubusercontent.com/u/544269?v=3\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/icoxfog417\",\n    \"html_url\": \"https://github.com/icoxfog417\",\n    \"followers_url\": \"https://api.github.com/users/icoxfog417/followers\",\n    \"following_url\": \"https://api.github.com/users/icoxfog417/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/icoxfog417/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/icoxfog417/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/icoxfog417/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/icoxfog417/orgs\",\n    \"repos_url\": \"https://api.github.com/users/icoxfog417/repos\",\n    \"events_url\": \"https://api.github.com/users/icoxfog417/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/icoxfog417/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"installation\": {\n    \"id\": 11111\n  }\n}\n\"\"\"\n\nreview_changed = r\"\"\"\n{\n  \"action\": \"edited\",\n  \"changes\": {\n    \"body\": {\n      \"from\": \"\\\"hoge\\\" is typo? \\n- [ ] hoge-1\\n- [ ] hoge-2\\n- [ ] hoge-3\"\n    }\n  },\n  \"comment\": {\n    \"url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/comments/118856819\",\n    \"pull_request_review_id\": 40687574,\n    \"id\": 118856819,\n    \"diff_hunk\": \"@@ -1,2 +1,7 @@\\n # typot-demo\",\n    \"path\": \"README.md\",\n    \"position\": 1,\n    \"original_position\": 1,\n    \"commit_id\": \"adbdfa392e0cab7766dbcae6cee82bf5fd11a471\",\n    \"original_commit_id\": \"adbdfa392e0cab7766dbcae6cee82bf5fd11a471\",\n    \"user\": {\n      \"login\": \"typot[bot]\",\n      \"id\": 28912751,\n      \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/typot%5Bbot%5D\",\n      \"html_url\": \"https://github.com/apps/typot\",\n      \"followers_url\": \"https://api.github.com/users/typot%5Bbot%5D/followers\",\n      \"following_url\": \"https://api.github.com/users/typot%5Bbot%5D/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/typot%5Bbot%5D/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/typot%5Bbot%5D/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/typot%5Bbot%5D/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/typot%5Bbot%5D/orgs\",\n      \"repos_url\": \"https://api.github.com/users/typot%5Bbot%5D/repos\",\n      \"events_url\": \"https://api.github.com/users/typot%5Bbot%5D/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/typot%5Bbot%5D/received_events\",\n      \"type\": \"Bot\",\n      \"site_admin\": false\n    },\n    \"body\": \"\\\"hoge\\\" is typo? \\n- [ ] hoge-1\\n- [x] hoge-2\\n- [ ] hoge-3\",\n    \"created_at\": \"2017-05-29T01:59:50Z\",\n    \"updated_at\": \"2017-05-29T01:59:50Z\",\n    \"html_url\": \"https://github.com/chakki-works/typot-demo/pull/3#discussion_r118856819\",\n    \"pull_request_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/3\",\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/comments/118856819\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/chakki-works/typot-demo/pull/3#discussion_r118856819\"\n      },\n      \"pull_request\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/3\"\n      }\n    }\n  },\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/3\",\n    \"id\": 122168599,\n    \"html_url\": \"https://github.com/chakki-works/typot-demo/pull/3\",\n    \"diff_url\": \"https://github.com/chakki-works/typot-demo/pull/3.diff\",\n    \"patch_url\": \"https://github.com/chakki-works/typot-demo/pull/3.patch\",\n    \"issue_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/3\",\n    \"number\": 3,\n    \"state\": \"open\",\n    \"locked\": false,\n    \"title\": \"Update README.md\",\n    \"user\": {\n      \"login\": \"icoxfog417\",\n      \"id\": 544269,\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/544269?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/icoxfog417\",\n      \"html_url\": \"https://github.com/icoxfog417\",\n      \"followers_url\": \"https://api.github.com/users/icoxfog417/followers\",\n      \"following_url\": \"https://api.github.com/users/icoxfog417/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/icoxfog417/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/icoxfog417/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/icoxfog417/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/icoxfog417/orgs\",\n      \"repos_url\": \"https://api.github.com/users/icoxfog417/repos\",\n      \"events_url\": \"https://api.github.com/users/icoxfog417/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/icoxfog417/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Update README.md description\",\n    \"created_at\": \"2017-05-24T08:12:08Z\",\n    \"updated_at\": \"2017-05-29T02:00:04Z\",\n    \"closed_at\": null,\n    \"merged_at\": null,\n    \"merge_commit_sha\": \"1ccc304340b7d8d062b256dc48294acbb7991bdd\",\n    \"assignee\": {\n      \"login\": \"icoxfog417\",\n      \"id\": 544269,\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/544269?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/icoxfog417\",\n      \"html_url\": \"https://github.com/icoxfog417\",\n      \"followers_url\": \"https://api.github.com/users/icoxfog417/followers\",\n      \"following_url\": \"https://api.github.com/users/icoxfog417/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/icoxfog417/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/icoxfog417/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/icoxfog417/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/icoxfog417/orgs\",\n      \"repos_url\": \"https://api.github.com/users/icoxfog417/repos\",\n      \"events_url\": \"https://api.github.com/users/icoxfog417/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/icoxfog417/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"icoxfog417\",\n        \"id\": 544269,\n        \"avatar_url\": \"https://avatars3.githubusercontent.com/u/544269?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/icoxfog417\",\n        \"html_url\": \"https://github.com/icoxfog417\",\n        \"followers_url\": \"https://api.github.com/users/icoxfog417/followers\",\n        \"following_url\": \"https://api.github.com/users/icoxfog417/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/icoxfog417/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/icoxfog417/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/icoxfog417/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/icoxfog417/orgs\",\n        \"repos_url\": \"https://api.github.com/users/icoxfog417/repos\",\n        \"events_url\": \"https://api.github.com/users/icoxfog417/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/icoxfog417/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"requested_reviewers\": [\n\n    ],\n    \"milestone\": null,\n    \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/3/commits\",\n    \"review_comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/3/comments\",\n    \"review_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}\",\n    \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/3/comments\",\n    \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/adbdfa392e0cab7766dbcae6cee82bf5fd11a471\",\n    \"head\": {\n      \"label\": \"chakki-works:dev\",\n      \"ref\": \"dev\",\n      \"sha\": \"adbdfa392e0cab7766dbcae6cee82bf5fd11a471\",\n      \"user\": {\n        \"login\": \"chakki-works\",\n        \"id\": 25578516,\n        \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/chakki-works\",\n        \"html_url\": \"https://github.com/chakki-works\",\n        \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n        \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n        \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n        \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n        \"type\": \"Organization\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 92240778,\n        \"name\": \"typot-demo\",\n        \"full_name\": \"chakki-works/typot-demo\",\n        \"owner\": {\n          \"login\": \"chakki-works\",\n          \"id\": 25578516,\n          \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/chakki-works\",\n          \"html_url\": \"https://github.com/chakki-works\",\n          \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n          \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n          \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n          \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n          \"type\": \"Organization\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"description\": \"to test typot\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n        \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n        \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n        \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n        \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n        \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n        \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n        \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n        \"created_at\": \"2017-05-24T02:24:37Z\",\n        \"updated_at\": \"2017-05-24T02:24:37Z\",\n        \"pushed_at\": \"2017-05-24T08:12:08Z\",\n        \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n        \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n        \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n        \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"homepage\": null,\n        \"size\": 2,\n        \"stargazers_count\": 0,\n        \"watchers_count\": 0,\n        \"language\": null,\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_downloads\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"forks_count\": 0,\n        \"mirror_url\": null,\n        \"open_issues_count\": 1,\n        \"forks\": 0,\n        \"open_issues\": 1,\n        \"watchers\": 0,\n        \"default_branch\": \"master\"\n      }\n    },\n    \"base\": {\n      \"label\": \"chakki-works:master\",\n      \"ref\": \"master\",\n      \"sha\": \"7d895e85cddbb7b0adf976d14ef717f2617a6876\",\n      \"user\": {\n        \"login\": \"chakki-works\",\n        \"id\": 25578516,\n        \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/chakki-works\",\n        \"html_url\": \"https://github.com/chakki-works\",\n        \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n        \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n        \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n        \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n        \"type\": \"Organization\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 92240778,\n        \"name\": \"typot-demo\",\n        \"full_name\": \"chakki-works/typot-demo\",\n        \"owner\": {\n          \"login\": \"chakki-works\",\n          \"id\": 25578516,\n          \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/chakki-works\",\n          \"html_url\": \"https://github.com/chakki-works\",\n          \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n          \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n          \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n          \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n          \"type\": \"Organization\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"description\": \"to test typot\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n        \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n        \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n        \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n        \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n        \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n        \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n        \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n        \"created_at\": \"2017-05-24T02:24:37Z\",\n        \"updated_at\": \"2017-05-24T02:24:37Z\",\n        \"pushed_at\": \"2017-05-24T08:12:08Z\",\n        \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n        \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n        \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n        \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"homepage\": null,\n        \"size\": 2,\n        \"stargazers_count\": 0,\n        \"watchers_count\": 0,\n        \"language\": null,\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_downloads\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"forks_count\": 0,\n        \"mirror_url\": null,\n        \"open_issues_count\": 1,\n        \"forks\": 0,\n        \"open_issues\": 1,\n        \"watchers\": 0,\n        \"default_branch\": \"master\"\n      }\n    },\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/3\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/chakki-works/typot-demo/pull/3\"\n      },\n      \"issue\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/3\"\n      },\n      \"comments\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/3/comments\"\n      },\n      \"review_comments\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/3/comments\"\n      },\n      \"review_comment\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}\"\n      },\n      \"commits\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/3/commits\"\n      },\n      \"statuses\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/adbdfa392e0cab7766dbcae6cee82bf5fd11a471\"\n      }\n    }\n  },\n  \"repository\": {\n    \"id\": 92240778,\n    \"name\": \"typot-demo\",\n    \"full_name\": \"chakki-works/typot-demo\",\n    \"owner\": {\n      \"login\": \"chakki-works\",\n      \"id\": 25578516,\n      \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/chakki-works\",\n      \"html_url\": \"https://github.com/chakki-works\",\n      \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n      \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n      \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n      \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n      \"type\": \"Organization\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n    \"description\": \"to test typot\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n    \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n    \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n    \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n    \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n    \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n    \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n    \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n    \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n    \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n    \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n    \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n    \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n    \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n    \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n    \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n    \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n    \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n    \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n    \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n    \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n    \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n    \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n    \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n    \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n    \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n    \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n    \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n    \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n    \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n    \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n    \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n    \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n    \"created_at\": \"2017-05-24T02:24:37Z\",\n    \"updated_at\": \"2017-05-24T02:24:37Z\",\n    \"pushed_at\": \"2017-05-24T08:12:08Z\",\n    \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n    \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n    \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n    \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n    \"homepage\": null,\n    \"size\": 2,\n    \"stargazers_count\": 0,\n    \"watchers_count\": 0,\n    \"language\": null,\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_downloads\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"forks_count\": 0,\n    \"mirror_url\": null,\n    \"open_issues_count\": 1,\n    \"forks\": 0,\n    \"open_issues\": 1,\n    \"watchers\": 0,\n    \"default_branch\": \"master\"\n  },\n  \"organization\": {\n    \"login\": \"chakki-works\",\n    \"id\": 25578516,\n    \"url\": \"https://api.github.com/orgs/chakki-works\",\n    \"repos_url\": \"https://api.github.com/orgs/chakki-works/repos\",\n    \"events_url\": \"https://api.github.com/orgs/chakki-works/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/chakki-works/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/chakki-works/issues\",\n    \"members_url\": \"https://api.github.com/orgs/chakki-works/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/chakki-works/public_members{/member}\",\n    \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n    \"description\": \"Our mission is to enable everyone leave the office by the tea time\"\n  },\n  \"sender\": {\n    \"login\": \"icoxfog417\",\n    \"id\": 544269,\n    \"avatar_url\": \"https://avatars3.githubusercontent.com/u/544269?v=3\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/icoxfog417\",\n    \"html_url\": \"https://github.com/icoxfog417\",\n    \"followers_url\": \"https://api.github.com/users/icoxfog417/followers\",\n    \"following_url\": \"https://api.github.com/users/icoxfog417/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/icoxfog417/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/icoxfog417/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/icoxfog417/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/icoxfog417/orgs\",\n    \"repos_url\": \"https://api.github.com/users/icoxfog417/repos\",\n    \"events_url\": \"https://api.github.com/users/icoxfog417/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/icoxfog417/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"installation\": {\n    \"id\": 11111\n  }\n}\n\"\"\"\n\nfix_target_pr = r\"\"\"\n{\n  \"action\": \"opened\",\n  \"number\": 4,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/4\",\n    \"id\": 122827018,\n    \"html_url\": \"https://github.com/chakki-works/typot-demo/pull/4\",\n    \"diff_url\": \"https://github.com/chakki-works/typot-demo/pull/4.diff\",\n    \"patch_url\": \"https://github.com/chakki-works/typot-demo/pull/4.patch\",\n    \"issue_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/4\",\n    \"number\": 4,\n    \"state\": \"open\",\n    \"locked\": false,\n    \"title\": \"Typo exists in content.md\",\n    \"user\": {\n      \"login\": \"icoxfog417\",\n      \"id\": 544269,\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/544269?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/icoxfog417\",\n      \"html_url\": \"https://github.com/icoxfog417\",\n      \"followers_url\": \"https://api.github.com/users/icoxfog417/followers\",\n      \"following_url\": \"https://api.github.com/users/icoxfog417/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/icoxfog417/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/icoxfog417/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/icoxfog417/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/icoxfog417/orgs\",\n      \"repos_url\": \"https://api.github.com/users/icoxfog417/repos\",\n      \"events_url\": \"https://api.github.com/users/icoxfog417/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/icoxfog417/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"\",\n    \"created_at\": \"2017-05-29T04:37:11Z\",\n    \"updated_at\": \"2017-05-29T04:37:11Z\",\n    \"closed_at\": null,\n    \"merged_at\": null,\n    \"merge_commit_sha\": null,\n    \"assignee\": null,\n    \"assignees\": [\n\n    ],\n    \"requested_reviewers\": [\n\n    ],\n    \"milestone\": null,\n    \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/4/commits\",\n    \"review_comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/4/comments\",\n    \"review_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}\",\n    \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/4/comments\",\n    \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/f0d3ab26d259ef474996d22dcff21dfce6ca4492\",\n    \"head\": {\n      \"label\": \"chakki-works:content\",\n      \"ref\": \"content\",\n      \"sha\": \"f0d3ab26d259ef474996d22dcff21dfce6ca4492\",\n      \"user\": {\n        \"login\": \"chakki-works\",\n        \"id\": 25578516,\n        \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/chakki-works\",\n        \"html_url\": \"https://github.com/chakki-works\",\n        \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n        \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n        \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n        \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n        \"type\": \"Organization\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 92240778,\n        \"name\": \"typot-demo\",\n        \"full_name\": \"chakki-works/typot-demo\",\n        \"owner\": {\n          \"login\": \"chakki-works\",\n          \"id\": 25578516,\n          \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/chakki-works\",\n          \"html_url\": \"https://github.com/chakki-works\",\n          \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n          \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n          \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n          \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n          \"type\": \"Organization\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"description\": \"to test typot\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n        \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n        \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n        \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n        \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n        \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n        \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n        \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n        \"created_at\": \"2017-05-24T02:24:37Z\",\n        \"updated_at\": \"2017-05-24T02:24:37Z\",\n        \"pushed_at\": \"2017-05-29T04:36:46Z\",\n        \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n        \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n        \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n        \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"homepage\": null,\n        \"size\": 2,\n        \"stargazers_count\": 0,\n        \"watchers_count\": 0,\n        \"language\": null,\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_downloads\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"forks_count\": 0,\n        \"mirror_url\": null,\n        \"open_issues_count\": 2,\n        \"forks\": 0,\n        \"open_issues\": 2,\n        \"watchers\": 0,\n        \"default_branch\": \"master\"\n      }\n    },\n    \"base\": {\n      \"label\": \"chakki-works:master\",\n      \"ref\": \"master\",\n      \"sha\": \"5d85936b799357162921c646d596b32ba29e2717\",\n      \"user\": {\n        \"login\": \"chakki-works\",\n        \"id\": 25578516,\n        \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/chakki-works\",\n        \"html_url\": \"https://github.com/chakki-works\",\n        \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n        \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n        \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n        \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n        \"type\": \"Organization\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 92240778,\n        \"name\": \"typot-demo\",\n        \"full_name\": \"chakki-works/typot-demo\",\n        \"owner\": {\n          \"login\": \"chakki-works\",\n          \"id\": 25578516,\n          \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/chakki-works\",\n          \"html_url\": \"https://github.com/chakki-works\",\n          \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n          \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n          \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n          \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n          \"type\": \"Organization\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"description\": \"to test typot\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n        \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n        \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n        \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n        \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n        \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n        \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n        \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n        \"created_at\": \"2017-05-24T02:24:37Z\",\n        \"updated_at\": \"2017-05-24T02:24:37Z\",\n        \"pushed_at\": \"2017-05-29T04:36:46Z\",\n        \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n        \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n        \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n        \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n        \"homepage\": null,\n        \"size\": 2,\n        \"stargazers_count\": 0,\n        \"watchers_count\": 0,\n        \"language\": null,\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_downloads\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"forks_count\": 0,\n        \"mirror_url\": null,\n        \"open_issues_count\": 2,\n        \"forks\": 0,\n        \"open_issues\": 2,\n        \"watchers\": 0,\n        \"default_branch\": \"master\"\n      }\n    },\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/4\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/chakki-works/typot-demo/pull/4\"\n      },\n      \"issue\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/4\"\n      },\n      \"comments\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/4/comments\"\n      },\n      \"review_comments\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/4/comments\"\n      },\n      \"review_comment\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}\"\n      },\n      \"commits\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls/4/commits\"\n      },\n      \"statuses\": {\n        \"href\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/f0d3ab26d259ef474996d22dcff21dfce6ca4492\"\n      }\n    },\n    \"merged\": false,\n    \"mergeable\": null,\n    \"rebaseable\": null,\n    \"mergeable_state\": \"unknown\",\n    \"merged_by\": null,\n    \"comments\": 0,\n    \"review_comments\": 0,\n    \"maintainer_can_modify\": false,\n    \"commits\": 1,\n    \"additions\": 2,\n    \"deletions\": 0,\n    \"changed_files\": 1\n  },\n  \"repository\": {\n    \"id\": 92240778,\n    \"name\": \"typot-demo\",\n    \"full_name\": \"chakki-works/typot-demo\",\n    \"owner\": {\n      \"login\": \"chakki-works\",\n      \"id\": 25578516,\n      \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/chakki-works\",\n      \"html_url\": \"https://github.com/chakki-works\",\n      \"followers_url\": \"https://api.github.com/users/chakki-works/followers\",\n      \"following_url\": \"https://api.github.com/users/chakki-works/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/chakki-works/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/chakki-works/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/chakki-works/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/chakki-works/orgs\",\n      \"repos_url\": \"https://api.github.com/users/chakki-works/repos\",\n      \"events_url\": \"https://api.github.com/users/chakki-works/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/chakki-works/received_events\",\n      \"type\": \"Organization\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/chakki-works/typot-demo\",\n    \"description\": \"to test typot\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/chakki-works/typot-demo\",\n    \"forks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/forks\",\n    \"keys_url\": \"https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}\",\n    \"collaborators_url\": \"https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}\",\n    \"teams_url\": \"https://api.github.com/repos/chakki-works/typot-demo/teams\",\n    \"hooks_url\": \"https://api.github.com/repos/chakki-works/typot-demo/hooks\",\n    \"issue_events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}\",\n    \"events_url\": \"https://api.github.com/repos/chakki-works/typot-demo/events\",\n    \"assignees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}\",\n    \"branches_url\": \"https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}\",\n    \"tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/tags\",\n    \"blobs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}\",\n    \"trees_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}\",\n    \"statuses_url\": \"https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}\",\n    \"languages_url\": \"https://api.github.com/repos/chakki-works/typot-demo/languages\",\n    \"stargazers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/stargazers\",\n    \"contributors_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contributors\",\n    \"subscribers_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/chakki-works/typot-demo/subscription\",\n    \"commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}\",\n    \"git_commits_url\": \"https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}\",\n    \"comments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/comments{/number}\",\n    \"issue_comment_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}\",\n    \"contents_url\": \"https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}\",\n    \"compare_url\": \"https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}\",\n    \"merges_url\": \"https://api.github.com/repos/chakki-works/typot-demo/merges\",\n    \"archive_url\": \"https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}\",\n    \"downloads_url\": \"https://api.github.com/repos/chakki-works/typot-demo/downloads\",\n    \"issues_url\": \"https://api.github.com/repos/chakki-works/typot-demo/issues{/number}\",\n    \"pulls_url\": \"https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}\",\n    \"milestones_url\": \"https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}\",\n    \"labels_url\": \"https://api.github.com/repos/chakki-works/typot-demo/labels{/name}\",\n    \"releases_url\": \"https://api.github.com/repos/chakki-works/typot-demo/releases{/id}\",\n    \"deployments_url\": \"https://api.github.com/repos/chakki-works/typot-demo/deployments\",\n    \"created_at\": \"2017-05-24T02:24:37Z\",\n    \"updated_at\": \"2017-05-24T02:24:37Z\",\n    \"pushed_at\": \"2017-05-29T04:36:46Z\",\n    \"git_url\": \"git://github.com/chakki-works/typot-demo.git\",\n    \"ssh_url\": \"git@github.com:chakki-works/typot-demo.git\",\n    \"clone_url\": \"https://github.com/chakki-works/typot-demo.git\",\n    \"svn_url\": \"https://github.com/chakki-works/typot-demo\",\n    \"homepage\": null,\n    \"size\": 2,\n    \"stargazers_count\": 0,\n    \"watchers_count\": 0,\n    \"language\": null,\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_downloads\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"forks_count\": 0,\n    \"mirror_url\": null,\n    \"open_issues_count\": 2,\n    \"forks\": 0,\n    \"open_issues\": 2,\n    \"watchers\": 0,\n    \"default_branch\": \"master\"\n  },\n  \"organization\": {\n    \"login\": \"chakki-works\",\n    \"id\": 25578516,\n    \"url\": \"https://api.github.com/orgs/chakki-works\",\n    \"repos_url\": \"https://api.github.com/orgs/chakki-works/repos\",\n    \"events_url\": \"https://api.github.com/orgs/chakki-works/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/chakki-works/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/chakki-works/issues\",\n    \"members_url\": \"https://api.github.com/orgs/chakki-works/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/chakki-works/public_members{/member}\",\n    \"avatar_url\": \"https://avatars0.githubusercontent.com/u/25578516?v=3\",\n    \"description\": \"Our mission is to enable everyone leave the office by the tea time\"\n  },\n  \"sender\": {\n    \"login\": \"icoxfog417\",\n    \"id\": 544269,\n    \"avatar_url\": \"https://avatars3.githubusercontent.com/u/544269?v=3\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/icoxfog417\",\n    \"html_url\": \"https://github.com/icoxfog417\",\n    \"followers_url\": \"https://api.github.com/users/icoxfog417/followers\",\n    \"following_url\": \"https://api.github.com/users/icoxfog417/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/icoxfog417/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/icoxfog417/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/icoxfog417/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/icoxfog417/orgs\",\n    \"repos_url\": \"https://api.github.com/users/icoxfog417/repos\",\n    \"events_url\": \"https://api.github.com/users/icoxfog417/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/icoxfog417/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"installation\": {\n    \"id\": 11111\n  }\n}\n\"\"\"\n\ndiff_sample = \"\"\"\ndiff --git a/content.md b/content.md\nindex b7ab025..67ea8f3 100644\n--- a/content.md\n+++ b/content.md\n@@ -1,5 +1,7 @@\n # Typot Demo Content\n \n * Now release humans from checking the typos\n-* Now relase humans from checking the typos\n+* Now release humans from checking the typos\n * Now release humans fram checkingg the typos\n+\n+ohh, typos!\n\"\"\"\n\ndiff_from_middle = \"\"\"\ndiff --git a/README.md b/README.md\nindex dc3326a..ab9eb25 100644\n--- a/README.md\n+++ b/README.md\n@@ -3,3 +3,5 @@\n Typot automatically detect & fix typo!\n \n You can try its feature on this repository.\n+\n+I made mistoke here.\n\"\"\"\n"
  },
  {
    "path": "tests/get_installation_id.py",
    "content": "import os\nimport json\n\n\ndef get():\n    path = os.path.join(os.path.dirname(__file__), \"./test_installation_id.json\")\n    if not os.path.exists(path):\n        raise Exception(\n            \"You have to prepare test_installation_id.json in tests folder. \\n That has 'installation_id': (your test app's installation id)\"\n            )\n    installation_id = \"\"\n    with open(path, encoding=\"utf-8\") as f:\n        body = json.load(f)\n        installation_id = body[\"installation_id\"]\n    \n    return installation_id\n"
  },
  {
    "path": "tests/test_diff_content.py",
    "content": "import os\nimport sys\nsys.path.append(os.path.join(os.path.dirname(__file__), \"../\"))\nimport unittest\nfrom typot.pull_request import PullRequest\nfrom typot.model import DiffContent, Line\nimport dummy_data as dd\n\n\nclass TestDiffContent(unittest.TestCase):\n\n    def test_get_added(self):\n        sample_diff = dd.diff_sample\n        diff_contents = PullRequest._get_added(sample_diff)\n        self.assertEqual(len(diff_contents), 1)\n        modified = diff_contents[0]\n        self.assertEqual(len(modified.contents), 3)\n\n    def test_line_position(self):\n        sample_diff = dd.diff_from_middle\n        diff_contents = PullRequest._get_added(sample_diff)\n        self.assertEqual(len(diff_contents), 1)\n        line = diff_contents[0].contents[-1]\n        self.assertEqual(line.line_no, 7)\n        self.assertEqual(line.relative_no, 5)\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n"
  },
  {
    "path": "tests/test_env.py",
    "content": "import os\nimport sys\nsys.path.append(os.path.join(os.path.dirname(__file__), \"../\"))\nimport unittest\nimport typot.env as env\n\n\nclass TestEnv(unittest.TestCase):\n\n    def test_private_key(self):\n        pem = env.get_private_pem()\n        self.assertTrue(pem)\n\n    def test_client_id_secret(self):\n        client_id = env.get_client_id()\n        client_secret = env.get_client_secret()\n        self.assertTrue(client_id)\n        self.assertTrue(client_secret)\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n"
  },
  {
    "path": "tests/test_pull_request.py",
    "content": "import os\nimport sys\nsys.path.append(os.path.join(os.path.dirname(__file__), \"../\"))\nimport json\nimport unittest\nfrom typot.pull_request import PullRequest\nfrom typot.model import Modification\nimport dummy_data as dd\nimport get_installation_id \n\n\nINSTALLATION_ID = get_installation_id.get()\n\n\nclass TestPullRequest(unittest.TestCase):\n\n    def test_create_instance(self):\n        pr_body = json.loads(dd.pull_request_created)\n        pr = PullRequest.create_from_hook(pr_body)\n        self.assertTrue(pr.title)\n        self.assertTrue(pr.diff_url)\n\n    def test_get_added(self):\n        pr_body = json.loads(dd.pull_request_created)\n        pr = PullRequest.create_from_hook(pr_body)\n        diff_contents = pr.get_added() \n        print(diff_contents)\n        self.assertEqual(len(diff_contents), 1)\n\n    def test_make_review(self):\n        pr = PullRequest.create(\"chakki-works\", \"typot-demo\", \"3\")\n        pr.installation_id = INSTALLATION_ID\n        m = Modification(\"README.md\", 1, \"hoge\", [\"hoge-1\", \"hoge-2\", \"hoge-3\"])\n        r_id = pr.make_review([m])\n        self.assertTrue(r_id)\n        # you have to delete yourself!\n\n    def test_read_modification(self):\n        comment_hook_body = json.loads(dd.review_changed)\n        pr = PullRequest.create_from_hook(comment_hook_body)\n        modification = pr.read_modification(comment_hook_body)\n        self.assertTrue(modification)\n        self.assertEqual(modification.target_word, \"hoge\")\n        self.assertEqual(modification.candidates[0], \"hoge-2\")\n\n    def test_push_modification(self):\n        pr_body = json.loads(dd.fix_target_pr)\n        pr = PullRequest.create_from_hook(pr_body)\n        pr.installation_id = INSTALLATION_ID\n        m = Modification(\"content.md\", 3, \"relase\", [\"release\"])\n        pr.push_modification(m)\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n"
  },
  {
    "path": "tests/test_spell_checker.py",
    "content": "import os\nimport sys\nsys.path.append(os.path.join(os.path.dirname(__file__), \"../\"))\nimport unittest\nfrom typot.model import DiffContent, Line\nfrom typot.spell_checker import SpellChecker\n\n\nclass TestSpellChecker(unittest.TestCase):\n\n    def test_spell_check(self):\n        s = \"My name iss John. I'm aesome singer.\"\n        checker = SpellChecker()\n        missed = checker.check(s)\n        self.assertGreater(len(missed), 0)\n        print(missed)\n\n    def test_spell_check(self):\n        f1 = DiffContent(\"test1.md\", [\n            Line(0, \"I'm John.\"),\n            Line(1, \"I'm awesme singer.\"),\n            Line(2, \"Singer mst be star.\"),\n        ])\n        checker = SpellChecker()\n        missed = checker.check(f1)\n        self.assertGreater(len(missed), 0)\n        print(missed)\n\nif __name__ == \"__main__\":\n    unittest.main()\n"
  },
  {
    "path": "typot/__init__.py",
    "content": ""
  },
  {
    "path": "typot/api.py",
    "content": "import os\nimport sys\nsys.path.append(os.path.join(os.path.dirname(__file__), \"../\"))\nimport hug\nfrom typot.pull_request import PullRequest\nfrom typot.spell_checker import SpellChecker\n\n\nversion = 1\n\n\n@hug.get(\"/ping\", versions=version)\n@hug.local()\ndef ping():\n    return {\"ping\": \"works fine!\"}\n\n\n@hug.post(\"/typot\", versions=version)\n@hug.local()\ndef typot(body=None):\n    if not body:\n        return {}\n    \n    response = {}\n    if body[\"action\"] == \"opened\" and \"pull_request\" in body:\n        # open the pull request\n        pr = PullRequest.create_from_hook(body)\n        diff_contents = pr.get_added()\n        diff_contents = [df for df in diff_contents if is_target_content(df.file_path)]\n        checker = SpellChecker()\n\n        modifications = []\n        for c in diff_contents:\n            file_modifications = checker.check(c)\n            if len(file_modifications) > 0:\n                modifications += file_modifications\n        \n        if len(modifications) > 0:\n            pr.make_review(modifications)\n            response = {\"message\": \"create pull request review\"}\n\n    elif body[\"action\"] == \"edited\" and \"pull_request\" in body and \"comment\" in body:\n        commented_user = body[\"comment\"][\"user\"][\"login\"]\n        if commented_user == \"typot[bot]\":\n            pr = PullRequest.create_from_hook(body)\n            modification = pr.read_modification(body)\n            if modification:\n                result = pr.push_modification(modification)\n                if result:\n                    response = {\"message\": \"apply modification\"}\n                else:\n                    response = {\"message\": \"apply is not adopted\"}\n\n    return response\n\n\ndef is_target_content(file_path):\n    file_name = os.path.basename(file_path)\n    file_base, ext = os.path.splitext(file_name)\n    if ext in [\".rst\", \".md\"] or file_base.upper() == \"README\":\n        return True\n    else:\n        return False\n"
  },
  {
    "path": "typot/env.py",
    "content": "import os\nimport json\nfrom datetime import datetime, timedelta\nimport jwt\nimport requests\n\n\ndef get_private_pem():\n    key = os.environ.get(\"PRIVATE_KEY\", \"\")\n    if not key:\n        default_path = os.path.join(os.path.dirname(__file__), \"../typot.pem\")\n        if os.path.exists(default_path):\n            with open(default_path, \"r\", encoding=\"utf-8\") as f:\n                key = f.readlines()\n                key = \"\".join(key)\n\n    return key\n\n\ndef get_client_id():\n    return _get_env(\"CLIENT_ID\")\n\n\ndef get_client_secret():\n    return _get_env(\"CLIENT_SECRET\")\n\ndef make_auth_header(installation_id):\n    utcnow = datetime.utcnow() + timedelta(seconds=-5)\n    duration = timedelta(seconds=30)\n    payload = {\n        \"iat\": utcnow,\n        \"exp\": utcnow + duration,\n        \"iss\": 2510\n    }\n    pem = get_private_pem()\n    encoded = jwt.encode(payload, pem, \"RS256\")\n    headers = {\n        \"Authorization\": \"Bearer \" + encoded.decode(\"utf-8\"),\n        \"Accept\": \"application/vnd.github.machine-man-preview+json\"\n        }\n    \n    auth_url = \"https://api.github.com/installations/{}/access_tokens\".format(installation_id)\n    r = requests.post(auth_url, headers=headers)\n\n    if not r.ok:\n        print(r.json()[\"message\"])\n        r.raise_for_status()\n    token = r.json()[\"token\"]\n    return {\n        \"Authorization\": \"token {}\".format(token)\n    }\n\ndef _get_env(key_name, default_value=\"\"):\n    env = os.environ.get(key_name, \"\")\n    if not env:\n        env_path = os.path.join(os.path.dirname(__file__), \"../envs.json\")\n        if os.path.exists(env_path):\n            with open(env_path, \"r\", encoding=\"utf-8\") as f:\n                envs = json.load(f)\n                if key_name in envs:\n                    env = envs[key_name]\n    return env\n"
  },
  {
    "path": "typot/model.py",
    "content": "class Line():\n\n    def __init__(self, line_no, text, relative_no=-1):\n        self.line_no = line_no\n        self.text = text\n        self.relative_no = line_no if relative_no == -1 else relative_no\n\n\nclass DiffContent():\n\n    def __init__(self, file_path, contents=()):\n        self.file_path = file_path\n        self.contents = contents\n\n    def __repr__(self):\n        return \"{}<{}:{} lines>\".format(\n            self.__class__.__name__,\n            self.file_path,\n            len(self.contents))\n\n\nclass Modification():\n\n    def __init__(self, file_path, line_no, relative_no, target_word, candidates):\n        self.file_path = file_path\n        self.line_no = line_no  # line no starts from 1\n        self.relative_no = relative_no  # line no starts from 1\n        self.target_word = target_word\n        self.candidates = candidates\n\n    def __repr__(self):\n        return \"{}<{}, {}@{}>\".format(\n            self.__class__.__name__,\n            self.file_path, self.target_word, self.line_no)\n"
  },
  {
    "path": "typot/pull_request.py",
    "content": "from io import StringIO\nimport re\nimport base64\nimport requests\nfrom unidiff import PatchSet\nfrom unidiff.constants import LINE_TYPE_ADDED\nfrom typot.env import make_auth_header\nfrom typot.model import Line, DiffContent, Modification\nfrom typot.spell_checker import SpellChecker\n\n\nclass PullRequest():\n    API_ROOT = \"https://api.github.com\"\n\n    def __init__(self, \n        title=\"\", \n        no=-1, \n        owner=\"\",\n        repo=\"\",\n        head_owner=\"\",\n        head_repo=\"\",\n        head_ref=\"\",\n        diff_url=\"\",\n        installation_id=\"\"\n        ):\n        \n        self.title = title\n        self.no = no\n        self.owner = owner\n        self.repo = repo\n        self.head_owner = head_owner\n        self.head_repo = head_repo\n        self.head_ref = head_ref\n        self.diff_url = diff_url\n        self.installation_id = installation_id\n    \n    @classmethod\n    def create(cls, owner, repo, pull_id):\n        url = cls.API_ROOT + \"/repos/{}/{}/pulls/{}\".format(owner, repo, pull_id)\n        r = requests.get(url)\n        return cls._create_from_json(r.json())\n\n    @classmethod\n    def create_from_hook(cls, webhook_body):\n        if \"pull_request\" not in webhook_body:\n            return None\n        pr = webhook_body[\"pull_request\"]\n        ins = cls._create_from_json(pr)\n        ins.installation_id = webhook_body[\"installation\"][\"id\"]\n        return ins\n    \n    @classmethod\n    def _create_from_json(cls, pr):\n        title = pr[\"title\"]\n        no = pr[\"number\"]\n        owner = pr[\"base\"][\"repo\"][\"owner\"][\"login\"]\n        repo = pr[\"base\"][\"repo\"][\"name\"]\n        head_owner = pr[\"head\"][\"repo\"][\"owner\"][\"login\"]\n        head_repo = pr[\"head\"][\"repo\"][\"name\"]\n        head_ref = pr[\"head\"][\"ref\"]\n        diff_url = pr[\"diff_url\"]\n\n        return PullRequest(title, no, owner, repo, head_owner, head_repo, head_ref, diff_url)\n\n    def get_added(self):\n        diff = requests.get(self.diff_url).content.decode(\"utf-8\")\n        return self._get_added(diff)\n    \n    @classmethod\n    def _get_added(cls, diff):\n        patches = PatchSet(StringIO(diff))\n        \n        diff_contents = []\n        for p in patches:\n            if p.added > 0:\n                contents = []\n                for h in p:\n                    added = []\n                    for i, line in enumerate(h):\n                        if line.is_added:\n                            added_line = Line(line.target_line_no, line.value, i + 1)\n                            added.append(added_line)\n                    contents += added\n                diff_contents.append(\n                    DiffContent(p.path, contents)\n                    )\n\n        return diff_contents        \n\n    def make_review(self, modifications):\n        url = self.API_ROOT + \"/repos/{}/{}/pulls/{}/reviews\".format(\n            self.owner, self.repo, self.no\n        )\n\n        comments = []\n        for m in modifications:\n            body = \"\\\"{}\\\" at {} is typo? \\n\".format(m.target_word, m.line_no)\n            body += \"\\n\".join([\"- [ ] {}\".format(c) for c in m.candidates])\n\n            # comment should be done by relative no\n            c = {\n                \"path\": m.file_path,\n                \"position\": m.relative_no,\n                \"body\": body\n            }\n            comments.append(c)\n        \n        review_id = None\n        payload = {\n            \"body\": \"Review from typot\",\n            \"event\": \"COMMENT\",\n            \"comments\": comments\n        }\n        r = requests.post(url, json=payload, headers=make_auth_header(self.installation_id))\n        if not r.ok:\n            print(payload)\n            print(r.json())\n            r.raise_for_status()\n        else:\n            review_id = r.json()[\"id\"]\n\n        return review_id\n    \n    @classmethod\n    def read_modification(cls, review_comment_hook):\n        if \"comment\" not in review_comment_hook:\n            return None\n        comment_body = review_comment_hook[\"comment\"]\n        file_path = comment_body[\"path\"]\n        relative_no = int(comment_body[\"position\"])\n        body = comment_body[\"body\"]\n        r = requests.get(comment_body[\"url\"])\n        if r.ok:\n            body = r.json()[\"body\"]  # get latest body\n\n        target_word = \"\"\n        candidates = []\n\n        line_no = re.search(\"at\\s\\d+\\sis\", body)\n        if line_no is not None:\n            line_no = int(line_no.group(0).split()[1])\n        else:\n            line_no =relative_no\n        words = re.search(\"\\\"(\\w|-|_)+(\\.|\\?|\\!)?\\\"\", body)\n        if words is not None:\n            target_word = words.group(0).replace(\"\\\"\", \"\")\n        mods = re.search(\"\\[x\\]\\s(\\w|-|_)+\\n\", body)\n        if mods is not None:\n            c = mods.group(0)\n            c = c.strip().replace(\"[x] \", \"\")\n            candidates = [c]\n\n        if target_word and len(candidates) > 0:\n            m = Modification(file_path, line_no, relative_no, target_word, candidates)\n            return m\n        else:\n            return None\n\n    def push_modification(self, modification):\n        url = self.API_ROOT + \"/repos/{}/{}/contents/{}\".format(\n            self.head_owner, self.head_repo, modification.file_path\n        )\n\n        r = requests.get(url, params={\"ref\": self.head_ref})\n        if not r.ok:\n            raise Exception(\"Can not access to the {}/{}'s content.\".format(\n                self.head_owner, self.head_repo\n            ))\n        encoding = r.encoding\n        body = r.json()\n        content = body[\"content\"]\n        content = base64.b64decode(content).decode(encoding)\n        sha = body[\"sha\"]\n        fix_position = int(modification.line_no) - 1  # read file lines start with 0\n        fixed = content\n        with StringIO(content) as c:\n            lines = c.readlines()\n            words = lines[fix_position].split(\" \")\n            for i, w in enumerate(words):\n                _w = SpellChecker.strip(w.strip())\n                if _w == modification.target_word:\n                    words[i] = words[i].replace(_w, modification.candidates[0])\n            \n            fixed = \" \".join(words) + \"\\n\"\n            lines[fix_position] = fixed\n            fixed = \"\".join(lines)\n        \n        if content != fixed:\n            encoded = base64.b64encode(fixed.encode(encoding)).decode(encoding)\n            message = \"fix typo: {} to {}, line {}\".format(\n                modification.target_word,\n                modification.candidates[0],\n                modification.line_no\n                )\n\n            payload = {\n                \"message\": message,\n                \"content\": encoded,\n                \"sha\": sha,\n                \"branch\": self.head_ref\n            }\n            r = requests.put(url, json=payload,headers=make_auth_header(self.installation_id))\n\n            if not r.ok:\n                print(r.json())\n                r.raise_for_status()\n            return True\n        \n        return False\n"
  },
  {
    "path": "typot/spell_checker.py",
    "content": "import enchant\nfrom typot.model import DiffContent, Modification\n\n\nclass SpellChecker():\n\n    def __init__(self, lang=\"en_US\"):\n        self.checker = enchant.Dict(lang)\n    \n    def check(self, target):\n        if isinstance(target, DiffContent):\n            return self.check_diff_content(target)\n        else:\n            return self.check_sentence(target)\n\n    def check_sentence(self, sentence):\n        words = self.tokenize(sentence)\n        miss = {}\n        if len(words) > 0:\n            for w in words:\n                if w and not self.checker.check(w):\n                    miss[w] = self.checker.suggest(w)[:5]  # up to five\n        \n        return miss\n\n    def check_diff_content(self, diff_content):\n        modifications = []\n        file_path = diff_content.file_path\n        for c in diff_content.contents:\n            result = self.check_sentence(c.text)\n            if len(result) > 0:\n                for r in result:\n                    m = Modification(file_path, c.line_no, c.relative_no, r, result[r])\n                    modifications.append(m)\n        \n        return modifications\n\n    @classmethod\n    def strip(cls, word):\n        _w = word.strip()\n        return _w.replace(\"\\\"\", \"\").replace(\"'\", \"\").replace(\".\", \"\").replace(\"?\", \"\").replace(\"!\", \"\")\n\n    @classmethod\n    def tokenize(cls, sentence):\n        words = sentence.strip().split(\" \")\n        words = [cls.strip(w) for w in words]\n        words = [w for w in words if w]\n        return words\n"
  }
]