├── typot ├── __init__.py ├── model.py ├── spell_checker.py ├── env.py ├── api.py └── pull_request.py ├── Procfile ├── docs ├── top.jpg ├── typot.gif ├── autofix_0_mid.png ├── autofix_1_mid.png ├── autofix_2_mid.png └── typo_review_mid.png ├── requirements.txt ├── Dockerfile ├── tests ├── get_installation_id.py ├── test_env.py ├── test_spell_checker.py ├── test_diff_content.py ├── test_pull_request.py └── dummy_data.py ├── README.md ├── .gitignore ├── get_installations.py └── LICENSE /typot/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: hug -f typot/api.py -------------------------------------------------------------------------------- /docs/top.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakki-works/typot/HEAD/docs/top.jpg -------------------------------------------------------------------------------- /docs/typot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakki-works/typot/HEAD/docs/typot.gif -------------------------------------------------------------------------------- /docs/autofix_0_mid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakki-works/typot/HEAD/docs/autofix_0_mid.png -------------------------------------------------------------------------------- /docs/autofix_1_mid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakki-works/typot/HEAD/docs/autofix_1_mid.png -------------------------------------------------------------------------------- /docs/autofix_2_mid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakki-works/typot/HEAD/docs/autofix_2_mid.png -------------------------------------------------------------------------------- /docs/typo_review_mid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakki-works/typot/HEAD/docs/typo_review_mid.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | hug==2.3.0 2 | requests==2.14.2 3 | unidiff==0.5.3 4 | pyenchant==1.6.8 5 | PyJWT==1.5.0 6 | cryptography==1.8.2 7 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.4.5 2 | 3 | RUN apt-get update 4 | RUN apt-get install -y enchant 5 | 6 | ADD ./requirements.txt /tmp/requirements.txt 7 | RUN pip install -qr /tmp/requirements.txt 8 | 9 | ADD ./typot /opt/typot/ 10 | WORKDIR /opt/typot 11 | 12 | # Expose is NOT supported by Heroku 13 | # EXPOSE 8000 14 | 15 | CMD hug -p $PORT -f /opt/typot/api.py 16 | -------------------------------------------------------------------------------- /tests/get_installation_id.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | 4 | 5 | def get(): 6 | path = os.path.join(os.path.dirname(__file__), "./test_installation_id.json") 7 | if not os.path.exists(path): 8 | raise Exception( 9 | "You have to prepare test_installation_id.json in tests folder. \n That has 'installation_id': (your test app's installation id)" 10 | ) 11 | installation_id = "" 12 | with open(path, encoding="utf-8") as f: 13 | body = json.load(f) 14 | installation_id = body["installation_id"] 15 | 16 | return installation_id 17 | -------------------------------------------------------------------------------- /tests/test_env.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | sys.path.append(os.path.join(os.path.dirname(__file__), "../")) 4 | import unittest 5 | import typot.env as env 6 | 7 | 8 | class TestEnv(unittest.TestCase): 9 | 10 | def test_private_key(self): 11 | pem = env.get_private_pem() 12 | self.assertTrue(pem) 13 | 14 | def test_client_id_secret(self): 15 | client_id = env.get_client_id() 16 | client_secret = env.get_client_secret() 17 | self.assertTrue(client_id) 18 | self.assertTrue(client_secret) 19 | 20 | 21 | if __name__ == "__main__": 22 | unittest.main() 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # typot 2 | 3 | **typot** detects the typos in your pull request, and fix it by just selecting the modification candidates. 4 | 5 | ![typot.gif](./docs/typot.gif) 6 | 7 | 1. When you open the pull request, *typot* checks it and if there are typos, make review comments on it. 8 | 2. If suitable fix is in suggested candidates, then select it! *typot* adopts it automatically. 9 | 10 | Now, README file and all `.md` and `.rst` files are check target. 11 | 12 | ## Install 13 | 14 | **[Please Authorize typot from this Link!](https://github.com/apps/typot)** 15 | 16 | ## Dependencies 17 | 18 | * [hug](http://www.hug.rest/) 19 | * [PyEnchant](http://pythonhosted.org/pyenchant/) 20 | * [unidiff](https://github.com/matiasb/python-unidiff) 21 | * [PyJWT](https://github.com/jpadilla/pyjwt) 22 | 23 | *icon's photo from [independentman](https://flic.kr/p/2mHSE)* 24 | -------------------------------------------------------------------------------- /tests/test_spell_checker.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | sys.path.append(os.path.join(os.path.dirname(__file__), "../")) 4 | import unittest 5 | from typot.model import DiffContent, Line 6 | from typot.spell_checker import SpellChecker 7 | 8 | 9 | class TestSpellChecker(unittest.TestCase): 10 | 11 | def test_spell_check(self): 12 | s = "My name iss John. I'm aesome singer." 13 | checker = SpellChecker() 14 | missed = checker.check(s) 15 | self.assertGreater(len(missed), 0) 16 | print(missed) 17 | 18 | def test_spell_check(self): 19 | f1 = DiffContent("test1.md", [ 20 | Line(0, "I'm John."), 21 | Line(1, "I'm awesme singer."), 22 | Line(2, "Singer mst be star."), 23 | ]) 24 | checker = SpellChecker() 25 | missed = checker.check(f1) 26 | self.assertGreater(len(missed), 0) 27 | print(missed) 28 | 29 | if __name__ == "__main__": 30 | unittest.main() 31 | -------------------------------------------------------------------------------- /tests/test_diff_content.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | sys.path.append(os.path.join(os.path.dirname(__file__), "../")) 4 | import unittest 5 | from typot.pull_request import PullRequest 6 | from typot.model import DiffContent, Line 7 | import dummy_data as dd 8 | 9 | 10 | class TestDiffContent(unittest.TestCase): 11 | 12 | def test_get_added(self): 13 | sample_diff = dd.diff_sample 14 | diff_contents = PullRequest._get_added(sample_diff) 15 | self.assertEqual(len(diff_contents), 1) 16 | modified = diff_contents[0] 17 | self.assertEqual(len(modified.contents), 3) 18 | 19 | def test_line_position(self): 20 | sample_diff = dd.diff_from_middle 21 | diff_contents = PullRequest._get_added(sample_diff) 22 | self.assertEqual(len(diff_contents), 1) 23 | line = diff_contents[0].contents[-1] 24 | self.assertEqual(line.line_no, 7) 25 | self.assertEqual(line.relative_no, 5) 26 | 27 | 28 | if __name__ == "__main__": 29 | unittest.main() 30 | -------------------------------------------------------------------------------- /typot/model.py: -------------------------------------------------------------------------------- 1 | class Line(): 2 | 3 | def __init__(self, line_no, text, relative_no=-1): 4 | self.line_no = line_no 5 | self.text = text 6 | self.relative_no = line_no if relative_no == -1 else relative_no 7 | 8 | 9 | class DiffContent(): 10 | 11 | def __init__(self, file_path, contents=()): 12 | self.file_path = file_path 13 | self.contents = contents 14 | 15 | def __repr__(self): 16 | return "{}<{}:{} lines>".format( 17 | self.__class__.__name__, 18 | self.file_path, 19 | len(self.contents)) 20 | 21 | 22 | class Modification(): 23 | 24 | def __init__(self, file_path, line_no, relative_no, target_word, candidates): 25 | self.file_path = file_path 26 | self.line_no = line_no # line no starts from 1 27 | self.relative_no = relative_no # line no starts from 1 28 | self.target_word = target_word 29 | self.candidates = candidates 30 | 31 | def __repr__(self): 32 | return "{}<{}, {}@{}>".format( 33 | self.__class__.__name__, 34 | self.file_path, self.target_word, self.line_no) 35 | -------------------------------------------------------------------------------- /typot/spell_checker.py: -------------------------------------------------------------------------------- 1 | import enchant 2 | from typot.model import DiffContent, Modification 3 | 4 | 5 | class SpellChecker(): 6 | 7 | def __init__(self, lang="en_US"): 8 | self.checker = enchant.Dict(lang) 9 | 10 | def check(self, target): 11 | if isinstance(target, DiffContent): 12 | return self.check_diff_content(target) 13 | else: 14 | return self.check_sentence(target) 15 | 16 | def check_sentence(self, sentence): 17 | words = self.tokenize(sentence) 18 | miss = {} 19 | if len(words) > 0: 20 | for w in words: 21 | if w and not self.checker.check(w): 22 | miss[w] = self.checker.suggest(w)[:5] # up to five 23 | 24 | return miss 25 | 26 | def check_diff_content(self, diff_content): 27 | modifications = [] 28 | file_path = diff_content.file_path 29 | for c in diff_content.contents: 30 | result = self.check_sentence(c.text) 31 | if len(result) > 0: 32 | for r in result: 33 | m = Modification(file_path, c.line_no, c.relative_no, r, result[r]) 34 | modifications.append(m) 35 | 36 | return modifications 37 | 38 | @classmethod 39 | def strip(cls, word): 40 | _w = word.strip() 41 | return _w.replace("\"", "").replace("'", "").replace(".", "").replace("?", "").replace("!", "") 42 | 43 | @classmethod 44 | def tokenize(cls, sentence): 45 | words = sentence.strip().split(" ") 46 | words = [cls.strip(w) for w in words] 47 | words = [w for w in words if w] 48 | return words 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | 49 | # Translations 50 | *.mo 51 | *.pot 52 | 53 | # Django stuff: 54 | *.log 55 | local_settings.py 56 | 57 | # Flask stuff: 58 | instance/ 59 | .webassets-cache 60 | 61 | # Scrapy stuff: 62 | .scrapy 63 | 64 | # Sphinx documentation 65 | docs/_build/ 66 | 67 | # PyBuilder 68 | target/ 69 | 70 | # Jupyter Notebook 71 | .ipynb_checkpoints 72 | 73 | # pyenv 74 | .python-version 75 | 76 | # celery beat schedule file 77 | celerybeat-schedule 78 | 79 | # SageMath parsed files 80 | *.sage.py 81 | 82 | # dotenv 83 | .env 84 | 85 | # virtualenv 86 | .venv 87 | venv/ 88 | ENV/ 89 | 90 | # Spyder project settings 91 | .spyderproject 92 | .spyproject 93 | 94 | # Rope project settings 95 | .ropeproject 96 | 97 | # mkdocs documentation 98 | /site 99 | 100 | # mypy 101 | .mypy_cache/ 102 | 103 | .DS_Store 104 | typot.pem 105 | envs.json 106 | tests/test_installation_id.json 107 | -------------------------------------------------------------------------------- /get_installations.py: -------------------------------------------------------------------------------- 1 | import os 2 | import argparse 3 | from datetime import datetime, timedelta 4 | import requests 5 | import jwt 6 | 7 | 8 | def get_private_pem(file_path): 9 | key = os.environ.get("PRIVATE_KEY", "") 10 | if not key: 11 | default_path = os.path.join(os.path.dirname(__file__), file_path) 12 | if os.path.exists(default_path): 13 | with open(default_path, "r", encoding="utf-8") as f: 14 | key = f.readlines() 15 | key = "".join(key) 16 | 17 | return key 18 | 19 | 20 | parser = argparse.ArgumentParser(description="Get Installations count of your App.") 21 | parser.add_argument("app_id", help="app_id of Your apps") 22 | parser.add_argument("--pem", default="", help="path to pem file") 23 | 24 | 25 | if __name__ == "__main__": 26 | url = "https://api.github.com/app/installations" 27 | 28 | args = parser.parse_args() 29 | 30 | pem_path = args.pem 31 | if not pem_path: 32 | path = os.path.abspath(os.path.dirname(__file__)) 33 | app_name = os.path.basename(path) 34 | pem_path = app_name + ".pem" 35 | 36 | if not os.path.exists(pem_path): 37 | raise Exception("Pem file {} does not exist".format(pem_path)) 38 | 39 | utcnow = datetime.utcnow() + timedelta(seconds=-5) 40 | duration = timedelta(seconds=10) 41 | payload = { 42 | "iat": utcnow, 43 | "exp": utcnow + duration, 44 | "iss": args.app_id 45 | } 46 | pem = get_private_pem(pem_path) 47 | encoded = jwt.encode(payload, pem, "RS256") 48 | headers = { 49 | "Authorization": "Bearer " + encoded.decode("utf-8"), 50 | "Accept": "application/vnd.github.machine-man-preview+json" 51 | } 52 | 53 | r = requests.get(url, headers=headers) 54 | if r.ok: 55 | print(len(r.json())) 56 | else: 57 | r.raise_for_status() 58 | -------------------------------------------------------------------------------- /typot/env.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from datetime import datetime, timedelta 4 | import jwt 5 | import requests 6 | 7 | 8 | def get_private_pem(): 9 | key = os.environ.get("PRIVATE_KEY", "") 10 | if not key: 11 | default_path = os.path.join(os.path.dirname(__file__), "../typot.pem") 12 | if os.path.exists(default_path): 13 | with open(default_path, "r", encoding="utf-8") as f: 14 | key = f.readlines() 15 | key = "".join(key) 16 | 17 | return key 18 | 19 | 20 | def get_client_id(): 21 | return _get_env("CLIENT_ID") 22 | 23 | 24 | def get_client_secret(): 25 | return _get_env("CLIENT_SECRET") 26 | 27 | def make_auth_header(installation_id): 28 | utcnow = datetime.utcnow() + timedelta(seconds=-5) 29 | duration = timedelta(seconds=30) 30 | payload = { 31 | "iat": utcnow, 32 | "exp": utcnow + duration, 33 | "iss": 2510 34 | } 35 | pem = get_private_pem() 36 | encoded = jwt.encode(payload, pem, "RS256") 37 | headers = { 38 | "Authorization": "Bearer " + encoded.decode("utf-8"), 39 | "Accept": "application/vnd.github.machine-man-preview+json" 40 | } 41 | 42 | auth_url = "https://api.github.com/installations/{}/access_tokens".format(installation_id) 43 | r = requests.post(auth_url, headers=headers) 44 | 45 | if not r.ok: 46 | print(r.json()["message"]) 47 | r.raise_for_status() 48 | token = r.json()["token"] 49 | return { 50 | "Authorization": "token {}".format(token) 51 | } 52 | 53 | def _get_env(key_name, default_value=""): 54 | env = os.environ.get(key_name, "") 55 | if not env: 56 | env_path = os.path.join(os.path.dirname(__file__), "../envs.json") 57 | if os.path.exists(env_path): 58 | with open(env_path, "r", encoding="utf-8") as f: 59 | envs = json.load(f) 60 | if key_name in envs: 61 | env = envs[key_name] 62 | return env 63 | -------------------------------------------------------------------------------- /tests/test_pull_request.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | sys.path.append(os.path.join(os.path.dirname(__file__), "../")) 4 | import json 5 | import unittest 6 | from typot.pull_request import PullRequest 7 | from typot.model import Modification 8 | import dummy_data as dd 9 | import get_installation_id 10 | 11 | 12 | INSTALLATION_ID = get_installation_id.get() 13 | 14 | 15 | class TestPullRequest(unittest.TestCase): 16 | 17 | def test_create_instance(self): 18 | pr_body = json.loads(dd.pull_request_created) 19 | pr = PullRequest.create_from_hook(pr_body) 20 | self.assertTrue(pr.title) 21 | self.assertTrue(pr.diff_url) 22 | 23 | def test_get_added(self): 24 | pr_body = json.loads(dd.pull_request_created) 25 | pr = PullRequest.create_from_hook(pr_body) 26 | diff_contents = pr.get_added() 27 | print(diff_contents) 28 | self.assertEqual(len(diff_contents), 1) 29 | 30 | def test_make_review(self): 31 | pr = PullRequest.create("chakki-works", "typot-demo", "3") 32 | pr.installation_id = INSTALLATION_ID 33 | m = Modification("README.md", 1, "hoge", ["hoge-1", "hoge-2", "hoge-3"]) 34 | r_id = pr.make_review([m]) 35 | self.assertTrue(r_id) 36 | # you have to delete yourself! 37 | 38 | def test_read_modification(self): 39 | comment_hook_body = json.loads(dd.review_changed) 40 | pr = PullRequest.create_from_hook(comment_hook_body) 41 | modification = pr.read_modification(comment_hook_body) 42 | self.assertTrue(modification) 43 | self.assertEqual(modification.target_word, "hoge") 44 | self.assertEqual(modification.candidates[0], "hoge-2") 45 | 46 | def test_push_modification(self): 47 | pr_body = json.loads(dd.fix_target_pr) 48 | pr = PullRequest.create_from_hook(pr_body) 49 | pr.installation_id = INSTALLATION_ID 50 | m = Modification("content.md", 3, "relase", ["release"]) 51 | pr.push_modification(m) 52 | 53 | 54 | if __name__ == "__main__": 55 | unittest.main() 56 | -------------------------------------------------------------------------------- /typot/api.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | sys.path.append(os.path.join(os.path.dirname(__file__), "../")) 4 | import hug 5 | from typot.pull_request import PullRequest 6 | from typot.spell_checker import SpellChecker 7 | 8 | 9 | version = 1 10 | 11 | 12 | @hug.get("/ping", versions=version) 13 | @hug.local() 14 | def ping(): 15 | return {"ping": "works fine!"} 16 | 17 | 18 | @hug.post("/typot", versions=version) 19 | @hug.local() 20 | def typot(body=None): 21 | if not body: 22 | return {} 23 | 24 | response = {} 25 | if body["action"] == "opened" and "pull_request" in body: 26 | # open the pull request 27 | pr = PullRequest.create_from_hook(body) 28 | diff_contents = pr.get_added() 29 | diff_contents = [df for df in diff_contents if is_target_content(df.file_path)] 30 | checker = SpellChecker() 31 | 32 | modifications = [] 33 | for c in diff_contents: 34 | file_modifications = checker.check(c) 35 | if len(file_modifications) > 0: 36 | modifications += file_modifications 37 | 38 | if len(modifications) > 0: 39 | pr.make_review(modifications) 40 | response = {"message": "create pull request review"} 41 | 42 | elif body["action"] == "edited" and "pull_request" in body and "comment" in body: 43 | commented_user = body["comment"]["user"]["login"] 44 | if commented_user == "typot[bot]": 45 | pr = PullRequest.create_from_hook(body) 46 | modification = pr.read_modification(body) 47 | if modification: 48 | result = pr.push_modification(modification) 49 | if result: 50 | response = {"message": "apply modification"} 51 | else: 52 | response = {"message": "apply is not adopted"} 53 | 54 | return response 55 | 56 | 57 | def is_target_content(file_path): 58 | file_name = os.path.basename(file_path) 59 | file_base, ext = os.path.splitext(file_name) 60 | if ext in [".rst", ".md"] or file_base.upper() == "README": 61 | return True 62 | else: 63 | return False 64 | -------------------------------------------------------------------------------- /typot/pull_request.py: -------------------------------------------------------------------------------- 1 | from io import StringIO 2 | import re 3 | import base64 4 | import requests 5 | from unidiff import PatchSet 6 | from unidiff.constants import LINE_TYPE_ADDED 7 | from typot.env import make_auth_header 8 | from typot.model import Line, DiffContent, Modification 9 | from typot.spell_checker import SpellChecker 10 | 11 | 12 | class PullRequest(): 13 | API_ROOT = "https://api.github.com" 14 | 15 | def __init__(self, 16 | title="", 17 | no=-1, 18 | owner="", 19 | repo="", 20 | head_owner="", 21 | head_repo="", 22 | head_ref="", 23 | diff_url="", 24 | installation_id="" 25 | ): 26 | 27 | self.title = title 28 | self.no = no 29 | self.owner = owner 30 | self.repo = repo 31 | self.head_owner = head_owner 32 | self.head_repo = head_repo 33 | self.head_ref = head_ref 34 | self.diff_url = diff_url 35 | self.installation_id = installation_id 36 | 37 | @classmethod 38 | def create(cls, owner, repo, pull_id): 39 | url = cls.API_ROOT + "/repos/{}/{}/pulls/{}".format(owner, repo, pull_id) 40 | r = requests.get(url) 41 | return cls._create_from_json(r.json()) 42 | 43 | @classmethod 44 | def create_from_hook(cls, webhook_body): 45 | if "pull_request" not in webhook_body: 46 | return None 47 | pr = webhook_body["pull_request"] 48 | ins = cls._create_from_json(pr) 49 | ins.installation_id = webhook_body["installation"]["id"] 50 | return ins 51 | 52 | @classmethod 53 | def _create_from_json(cls, pr): 54 | title = pr["title"] 55 | no = pr["number"] 56 | owner = pr["base"]["repo"]["owner"]["login"] 57 | repo = pr["base"]["repo"]["name"] 58 | head_owner = pr["head"]["repo"]["owner"]["login"] 59 | head_repo = pr["head"]["repo"]["name"] 60 | head_ref = pr["head"]["ref"] 61 | diff_url = pr["diff_url"] 62 | 63 | return PullRequest(title, no, owner, repo, head_owner, head_repo, head_ref, diff_url) 64 | 65 | def get_added(self): 66 | diff = requests.get(self.diff_url).content.decode("utf-8") 67 | return self._get_added(diff) 68 | 69 | @classmethod 70 | def _get_added(cls, diff): 71 | patches = PatchSet(StringIO(diff)) 72 | 73 | diff_contents = [] 74 | for p in patches: 75 | if p.added > 0: 76 | contents = [] 77 | for h in p: 78 | added = [] 79 | for i, line in enumerate(h): 80 | if line.is_added: 81 | added_line = Line(line.target_line_no, line.value, i + 1) 82 | added.append(added_line) 83 | contents += added 84 | diff_contents.append( 85 | DiffContent(p.path, contents) 86 | ) 87 | 88 | return diff_contents 89 | 90 | def make_review(self, modifications): 91 | url = self.API_ROOT + "/repos/{}/{}/pulls/{}/reviews".format( 92 | self.owner, self.repo, self.no 93 | ) 94 | 95 | comments = [] 96 | for m in modifications: 97 | body = "\"{}\" at {} is typo? \n".format(m.target_word, m.line_no) 98 | body += "\n".join(["- [ ] {}".format(c) for c in m.candidates]) 99 | 100 | # comment should be done by relative no 101 | c = { 102 | "path": m.file_path, 103 | "position": m.relative_no, 104 | "body": body 105 | } 106 | comments.append(c) 107 | 108 | review_id = None 109 | payload = { 110 | "body": "Review from typot", 111 | "event": "COMMENT", 112 | "comments": comments 113 | } 114 | r = requests.post(url, json=payload, headers=make_auth_header(self.installation_id)) 115 | if not r.ok: 116 | print(payload) 117 | print(r.json()) 118 | r.raise_for_status() 119 | else: 120 | review_id = r.json()["id"] 121 | 122 | return review_id 123 | 124 | @classmethod 125 | def read_modification(cls, review_comment_hook): 126 | if "comment" not in review_comment_hook: 127 | return None 128 | comment_body = review_comment_hook["comment"] 129 | file_path = comment_body["path"] 130 | relative_no = int(comment_body["position"]) 131 | body = comment_body["body"] 132 | r = requests.get(comment_body["url"]) 133 | if r.ok: 134 | body = r.json()["body"] # get latest body 135 | 136 | target_word = "" 137 | candidates = [] 138 | 139 | line_no = re.search("at\s\d+\sis", body) 140 | if line_no is not None: 141 | line_no = int(line_no.group(0).split()[1]) 142 | else: 143 | line_no =relative_no 144 | words = re.search("\"(\w|-|_)+(\.|\?|\!)?\"", body) 145 | if words is not None: 146 | target_word = words.group(0).replace("\"", "") 147 | mods = re.search("\[x\]\s(\w|-|_)+\n", body) 148 | if mods is not None: 149 | c = mods.group(0) 150 | c = c.strip().replace("[x] ", "") 151 | candidates = [c] 152 | 153 | if target_word and len(candidates) > 0: 154 | m = Modification(file_path, line_no, relative_no, target_word, candidates) 155 | return m 156 | else: 157 | return None 158 | 159 | def push_modification(self, modification): 160 | url = self.API_ROOT + "/repos/{}/{}/contents/{}".format( 161 | self.head_owner, self.head_repo, modification.file_path 162 | ) 163 | 164 | r = requests.get(url, params={"ref": self.head_ref}) 165 | if not r.ok: 166 | raise Exception("Can not access to the {}/{}'s content.".format( 167 | self.head_owner, self.head_repo 168 | )) 169 | encoding = r.encoding 170 | body = r.json() 171 | content = body["content"] 172 | content = base64.b64decode(content).decode(encoding) 173 | sha = body["sha"] 174 | fix_position = int(modification.line_no) - 1 # read file lines start with 0 175 | fixed = content 176 | with StringIO(content) as c: 177 | lines = c.readlines() 178 | words = lines[fix_position].split(" ") 179 | for i, w in enumerate(words): 180 | _w = SpellChecker.strip(w.strip()) 181 | if _w == modification.target_word: 182 | words[i] = words[i].replace(_w, modification.candidates[0]) 183 | 184 | fixed = " ".join(words) + "\n" 185 | lines[fix_position] = fixed 186 | fixed = "".join(lines) 187 | 188 | if content != fixed: 189 | encoded = base64.b64encode(fixed.encode(encoding)).decode(encoding) 190 | message = "fix typo: {} to {}, line {}".format( 191 | modification.target_word, 192 | modification.candidates[0], 193 | modification.line_no 194 | ) 195 | 196 | payload = { 197 | "message": message, 198 | "content": encoded, 199 | "sha": sha, 200 | "branch": self.head_ref 201 | } 202 | r = requests.put(url, json=payload,headers=make_auth_header(self.installation_id)) 203 | 204 | if not r.ok: 205 | print(r.json()) 206 | r.raise_for_status() 207 | return True 208 | 209 | return False 210 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2017 chakki 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /tests/dummy_data.py: -------------------------------------------------------------------------------- 1 | pull_request_created = """ 2 | { 3 | "action": "opened", 4 | "number": 2, 5 | "pull_request": { 6 | "url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2", 7 | "id": 122156051, 8 | "html_url": "https://github.com/chakki-works/typot-demo/pull/2", 9 | "diff_url": "https://github.com/chakki-works/typot-demo/pull/2.diff", 10 | "patch_url": "https://github.com/chakki-works/typot-demo/pull/2.patch", 11 | "issue_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/2", 12 | "number": 2, 13 | "state": "open", 14 | "locked": false, 15 | "title": "Update README.md", 16 | "user": { 17 | "login": "icoxfog417", 18 | "id": 544269, 19 | "avatar_url": "https://avatars3.githubusercontent.com/u/544269?v=3", 20 | "gravatar_id": "", 21 | "url": "https://api.github.com/users/icoxfog417", 22 | "html_url": "https://github.com/icoxfog417", 23 | "followers_url": "https://api.github.com/users/icoxfog417/followers", 24 | "following_url": "https://api.github.com/users/icoxfog417/following{/other_user}", 25 | "gists_url": "https://api.github.com/users/icoxfog417/gists{/gist_id}", 26 | "starred_url": "https://api.github.com/users/icoxfog417/starred{/owner}{/repo}", 27 | "subscriptions_url": "https://api.github.com/users/icoxfog417/subscriptions", 28 | "organizations_url": "https://api.github.com/users/icoxfog417/orgs", 29 | "repos_url": "https://api.github.com/users/icoxfog417/repos", 30 | "events_url": "https://api.github.com/users/icoxfog417/events{/privacy}", 31 | "received_events_url": "https://api.github.com/users/icoxfog417/received_events", 32 | "type": "User", 33 | "site_admin": false 34 | }, 35 | "body": "Pull Request Create Test", 36 | "created_at": "2017-05-24T06:50:51Z", 37 | "updated_at": "2017-05-24T06:50:51Z", 38 | "closed_at": null, 39 | "merged_at": null, 40 | "merge_commit_sha": null, 41 | "assignee": null, 42 | "assignees": [ 43 | 44 | ], 45 | "requested_reviewers": [ 46 | 47 | ], 48 | "milestone": null, 49 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2/commits", 50 | "review_comments_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2/comments", 51 | "review_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}", 52 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/2/comments", 53 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/2511e9cc5b0fa1f44feebc9c29d08304e7744269", 54 | "head": { 55 | "label": "chakki-works:dev", 56 | "ref": "dev", 57 | "sha": "2511e9cc5b0fa1f44feebc9c29d08304e7744269", 58 | "user": { 59 | "login": "chakki-works", 60 | "id": 25578516, 61 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 62 | "gravatar_id": "", 63 | "url": "https://api.github.com/users/chakki-works", 64 | "html_url": "https://github.com/chakki-works", 65 | "followers_url": "https://api.github.com/users/chakki-works/followers", 66 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 67 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 68 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 69 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 70 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 71 | "repos_url": "https://api.github.com/users/chakki-works/repos", 72 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 73 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 74 | "type": "Organization", 75 | "site_admin": false 76 | }, 77 | "repo": { 78 | "id": 92240778, 79 | "name": "typot-demo", 80 | "full_name": "chakki-works/typot-demo", 81 | "owner": { 82 | "login": "chakki-works", 83 | "id": 25578516, 84 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 85 | "gravatar_id": "", 86 | "url": "https://api.github.com/users/chakki-works", 87 | "html_url": "https://github.com/chakki-works", 88 | "followers_url": "https://api.github.com/users/chakki-works/followers", 89 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 90 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 91 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 92 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 93 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 94 | "repos_url": "https://api.github.com/users/chakki-works/repos", 95 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 96 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 97 | "type": "Organization", 98 | "site_admin": false 99 | }, 100 | "private": false, 101 | "html_url": "https://github.com/chakki-works/typot-demo", 102 | "description": "to test typot", 103 | "fork": false, 104 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 105 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 106 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 107 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 108 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 109 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 110 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 111 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 112 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 113 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 114 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 115 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 116 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 117 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 118 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 119 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 120 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 121 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 122 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 123 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 124 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 125 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 126 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 127 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 128 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 129 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 130 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 131 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 132 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 133 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 134 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 135 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 136 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 137 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 138 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 139 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 140 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 141 | "created_at": "2017-05-24T02:24:37Z", 142 | "updated_at": "2017-05-24T02:24:37Z", 143 | "pushed_at": "2017-05-24T02:39:34Z", 144 | "git_url": "git://github.com/chakki-works/typot-demo.git", 145 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 146 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 147 | "svn_url": "https://github.com/chakki-works/typot-demo", 148 | "homepage": null, 149 | "size": 1, 150 | "stargazers_count": 0, 151 | "watchers_count": 0, 152 | "language": null, 153 | "has_issues": true, 154 | "has_projects": true, 155 | "has_downloads": true, 156 | "has_wiki": true, 157 | "has_pages": false, 158 | "forks_count": 0, 159 | "mirror_url": null, 160 | "open_issues_count": 1, 161 | "forks": 0, 162 | "open_issues": 1, 163 | "watchers": 0, 164 | "default_branch": "master" 165 | } 166 | }, 167 | "base": { 168 | "label": "chakki-works:master", 169 | "ref": "master", 170 | "sha": "a2573fb6cc5612219823765d0113938c666c1855", 171 | "user": { 172 | "login": "chakki-works", 173 | "id": 25578516, 174 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 175 | "gravatar_id": "", 176 | "url": "https://api.github.com/users/chakki-works", 177 | "html_url": "https://github.com/chakki-works", 178 | "followers_url": "https://api.github.com/users/chakki-works/followers", 179 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 180 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 181 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 182 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 183 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 184 | "repos_url": "https://api.github.com/users/chakki-works/repos", 185 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 186 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 187 | "type": "Organization", 188 | "site_admin": false 189 | }, 190 | "repo": { 191 | "id": 92240778, 192 | "name": "typot-demo", 193 | "full_name": "chakki-works/typot-demo", 194 | "owner": { 195 | "login": "chakki-works", 196 | "id": 25578516, 197 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 198 | "gravatar_id": "", 199 | "url": "https://api.github.com/users/chakki-works", 200 | "html_url": "https://github.com/chakki-works", 201 | "followers_url": "https://api.github.com/users/chakki-works/followers", 202 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 203 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 204 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 205 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 206 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 207 | "repos_url": "https://api.github.com/users/chakki-works/repos", 208 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 209 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 210 | "type": "Organization", 211 | "site_admin": false 212 | }, 213 | "private": false, 214 | "html_url": "https://github.com/chakki-works/typot-demo", 215 | "description": "to test typot", 216 | "fork": false, 217 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 218 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 219 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 220 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 221 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 222 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 223 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 224 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 225 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 226 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 227 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 228 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 229 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 230 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 231 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 232 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 233 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 234 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 235 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 236 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 237 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 238 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 239 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 240 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 241 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 242 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 243 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 244 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 245 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 246 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 247 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 248 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 249 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 250 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 251 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 252 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 253 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 254 | "created_at": "2017-05-24T02:24:37Z", 255 | "updated_at": "2017-05-24T02:24:37Z", 256 | "pushed_at": "2017-05-24T02:39:34Z", 257 | "git_url": "git://github.com/chakki-works/typot-demo.git", 258 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 259 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 260 | "svn_url": "https://github.com/chakki-works/typot-demo", 261 | "homepage": null, 262 | "size": 1, 263 | "stargazers_count": 0, 264 | "watchers_count": 0, 265 | "language": null, 266 | "has_issues": true, 267 | "has_projects": true, 268 | "has_downloads": true, 269 | "has_wiki": true, 270 | "has_pages": false, 271 | "forks_count": 0, 272 | "mirror_url": null, 273 | "open_issues_count": 1, 274 | "forks": 0, 275 | "open_issues": 1, 276 | "watchers": 0, 277 | "default_branch": "master" 278 | } 279 | }, 280 | "_links": { 281 | "self": { 282 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2" 283 | }, 284 | "html": { 285 | "href": "https://github.com/chakki-works/typot-demo/pull/2" 286 | }, 287 | "issue": { 288 | "href": "https://api.github.com/repos/chakki-works/typot-demo/issues/2" 289 | }, 290 | "comments": { 291 | "href": "https://api.github.com/repos/chakki-works/typot-demo/issues/2/comments" 292 | }, 293 | "review_comments": { 294 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2/comments" 295 | }, 296 | "review_comment": { 297 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}" 298 | }, 299 | "commits": { 300 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2/commits" 301 | }, 302 | "statuses": { 303 | "href": "https://api.github.com/repos/chakki-works/typot-demo/statuses/2511e9cc5b0fa1f44feebc9c29d08304e7744269" 304 | } 305 | }, 306 | "merged": false, 307 | "mergeable": null, 308 | "rebaseable": null, 309 | "mergeable_state": "unknown", 310 | "merged_by": null, 311 | "comments": 0, 312 | "review_comments": 0, 313 | "maintainer_can_modify": false, 314 | "commits": 1, 315 | "additions": 1, 316 | "deletions": 1, 317 | "changed_files": 1 318 | }, 319 | "repository": { 320 | "id": 92240778, 321 | "name": "typot-demo", 322 | "full_name": "chakki-works/typot-demo", 323 | "owner": { 324 | "login": "chakki-works", 325 | "id": 25578516, 326 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 327 | "gravatar_id": "", 328 | "url": "https://api.github.com/users/chakki-works", 329 | "html_url": "https://github.com/chakki-works", 330 | "followers_url": "https://api.github.com/users/chakki-works/followers", 331 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 332 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 333 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 334 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 335 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 336 | "repos_url": "https://api.github.com/users/chakki-works/repos", 337 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 338 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 339 | "type": "Organization", 340 | "site_admin": false 341 | }, 342 | "private": false, 343 | "html_url": "https://github.com/chakki-works/typot-demo", 344 | "description": "to test typot", 345 | "fork": false, 346 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 347 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 348 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 349 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 350 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 351 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 352 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 353 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 354 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 355 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 356 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 357 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 358 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 359 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 360 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 361 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 362 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 363 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 364 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 365 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 366 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 367 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 368 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 369 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 370 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 371 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 372 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 373 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 374 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 375 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 376 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 377 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 378 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 379 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 380 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 381 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 382 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 383 | "created_at": "2017-05-24T02:24:37Z", 384 | "updated_at": "2017-05-24T02:24:37Z", 385 | "pushed_at": "2017-05-24T02:39:34Z", 386 | "git_url": "git://github.com/chakki-works/typot-demo.git", 387 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 388 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 389 | "svn_url": "https://github.com/chakki-works/typot-demo", 390 | "homepage": null, 391 | "size": 1, 392 | "stargazers_count": 0, 393 | "watchers_count": 0, 394 | "language": null, 395 | "has_issues": true, 396 | "has_projects": true, 397 | "has_downloads": true, 398 | "has_wiki": true, 399 | "has_pages": false, 400 | "forks_count": 0, 401 | "mirror_url": null, 402 | "open_issues_count": 1, 403 | "forks": 0, 404 | "open_issues": 1, 405 | "watchers": 0, 406 | "default_branch": "master" 407 | }, 408 | "organization": { 409 | "login": "chakki-works", 410 | "id": 25578516, 411 | "url": "https://api.github.com/orgs/chakki-works", 412 | "repos_url": "https://api.github.com/orgs/chakki-works/repos", 413 | "events_url": "https://api.github.com/orgs/chakki-works/events", 414 | "hooks_url": "https://api.github.com/orgs/chakki-works/hooks", 415 | "issues_url": "https://api.github.com/orgs/chakki-works/issues", 416 | "members_url": "https://api.github.com/orgs/chakki-works/members{/member}", 417 | "public_members_url": "https://api.github.com/orgs/chakki-works/public_members{/member}", 418 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 419 | "description": "Our mission is to enable everyone leave the office by the tea time" 420 | }, 421 | "sender": { 422 | "login": "icoxfog417", 423 | "id": 544269, 424 | "avatar_url": "https://avatars3.githubusercontent.com/u/544269?v=3", 425 | "gravatar_id": "", 426 | "url": "https://api.github.com/users/icoxfog417", 427 | "html_url": "https://github.com/icoxfog417", 428 | "followers_url": "https://api.github.com/users/icoxfog417/followers", 429 | "following_url": "https://api.github.com/users/icoxfog417/following{/other_user}", 430 | "gists_url": "https://api.github.com/users/icoxfog417/gists{/gist_id}", 431 | "starred_url": "https://api.github.com/users/icoxfog417/starred{/owner}{/repo}", 432 | "subscriptions_url": "https://api.github.com/users/icoxfog417/subscriptions", 433 | "organizations_url": "https://api.github.com/users/icoxfog417/orgs", 434 | "repos_url": "https://api.github.com/users/icoxfog417/repos", 435 | "events_url": "https://api.github.com/users/icoxfog417/events{/privacy}", 436 | "received_events_url": "https://api.github.com/users/icoxfog417/received_events", 437 | "type": "User", 438 | "site_admin": false 439 | }, 440 | "installation": { 441 | "id": 1111 442 | } 443 | } 444 | """ 445 | 446 | 447 | pull_request_closed = """ 448 | { 449 | "action": "closed", 450 | "number": 2, 451 | "pull_request": { 452 | "url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2", 453 | "id": 122156051, 454 | "html_url": "https://github.com/chakki-works/typot-demo/pull/2", 455 | "diff_url": "https://github.com/chakki-works/typot-demo/pull/2.diff", 456 | "patch_url": "https://github.com/chakki-works/typot-demo/pull/2.patch", 457 | "issue_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/2", 458 | "number": 2, 459 | "state": "closed", 460 | "locked": false, 461 | "title": "Update README.md", 462 | "user": { 463 | "login": "icoxfog417", 464 | "id": 544269, 465 | "avatar_url": "https://avatars3.githubusercontent.com/u/544269?v=3", 466 | "gravatar_id": "", 467 | "url": "https://api.github.com/users/icoxfog417", 468 | "html_url": "https://github.com/icoxfog417", 469 | "followers_url": "https://api.github.com/users/icoxfog417/followers", 470 | "following_url": "https://api.github.com/users/icoxfog417/following{/other_user}", 471 | "gists_url": "https://api.github.com/users/icoxfog417/gists{/gist_id}", 472 | "starred_url": "https://api.github.com/users/icoxfog417/starred{/owner}{/repo}", 473 | "subscriptions_url": "https://api.github.com/users/icoxfog417/subscriptions", 474 | "organizations_url": "https://api.github.com/users/icoxfog417/orgs", 475 | "repos_url": "https://api.github.com/users/icoxfog417/repos", 476 | "events_url": "https://api.github.com/users/icoxfog417/events{/privacy}", 477 | "received_events_url": "https://api.github.com/users/icoxfog417/received_events", 478 | "type": "User", 479 | "site_admin": false 480 | }, 481 | "body": "Pull Request Create Test", 482 | "created_at": "2017-05-24T06:50:51Z", 483 | "updated_at": "2017-05-24T07:05:40Z", 484 | "closed_at": "2017-05-24T07:05:39Z", 485 | "merged_at": "2017-05-24T07:05:39Z", 486 | "merge_commit_sha": "7d895e85cddbb7b0adf976d14ef717f2617a6876", 487 | "assignee": null, 488 | "assignees": [ 489 | 490 | ], 491 | "requested_reviewers": [ 492 | 493 | ], 494 | "milestone": null, 495 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2/commits", 496 | "review_comments_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2/comments", 497 | "review_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}", 498 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/2/comments", 499 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/2511e9cc5b0fa1f44feebc9c29d08304e7744269", 500 | "head": { 501 | "label": "chakki-works:dev", 502 | "ref": "dev", 503 | "sha": "2511e9cc5b0fa1f44feebc9c29d08304e7744269", 504 | "user": { 505 | "login": "chakki-works", 506 | "id": 25578516, 507 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 508 | "gravatar_id": "", 509 | "url": "https://api.github.com/users/chakki-works", 510 | "html_url": "https://github.com/chakki-works", 511 | "followers_url": "https://api.github.com/users/chakki-works/followers", 512 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 513 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 514 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 515 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 516 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 517 | "repos_url": "https://api.github.com/users/chakki-works/repos", 518 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 519 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 520 | "type": "Organization", 521 | "site_admin": false 522 | }, 523 | "repo": { 524 | "id": 92240778, 525 | "name": "typot-demo", 526 | "full_name": "chakki-works/typot-demo", 527 | "owner": { 528 | "login": "chakki-works", 529 | "id": 25578516, 530 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 531 | "gravatar_id": "", 532 | "url": "https://api.github.com/users/chakki-works", 533 | "html_url": "https://github.com/chakki-works", 534 | "followers_url": "https://api.github.com/users/chakki-works/followers", 535 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 536 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 537 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 538 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 539 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 540 | "repos_url": "https://api.github.com/users/chakki-works/repos", 541 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 542 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 543 | "type": "Organization", 544 | "site_admin": false 545 | }, 546 | "private": false, 547 | "html_url": "https://github.com/chakki-works/typot-demo", 548 | "description": "to test typot", 549 | "fork": false, 550 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 551 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 552 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 553 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 554 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 555 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 556 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 557 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 558 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 559 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 560 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 561 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 562 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 563 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 564 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 565 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 566 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 567 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 568 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 569 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 570 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 571 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 572 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 573 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 574 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 575 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 576 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 577 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 578 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 579 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 580 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 581 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 582 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 583 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 584 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 585 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 586 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 587 | "created_at": "2017-05-24T02:24:37Z", 588 | "updated_at": "2017-05-24T02:24:37Z", 589 | "pushed_at": "2017-05-24T07:05:39Z", 590 | "git_url": "git://github.com/chakki-works/typot-demo.git", 591 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 592 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 593 | "svn_url": "https://github.com/chakki-works/typot-demo", 594 | "homepage": null, 595 | "size": 1, 596 | "stargazers_count": 0, 597 | "watchers_count": 0, 598 | "language": null, 599 | "has_issues": true, 600 | "has_projects": true, 601 | "has_downloads": true, 602 | "has_wiki": true, 603 | "has_pages": false, 604 | "forks_count": 0, 605 | "mirror_url": null, 606 | "open_issues_count": 0, 607 | "forks": 0, 608 | "open_issues": 0, 609 | "watchers": 0, 610 | "default_branch": "master" 611 | } 612 | }, 613 | "base": { 614 | "label": "chakki-works:master", 615 | "ref": "master", 616 | "sha": "a2573fb6cc5612219823765d0113938c666c1855", 617 | "user": { 618 | "login": "chakki-works", 619 | "id": 25578516, 620 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 621 | "gravatar_id": "", 622 | "url": "https://api.github.com/users/chakki-works", 623 | "html_url": "https://github.com/chakki-works", 624 | "followers_url": "https://api.github.com/users/chakki-works/followers", 625 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 626 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 627 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 628 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 629 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 630 | "repos_url": "https://api.github.com/users/chakki-works/repos", 631 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 632 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 633 | "type": "Organization", 634 | "site_admin": false 635 | }, 636 | "repo": { 637 | "id": 92240778, 638 | "name": "typot-demo", 639 | "full_name": "chakki-works/typot-demo", 640 | "owner": { 641 | "login": "chakki-works", 642 | "id": 25578516, 643 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 644 | "gravatar_id": "", 645 | "url": "https://api.github.com/users/chakki-works", 646 | "html_url": "https://github.com/chakki-works", 647 | "followers_url": "https://api.github.com/users/chakki-works/followers", 648 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 649 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 650 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 651 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 652 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 653 | "repos_url": "https://api.github.com/users/chakki-works/repos", 654 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 655 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 656 | "type": "Organization", 657 | "site_admin": false 658 | }, 659 | "private": false, 660 | "html_url": "https://github.com/chakki-works/typot-demo", 661 | "description": "to test typot", 662 | "fork": false, 663 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 664 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 665 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 666 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 667 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 668 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 669 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 670 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 671 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 672 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 673 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 674 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 675 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 676 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 677 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 678 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 679 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 680 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 681 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 682 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 683 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 684 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 685 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 686 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 687 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 688 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 689 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 690 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 691 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 692 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 693 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 694 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 695 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 696 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 697 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 698 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 699 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 700 | "created_at": "2017-05-24T02:24:37Z", 701 | "updated_at": "2017-05-24T02:24:37Z", 702 | "pushed_at": "2017-05-24T07:05:39Z", 703 | "git_url": "git://github.com/chakki-works/typot-demo.git", 704 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 705 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 706 | "svn_url": "https://github.com/chakki-works/typot-demo", 707 | "homepage": null, 708 | "size": 1, 709 | "stargazers_count": 0, 710 | "watchers_count": 0, 711 | "language": null, 712 | "has_issues": true, 713 | "has_projects": true, 714 | "has_downloads": true, 715 | "has_wiki": true, 716 | "has_pages": false, 717 | "forks_count": 0, 718 | "mirror_url": null, 719 | "open_issues_count": 0, 720 | "forks": 0, 721 | "open_issues": 0, 722 | "watchers": 0, 723 | "default_branch": "master" 724 | } 725 | }, 726 | "_links": { 727 | "self": { 728 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2" 729 | }, 730 | "html": { 731 | "href": "https://github.com/chakki-works/typot-demo/pull/2" 732 | }, 733 | "issue": { 734 | "href": "https://api.github.com/repos/chakki-works/typot-demo/issues/2" 735 | }, 736 | "comments": { 737 | "href": "https://api.github.com/repos/chakki-works/typot-demo/issues/2/comments" 738 | }, 739 | "review_comments": { 740 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2/comments" 741 | }, 742 | "review_comment": { 743 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}" 744 | }, 745 | "commits": { 746 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/2/commits" 747 | }, 748 | "statuses": { 749 | "href": "https://api.github.com/repos/chakki-works/typot-demo/statuses/2511e9cc5b0fa1f44feebc9c29d08304e7744269" 750 | } 751 | }, 752 | "merged": true, 753 | "mergeable": null, 754 | "rebaseable": null, 755 | "mergeable_state": "unknown", 756 | "merged_by": { 757 | "login": "icoxfog417", 758 | "id": 544269, 759 | "avatar_url": "https://avatars3.githubusercontent.com/u/544269?v=3", 760 | "gravatar_id": "", 761 | "url": "https://api.github.com/users/icoxfog417", 762 | "html_url": "https://github.com/icoxfog417", 763 | "followers_url": "https://api.github.com/users/icoxfog417/followers", 764 | "following_url": "https://api.github.com/users/icoxfog417/following{/other_user}", 765 | "gists_url": "https://api.github.com/users/icoxfog417/gists{/gist_id}", 766 | "starred_url": "https://api.github.com/users/icoxfog417/starred{/owner}{/repo}", 767 | "subscriptions_url": "https://api.github.com/users/icoxfog417/subscriptions", 768 | "organizations_url": "https://api.github.com/users/icoxfog417/orgs", 769 | "repos_url": "https://api.github.com/users/icoxfog417/repos", 770 | "events_url": "https://api.github.com/users/icoxfog417/events{/privacy}", 771 | "received_events_url": "https://api.github.com/users/icoxfog417/received_events", 772 | "type": "User", 773 | "site_admin": false 774 | }, 775 | "comments": 1, 776 | "review_comments": 0, 777 | "maintainer_can_modify": false, 778 | "commits": 1, 779 | "additions": 1, 780 | "deletions": 1, 781 | "changed_files": 1 782 | }, 783 | "repository": { 784 | "id": 92240778, 785 | "name": "typot-demo", 786 | "full_name": "chakki-works/typot-demo", 787 | "owner": { 788 | "login": "chakki-works", 789 | "id": 25578516, 790 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 791 | "gravatar_id": "", 792 | "url": "https://api.github.com/users/chakki-works", 793 | "html_url": "https://github.com/chakki-works", 794 | "followers_url": "https://api.github.com/users/chakki-works/followers", 795 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 796 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 797 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 798 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 799 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 800 | "repos_url": "https://api.github.com/users/chakki-works/repos", 801 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 802 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 803 | "type": "Organization", 804 | "site_admin": false 805 | }, 806 | "private": false, 807 | "html_url": "https://github.com/chakki-works/typot-demo", 808 | "description": "to test typot", 809 | "fork": false, 810 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 811 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 812 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 813 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 814 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 815 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 816 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 817 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 818 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 819 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 820 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 821 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 822 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 823 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 824 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 825 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 826 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 827 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 828 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 829 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 830 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 831 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 832 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 833 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 834 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 835 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 836 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 837 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 838 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 839 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 840 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 841 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 842 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 843 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 844 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 845 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 846 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 847 | "created_at": "2017-05-24T02:24:37Z", 848 | "updated_at": "2017-05-24T02:24:37Z", 849 | "pushed_at": "2017-05-24T07:05:39Z", 850 | "git_url": "git://github.com/chakki-works/typot-demo.git", 851 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 852 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 853 | "svn_url": "https://github.com/chakki-works/typot-demo", 854 | "homepage": null, 855 | "size": 1, 856 | "stargazers_count": 0, 857 | "watchers_count": 0, 858 | "language": null, 859 | "has_issues": true, 860 | "has_projects": true, 861 | "has_downloads": true, 862 | "has_wiki": true, 863 | "has_pages": false, 864 | "forks_count": 0, 865 | "mirror_url": null, 866 | "open_issues_count": 0, 867 | "forks": 0, 868 | "open_issues": 0, 869 | "watchers": 0, 870 | "default_branch": "master" 871 | }, 872 | "organization": { 873 | "login": "chakki-works", 874 | "id": 25578516, 875 | "url": "https://api.github.com/orgs/chakki-works", 876 | "repos_url": "https://api.github.com/orgs/chakki-works/repos", 877 | "events_url": "https://api.github.com/orgs/chakki-works/events", 878 | "hooks_url": "https://api.github.com/orgs/chakki-works/hooks", 879 | "issues_url": "https://api.github.com/orgs/chakki-works/issues", 880 | "members_url": "https://api.github.com/orgs/chakki-works/members{/member}", 881 | "public_members_url": "https://api.github.com/orgs/chakki-works/public_members{/member}", 882 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 883 | "description": "Our mission is to enable everyone leave the office by the tea time" 884 | }, 885 | "sender": { 886 | "login": "icoxfog417", 887 | "id": 544269, 888 | "avatar_url": "https://avatars3.githubusercontent.com/u/544269?v=3", 889 | "gravatar_id": "", 890 | "url": "https://api.github.com/users/icoxfog417", 891 | "html_url": "https://github.com/icoxfog417", 892 | "followers_url": "https://api.github.com/users/icoxfog417/followers", 893 | "following_url": "https://api.github.com/users/icoxfog417/following{/other_user}", 894 | "gists_url": "https://api.github.com/users/icoxfog417/gists{/gist_id}", 895 | "starred_url": "https://api.github.com/users/icoxfog417/starred{/owner}{/repo}", 896 | "subscriptions_url": "https://api.github.com/users/icoxfog417/subscriptions", 897 | "organizations_url": "https://api.github.com/users/icoxfog417/orgs", 898 | "repos_url": "https://api.github.com/users/icoxfog417/repos", 899 | "events_url": "https://api.github.com/users/icoxfog417/events{/privacy}", 900 | "received_events_url": "https://api.github.com/users/icoxfog417/received_events", 901 | "type": "User", 902 | "site_admin": false 903 | }, 904 | "installation": { 905 | "id": 11111 906 | } 907 | } 908 | """ 909 | 910 | review_changed = r""" 911 | { 912 | "action": "edited", 913 | "changes": { 914 | "body": { 915 | "from": "\"hoge\" is typo? \n- [ ] hoge-1\n- [ ] hoge-2\n- [ ] hoge-3" 916 | } 917 | }, 918 | "comment": { 919 | "url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/comments/118856819", 920 | "pull_request_review_id": 40687574, 921 | "id": 118856819, 922 | "diff_hunk": "@@ -1,2 +1,7 @@\n # typot-demo", 923 | "path": "README.md", 924 | "position": 1, 925 | "original_position": 1, 926 | "commit_id": "adbdfa392e0cab7766dbcae6cee82bf5fd11a471", 927 | "original_commit_id": "adbdfa392e0cab7766dbcae6cee82bf5fd11a471", 928 | "user": { 929 | "login": "typot[bot]", 930 | "id": 28912751, 931 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 932 | "gravatar_id": "", 933 | "url": "https://api.github.com/users/typot%5Bbot%5D", 934 | "html_url": "https://github.com/apps/typot", 935 | "followers_url": "https://api.github.com/users/typot%5Bbot%5D/followers", 936 | "following_url": "https://api.github.com/users/typot%5Bbot%5D/following{/other_user}", 937 | "gists_url": "https://api.github.com/users/typot%5Bbot%5D/gists{/gist_id}", 938 | "starred_url": "https://api.github.com/users/typot%5Bbot%5D/starred{/owner}{/repo}", 939 | "subscriptions_url": "https://api.github.com/users/typot%5Bbot%5D/subscriptions", 940 | "organizations_url": "https://api.github.com/users/typot%5Bbot%5D/orgs", 941 | "repos_url": "https://api.github.com/users/typot%5Bbot%5D/repos", 942 | "events_url": "https://api.github.com/users/typot%5Bbot%5D/events{/privacy}", 943 | "received_events_url": "https://api.github.com/users/typot%5Bbot%5D/received_events", 944 | "type": "Bot", 945 | "site_admin": false 946 | }, 947 | "body": "\"hoge\" is typo? \n- [ ] hoge-1\n- [x] hoge-2\n- [ ] hoge-3", 948 | "created_at": "2017-05-29T01:59:50Z", 949 | "updated_at": "2017-05-29T01:59:50Z", 950 | "html_url": "https://github.com/chakki-works/typot-demo/pull/3#discussion_r118856819", 951 | "pull_request_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/3", 952 | "_links": { 953 | "self": { 954 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/comments/118856819" 955 | }, 956 | "html": { 957 | "href": "https://github.com/chakki-works/typot-demo/pull/3#discussion_r118856819" 958 | }, 959 | "pull_request": { 960 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/3" 961 | } 962 | } 963 | }, 964 | "pull_request": { 965 | "url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/3", 966 | "id": 122168599, 967 | "html_url": "https://github.com/chakki-works/typot-demo/pull/3", 968 | "diff_url": "https://github.com/chakki-works/typot-demo/pull/3.diff", 969 | "patch_url": "https://github.com/chakki-works/typot-demo/pull/3.patch", 970 | "issue_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/3", 971 | "number": 3, 972 | "state": "open", 973 | "locked": false, 974 | "title": "Update README.md", 975 | "user": { 976 | "login": "icoxfog417", 977 | "id": 544269, 978 | "avatar_url": "https://avatars3.githubusercontent.com/u/544269?v=3", 979 | "gravatar_id": "", 980 | "url": "https://api.github.com/users/icoxfog417", 981 | "html_url": "https://github.com/icoxfog417", 982 | "followers_url": "https://api.github.com/users/icoxfog417/followers", 983 | "following_url": "https://api.github.com/users/icoxfog417/following{/other_user}", 984 | "gists_url": "https://api.github.com/users/icoxfog417/gists{/gist_id}", 985 | "starred_url": "https://api.github.com/users/icoxfog417/starred{/owner}{/repo}", 986 | "subscriptions_url": "https://api.github.com/users/icoxfog417/subscriptions", 987 | "organizations_url": "https://api.github.com/users/icoxfog417/orgs", 988 | "repos_url": "https://api.github.com/users/icoxfog417/repos", 989 | "events_url": "https://api.github.com/users/icoxfog417/events{/privacy}", 990 | "received_events_url": "https://api.github.com/users/icoxfog417/received_events", 991 | "type": "User", 992 | "site_admin": false 993 | }, 994 | "body": "Update README.md description", 995 | "created_at": "2017-05-24T08:12:08Z", 996 | "updated_at": "2017-05-29T02:00:04Z", 997 | "closed_at": null, 998 | "merged_at": null, 999 | "merge_commit_sha": "1ccc304340b7d8d062b256dc48294acbb7991bdd", 1000 | "assignee": { 1001 | "login": "icoxfog417", 1002 | "id": 544269, 1003 | "avatar_url": "https://avatars3.githubusercontent.com/u/544269?v=3", 1004 | "gravatar_id": "", 1005 | "url": "https://api.github.com/users/icoxfog417", 1006 | "html_url": "https://github.com/icoxfog417", 1007 | "followers_url": "https://api.github.com/users/icoxfog417/followers", 1008 | "following_url": "https://api.github.com/users/icoxfog417/following{/other_user}", 1009 | "gists_url": "https://api.github.com/users/icoxfog417/gists{/gist_id}", 1010 | "starred_url": "https://api.github.com/users/icoxfog417/starred{/owner}{/repo}", 1011 | "subscriptions_url": "https://api.github.com/users/icoxfog417/subscriptions", 1012 | "organizations_url": "https://api.github.com/users/icoxfog417/orgs", 1013 | "repos_url": "https://api.github.com/users/icoxfog417/repos", 1014 | "events_url": "https://api.github.com/users/icoxfog417/events{/privacy}", 1015 | "received_events_url": "https://api.github.com/users/icoxfog417/received_events", 1016 | "type": "User", 1017 | "site_admin": false 1018 | }, 1019 | "assignees": [ 1020 | { 1021 | "login": "icoxfog417", 1022 | "id": 544269, 1023 | "avatar_url": "https://avatars3.githubusercontent.com/u/544269?v=3", 1024 | "gravatar_id": "", 1025 | "url": "https://api.github.com/users/icoxfog417", 1026 | "html_url": "https://github.com/icoxfog417", 1027 | "followers_url": "https://api.github.com/users/icoxfog417/followers", 1028 | "following_url": "https://api.github.com/users/icoxfog417/following{/other_user}", 1029 | "gists_url": "https://api.github.com/users/icoxfog417/gists{/gist_id}", 1030 | "starred_url": "https://api.github.com/users/icoxfog417/starred{/owner}{/repo}", 1031 | "subscriptions_url": "https://api.github.com/users/icoxfog417/subscriptions", 1032 | "organizations_url": "https://api.github.com/users/icoxfog417/orgs", 1033 | "repos_url": "https://api.github.com/users/icoxfog417/repos", 1034 | "events_url": "https://api.github.com/users/icoxfog417/events{/privacy}", 1035 | "received_events_url": "https://api.github.com/users/icoxfog417/received_events", 1036 | "type": "User", 1037 | "site_admin": false 1038 | } 1039 | ], 1040 | "requested_reviewers": [ 1041 | 1042 | ], 1043 | "milestone": null, 1044 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/3/commits", 1045 | "review_comments_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/3/comments", 1046 | "review_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}", 1047 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/3/comments", 1048 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/adbdfa392e0cab7766dbcae6cee82bf5fd11a471", 1049 | "head": { 1050 | "label": "chakki-works:dev", 1051 | "ref": "dev", 1052 | "sha": "adbdfa392e0cab7766dbcae6cee82bf5fd11a471", 1053 | "user": { 1054 | "login": "chakki-works", 1055 | "id": 25578516, 1056 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1057 | "gravatar_id": "", 1058 | "url": "https://api.github.com/users/chakki-works", 1059 | "html_url": "https://github.com/chakki-works", 1060 | "followers_url": "https://api.github.com/users/chakki-works/followers", 1061 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 1062 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 1063 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 1064 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 1065 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 1066 | "repos_url": "https://api.github.com/users/chakki-works/repos", 1067 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 1068 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 1069 | "type": "Organization", 1070 | "site_admin": false 1071 | }, 1072 | "repo": { 1073 | "id": 92240778, 1074 | "name": "typot-demo", 1075 | "full_name": "chakki-works/typot-demo", 1076 | "owner": { 1077 | "login": "chakki-works", 1078 | "id": 25578516, 1079 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1080 | "gravatar_id": "", 1081 | "url": "https://api.github.com/users/chakki-works", 1082 | "html_url": "https://github.com/chakki-works", 1083 | "followers_url": "https://api.github.com/users/chakki-works/followers", 1084 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 1085 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 1086 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 1087 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 1088 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 1089 | "repos_url": "https://api.github.com/users/chakki-works/repos", 1090 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 1091 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 1092 | "type": "Organization", 1093 | "site_admin": false 1094 | }, 1095 | "private": false, 1096 | "html_url": "https://github.com/chakki-works/typot-demo", 1097 | "description": "to test typot", 1098 | "fork": false, 1099 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 1100 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 1101 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 1102 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 1103 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 1104 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 1105 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 1106 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 1107 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 1108 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 1109 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 1110 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 1111 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 1112 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 1113 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 1114 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 1115 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 1116 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 1117 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 1118 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 1119 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 1120 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 1121 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 1122 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 1123 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 1124 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 1125 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 1126 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 1127 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 1128 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 1129 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 1130 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 1131 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 1132 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 1133 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 1134 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 1135 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 1136 | "created_at": "2017-05-24T02:24:37Z", 1137 | "updated_at": "2017-05-24T02:24:37Z", 1138 | "pushed_at": "2017-05-24T08:12:08Z", 1139 | "git_url": "git://github.com/chakki-works/typot-demo.git", 1140 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 1141 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 1142 | "svn_url": "https://github.com/chakki-works/typot-demo", 1143 | "homepage": null, 1144 | "size": 2, 1145 | "stargazers_count": 0, 1146 | "watchers_count": 0, 1147 | "language": null, 1148 | "has_issues": true, 1149 | "has_projects": true, 1150 | "has_downloads": true, 1151 | "has_wiki": true, 1152 | "has_pages": false, 1153 | "forks_count": 0, 1154 | "mirror_url": null, 1155 | "open_issues_count": 1, 1156 | "forks": 0, 1157 | "open_issues": 1, 1158 | "watchers": 0, 1159 | "default_branch": "master" 1160 | } 1161 | }, 1162 | "base": { 1163 | "label": "chakki-works:master", 1164 | "ref": "master", 1165 | "sha": "7d895e85cddbb7b0adf976d14ef717f2617a6876", 1166 | "user": { 1167 | "login": "chakki-works", 1168 | "id": 25578516, 1169 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1170 | "gravatar_id": "", 1171 | "url": "https://api.github.com/users/chakki-works", 1172 | "html_url": "https://github.com/chakki-works", 1173 | "followers_url": "https://api.github.com/users/chakki-works/followers", 1174 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 1175 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 1176 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 1177 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 1178 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 1179 | "repos_url": "https://api.github.com/users/chakki-works/repos", 1180 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 1181 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 1182 | "type": "Organization", 1183 | "site_admin": false 1184 | }, 1185 | "repo": { 1186 | "id": 92240778, 1187 | "name": "typot-demo", 1188 | "full_name": "chakki-works/typot-demo", 1189 | "owner": { 1190 | "login": "chakki-works", 1191 | "id": 25578516, 1192 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1193 | "gravatar_id": "", 1194 | "url": "https://api.github.com/users/chakki-works", 1195 | "html_url": "https://github.com/chakki-works", 1196 | "followers_url": "https://api.github.com/users/chakki-works/followers", 1197 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 1198 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 1199 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 1200 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 1201 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 1202 | "repos_url": "https://api.github.com/users/chakki-works/repos", 1203 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 1204 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 1205 | "type": "Organization", 1206 | "site_admin": false 1207 | }, 1208 | "private": false, 1209 | "html_url": "https://github.com/chakki-works/typot-demo", 1210 | "description": "to test typot", 1211 | "fork": false, 1212 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 1213 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 1214 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 1215 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 1216 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 1217 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 1218 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 1219 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 1220 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 1221 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 1222 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 1223 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 1224 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 1225 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 1226 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 1227 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 1228 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 1229 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 1230 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 1231 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 1232 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 1233 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 1234 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 1235 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 1236 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 1237 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 1238 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 1239 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 1240 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 1241 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 1242 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 1243 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 1244 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 1245 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 1246 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 1247 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 1248 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 1249 | "created_at": "2017-05-24T02:24:37Z", 1250 | "updated_at": "2017-05-24T02:24:37Z", 1251 | "pushed_at": "2017-05-24T08:12:08Z", 1252 | "git_url": "git://github.com/chakki-works/typot-demo.git", 1253 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 1254 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 1255 | "svn_url": "https://github.com/chakki-works/typot-demo", 1256 | "homepage": null, 1257 | "size": 2, 1258 | "stargazers_count": 0, 1259 | "watchers_count": 0, 1260 | "language": null, 1261 | "has_issues": true, 1262 | "has_projects": true, 1263 | "has_downloads": true, 1264 | "has_wiki": true, 1265 | "has_pages": false, 1266 | "forks_count": 0, 1267 | "mirror_url": null, 1268 | "open_issues_count": 1, 1269 | "forks": 0, 1270 | "open_issues": 1, 1271 | "watchers": 0, 1272 | "default_branch": "master" 1273 | } 1274 | }, 1275 | "_links": { 1276 | "self": { 1277 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/3" 1278 | }, 1279 | "html": { 1280 | "href": "https://github.com/chakki-works/typot-demo/pull/3" 1281 | }, 1282 | "issue": { 1283 | "href": "https://api.github.com/repos/chakki-works/typot-demo/issues/3" 1284 | }, 1285 | "comments": { 1286 | "href": "https://api.github.com/repos/chakki-works/typot-demo/issues/3/comments" 1287 | }, 1288 | "review_comments": { 1289 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/3/comments" 1290 | }, 1291 | "review_comment": { 1292 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}" 1293 | }, 1294 | "commits": { 1295 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/3/commits" 1296 | }, 1297 | "statuses": { 1298 | "href": "https://api.github.com/repos/chakki-works/typot-demo/statuses/adbdfa392e0cab7766dbcae6cee82bf5fd11a471" 1299 | } 1300 | } 1301 | }, 1302 | "repository": { 1303 | "id": 92240778, 1304 | "name": "typot-demo", 1305 | "full_name": "chakki-works/typot-demo", 1306 | "owner": { 1307 | "login": "chakki-works", 1308 | "id": 25578516, 1309 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1310 | "gravatar_id": "", 1311 | "url": "https://api.github.com/users/chakki-works", 1312 | "html_url": "https://github.com/chakki-works", 1313 | "followers_url": "https://api.github.com/users/chakki-works/followers", 1314 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 1315 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 1316 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 1317 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 1318 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 1319 | "repos_url": "https://api.github.com/users/chakki-works/repos", 1320 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 1321 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 1322 | "type": "Organization", 1323 | "site_admin": false 1324 | }, 1325 | "private": false, 1326 | "html_url": "https://github.com/chakki-works/typot-demo", 1327 | "description": "to test typot", 1328 | "fork": false, 1329 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 1330 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 1331 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 1332 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 1333 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 1334 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 1335 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 1336 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 1337 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 1338 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 1339 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 1340 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 1341 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 1342 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 1343 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 1344 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 1345 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 1346 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 1347 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 1348 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 1349 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 1350 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 1351 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 1352 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 1353 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 1354 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 1355 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 1356 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 1357 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 1358 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 1359 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 1360 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 1361 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 1362 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 1363 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 1364 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 1365 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 1366 | "created_at": "2017-05-24T02:24:37Z", 1367 | "updated_at": "2017-05-24T02:24:37Z", 1368 | "pushed_at": "2017-05-24T08:12:08Z", 1369 | "git_url": "git://github.com/chakki-works/typot-demo.git", 1370 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 1371 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 1372 | "svn_url": "https://github.com/chakki-works/typot-demo", 1373 | "homepage": null, 1374 | "size": 2, 1375 | "stargazers_count": 0, 1376 | "watchers_count": 0, 1377 | "language": null, 1378 | "has_issues": true, 1379 | "has_projects": true, 1380 | "has_downloads": true, 1381 | "has_wiki": true, 1382 | "has_pages": false, 1383 | "forks_count": 0, 1384 | "mirror_url": null, 1385 | "open_issues_count": 1, 1386 | "forks": 0, 1387 | "open_issues": 1, 1388 | "watchers": 0, 1389 | "default_branch": "master" 1390 | }, 1391 | "organization": { 1392 | "login": "chakki-works", 1393 | "id": 25578516, 1394 | "url": "https://api.github.com/orgs/chakki-works", 1395 | "repos_url": "https://api.github.com/orgs/chakki-works/repos", 1396 | "events_url": "https://api.github.com/orgs/chakki-works/events", 1397 | "hooks_url": "https://api.github.com/orgs/chakki-works/hooks", 1398 | "issues_url": "https://api.github.com/orgs/chakki-works/issues", 1399 | "members_url": "https://api.github.com/orgs/chakki-works/members{/member}", 1400 | "public_members_url": "https://api.github.com/orgs/chakki-works/public_members{/member}", 1401 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1402 | "description": "Our mission is to enable everyone leave the office by the tea time" 1403 | }, 1404 | "sender": { 1405 | "login": "icoxfog417", 1406 | "id": 544269, 1407 | "avatar_url": "https://avatars3.githubusercontent.com/u/544269?v=3", 1408 | "gravatar_id": "", 1409 | "url": "https://api.github.com/users/icoxfog417", 1410 | "html_url": "https://github.com/icoxfog417", 1411 | "followers_url": "https://api.github.com/users/icoxfog417/followers", 1412 | "following_url": "https://api.github.com/users/icoxfog417/following{/other_user}", 1413 | "gists_url": "https://api.github.com/users/icoxfog417/gists{/gist_id}", 1414 | "starred_url": "https://api.github.com/users/icoxfog417/starred{/owner}{/repo}", 1415 | "subscriptions_url": "https://api.github.com/users/icoxfog417/subscriptions", 1416 | "organizations_url": "https://api.github.com/users/icoxfog417/orgs", 1417 | "repos_url": "https://api.github.com/users/icoxfog417/repos", 1418 | "events_url": "https://api.github.com/users/icoxfog417/events{/privacy}", 1419 | "received_events_url": "https://api.github.com/users/icoxfog417/received_events", 1420 | "type": "User", 1421 | "site_admin": false 1422 | }, 1423 | "installation": { 1424 | "id": 11111 1425 | } 1426 | } 1427 | """ 1428 | 1429 | fix_target_pr = r""" 1430 | { 1431 | "action": "opened", 1432 | "number": 4, 1433 | "pull_request": { 1434 | "url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/4", 1435 | "id": 122827018, 1436 | "html_url": "https://github.com/chakki-works/typot-demo/pull/4", 1437 | "diff_url": "https://github.com/chakki-works/typot-demo/pull/4.diff", 1438 | "patch_url": "https://github.com/chakki-works/typot-demo/pull/4.patch", 1439 | "issue_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/4", 1440 | "number": 4, 1441 | "state": "open", 1442 | "locked": false, 1443 | "title": "Typo exists in content.md", 1444 | "user": { 1445 | "login": "icoxfog417", 1446 | "id": 544269, 1447 | "avatar_url": "https://avatars3.githubusercontent.com/u/544269?v=3", 1448 | "gravatar_id": "", 1449 | "url": "https://api.github.com/users/icoxfog417", 1450 | "html_url": "https://github.com/icoxfog417", 1451 | "followers_url": "https://api.github.com/users/icoxfog417/followers", 1452 | "following_url": "https://api.github.com/users/icoxfog417/following{/other_user}", 1453 | "gists_url": "https://api.github.com/users/icoxfog417/gists{/gist_id}", 1454 | "starred_url": "https://api.github.com/users/icoxfog417/starred{/owner}{/repo}", 1455 | "subscriptions_url": "https://api.github.com/users/icoxfog417/subscriptions", 1456 | "organizations_url": "https://api.github.com/users/icoxfog417/orgs", 1457 | "repos_url": "https://api.github.com/users/icoxfog417/repos", 1458 | "events_url": "https://api.github.com/users/icoxfog417/events{/privacy}", 1459 | "received_events_url": "https://api.github.com/users/icoxfog417/received_events", 1460 | "type": "User", 1461 | "site_admin": false 1462 | }, 1463 | "body": "", 1464 | "created_at": "2017-05-29T04:37:11Z", 1465 | "updated_at": "2017-05-29T04:37:11Z", 1466 | "closed_at": null, 1467 | "merged_at": null, 1468 | "merge_commit_sha": null, 1469 | "assignee": null, 1470 | "assignees": [ 1471 | 1472 | ], 1473 | "requested_reviewers": [ 1474 | 1475 | ], 1476 | "milestone": null, 1477 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/4/commits", 1478 | "review_comments_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/4/comments", 1479 | "review_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}", 1480 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/4/comments", 1481 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/f0d3ab26d259ef474996d22dcff21dfce6ca4492", 1482 | "head": { 1483 | "label": "chakki-works:content", 1484 | "ref": "content", 1485 | "sha": "f0d3ab26d259ef474996d22dcff21dfce6ca4492", 1486 | "user": { 1487 | "login": "chakki-works", 1488 | "id": 25578516, 1489 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1490 | "gravatar_id": "", 1491 | "url": "https://api.github.com/users/chakki-works", 1492 | "html_url": "https://github.com/chakki-works", 1493 | "followers_url": "https://api.github.com/users/chakki-works/followers", 1494 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 1495 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 1496 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 1497 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 1498 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 1499 | "repos_url": "https://api.github.com/users/chakki-works/repos", 1500 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 1501 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 1502 | "type": "Organization", 1503 | "site_admin": false 1504 | }, 1505 | "repo": { 1506 | "id": 92240778, 1507 | "name": "typot-demo", 1508 | "full_name": "chakki-works/typot-demo", 1509 | "owner": { 1510 | "login": "chakki-works", 1511 | "id": 25578516, 1512 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1513 | "gravatar_id": "", 1514 | "url": "https://api.github.com/users/chakki-works", 1515 | "html_url": "https://github.com/chakki-works", 1516 | "followers_url": "https://api.github.com/users/chakki-works/followers", 1517 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 1518 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 1519 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 1520 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 1521 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 1522 | "repos_url": "https://api.github.com/users/chakki-works/repos", 1523 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 1524 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 1525 | "type": "Organization", 1526 | "site_admin": false 1527 | }, 1528 | "private": false, 1529 | "html_url": "https://github.com/chakki-works/typot-demo", 1530 | "description": "to test typot", 1531 | "fork": false, 1532 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 1533 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 1534 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 1535 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 1536 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 1537 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 1538 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 1539 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 1540 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 1541 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 1542 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 1543 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 1544 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 1545 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 1546 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 1547 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 1548 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 1549 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 1550 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 1551 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 1552 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 1553 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 1554 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 1555 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 1556 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 1557 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 1558 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 1559 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 1560 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 1561 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 1562 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 1563 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 1564 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 1565 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 1566 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 1567 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 1568 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 1569 | "created_at": "2017-05-24T02:24:37Z", 1570 | "updated_at": "2017-05-24T02:24:37Z", 1571 | "pushed_at": "2017-05-29T04:36:46Z", 1572 | "git_url": "git://github.com/chakki-works/typot-demo.git", 1573 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 1574 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 1575 | "svn_url": "https://github.com/chakki-works/typot-demo", 1576 | "homepage": null, 1577 | "size": 2, 1578 | "stargazers_count": 0, 1579 | "watchers_count": 0, 1580 | "language": null, 1581 | "has_issues": true, 1582 | "has_projects": true, 1583 | "has_downloads": true, 1584 | "has_wiki": true, 1585 | "has_pages": false, 1586 | "forks_count": 0, 1587 | "mirror_url": null, 1588 | "open_issues_count": 2, 1589 | "forks": 0, 1590 | "open_issues": 2, 1591 | "watchers": 0, 1592 | "default_branch": "master" 1593 | } 1594 | }, 1595 | "base": { 1596 | "label": "chakki-works:master", 1597 | "ref": "master", 1598 | "sha": "5d85936b799357162921c646d596b32ba29e2717", 1599 | "user": { 1600 | "login": "chakki-works", 1601 | "id": 25578516, 1602 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1603 | "gravatar_id": "", 1604 | "url": "https://api.github.com/users/chakki-works", 1605 | "html_url": "https://github.com/chakki-works", 1606 | "followers_url": "https://api.github.com/users/chakki-works/followers", 1607 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 1608 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 1609 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 1610 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 1611 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 1612 | "repos_url": "https://api.github.com/users/chakki-works/repos", 1613 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 1614 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 1615 | "type": "Organization", 1616 | "site_admin": false 1617 | }, 1618 | "repo": { 1619 | "id": 92240778, 1620 | "name": "typot-demo", 1621 | "full_name": "chakki-works/typot-demo", 1622 | "owner": { 1623 | "login": "chakki-works", 1624 | "id": 25578516, 1625 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1626 | "gravatar_id": "", 1627 | "url": "https://api.github.com/users/chakki-works", 1628 | "html_url": "https://github.com/chakki-works", 1629 | "followers_url": "https://api.github.com/users/chakki-works/followers", 1630 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 1631 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 1632 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 1633 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 1634 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 1635 | "repos_url": "https://api.github.com/users/chakki-works/repos", 1636 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 1637 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 1638 | "type": "Organization", 1639 | "site_admin": false 1640 | }, 1641 | "private": false, 1642 | "html_url": "https://github.com/chakki-works/typot-demo", 1643 | "description": "to test typot", 1644 | "fork": false, 1645 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 1646 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 1647 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 1648 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 1649 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 1650 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 1651 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 1652 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 1653 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 1654 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 1655 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 1656 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 1657 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 1658 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 1659 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 1660 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 1661 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 1662 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 1663 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 1664 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 1665 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 1666 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 1667 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 1668 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 1669 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 1670 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 1671 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 1672 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 1673 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 1674 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 1675 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 1676 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 1677 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 1678 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 1679 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 1680 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 1681 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 1682 | "created_at": "2017-05-24T02:24:37Z", 1683 | "updated_at": "2017-05-24T02:24:37Z", 1684 | "pushed_at": "2017-05-29T04:36:46Z", 1685 | "git_url": "git://github.com/chakki-works/typot-demo.git", 1686 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 1687 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 1688 | "svn_url": "https://github.com/chakki-works/typot-demo", 1689 | "homepage": null, 1690 | "size": 2, 1691 | "stargazers_count": 0, 1692 | "watchers_count": 0, 1693 | "language": null, 1694 | "has_issues": true, 1695 | "has_projects": true, 1696 | "has_downloads": true, 1697 | "has_wiki": true, 1698 | "has_pages": false, 1699 | "forks_count": 0, 1700 | "mirror_url": null, 1701 | "open_issues_count": 2, 1702 | "forks": 0, 1703 | "open_issues": 2, 1704 | "watchers": 0, 1705 | "default_branch": "master" 1706 | } 1707 | }, 1708 | "_links": { 1709 | "self": { 1710 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/4" 1711 | }, 1712 | "html": { 1713 | "href": "https://github.com/chakki-works/typot-demo/pull/4" 1714 | }, 1715 | "issue": { 1716 | "href": "https://api.github.com/repos/chakki-works/typot-demo/issues/4" 1717 | }, 1718 | "comments": { 1719 | "href": "https://api.github.com/repos/chakki-works/typot-demo/issues/4/comments" 1720 | }, 1721 | "review_comments": { 1722 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/4/comments" 1723 | }, 1724 | "review_comment": { 1725 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/comments{/number}" 1726 | }, 1727 | "commits": { 1728 | "href": "https://api.github.com/repos/chakki-works/typot-demo/pulls/4/commits" 1729 | }, 1730 | "statuses": { 1731 | "href": "https://api.github.com/repos/chakki-works/typot-demo/statuses/f0d3ab26d259ef474996d22dcff21dfce6ca4492" 1732 | } 1733 | }, 1734 | "merged": false, 1735 | "mergeable": null, 1736 | "rebaseable": null, 1737 | "mergeable_state": "unknown", 1738 | "merged_by": null, 1739 | "comments": 0, 1740 | "review_comments": 0, 1741 | "maintainer_can_modify": false, 1742 | "commits": 1, 1743 | "additions": 2, 1744 | "deletions": 0, 1745 | "changed_files": 1 1746 | }, 1747 | "repository": { 1748 | "id": 92240778, 1749 | "name": "typot-demo", 1750 | "full_name": "chakki-works/typot-demo", 1751 | "owner": { 1752 | "login": "chakki-works", 1753 | "id": 25578516, 1754 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1755 | "gravatar_id": "", 1756 | "url": "https://api.github.com/users/chakki-works", 1757 | "html_url": "https://github.com/chakki-works", 1758 | "followers_url": "https://api.github.com/users/chakki-works/followers", 1759 | "following_url": "https://api.github.com/users/chakki-works/following{/other_user}", 1760 | "gists_url": "https://api.github.com/users/chakki-works/gists{/gist_id}", 1761 | "starred_url": "https://api.github.com/users/chakki-works/starred{/owner}{/repo}", 1762 | "subscriptions_url": "https://api.github.com/users/chakki-works/subscriptions", 1763 | "organizations_url": "https://api.github.com/users/chakki-works/orgs", 1764 | "repos_url": "https://api.github.com/users/chakki-works/repos", 1765 | "events_url": "https://api.github.com/users/chakki-works/events{/privacy}", 1766 | "received_events_url": "https://api.github.com/users/chakki-works/received_events", 1767 | "type": "Organization", 1768 | "site_admin": false 1769 | }, 1770 | "private": false, 1771 | "html_url": "https://github.com/chakki-works/typot-demo", 1772 | "description": "to test typot", 1773 | "fork": false, 1774 | "url": "https://api.github.com/repos/chakki-works/typot-demo", 1775 | "forks_url": "https://api.github.com/repos/chakki-works/typot-demo/forks", 1776 | "keys_url": "https://api.github.com/repos/chakki-works/typot-demo/keys{/key_id}", 1777 | "collaborators_url": "https://api.github.com/repos/chakki-works/typot-demo/collaborators{/collaborator}", 1778 | "teams_url": "https://api.github.com/repos/chakki-works/typot-demo/teams", 1779 | "hooks_url": "https://api.github.com/repos/chakki-works/typot-demo/hooks", 1780 | "issue_events_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/events{/number}", 1781 | "events_url": "https://api.github.com/repos/chakki-works/typot-demo/events", 1782 | "assignees_url": "https://api.github.com/repos/chakki-works/typot-demo/assignees{/user}", 1783 | "branches_url": "https://api.github.com/repos/chakki-works/typot-demo/branches{/branch}", 1784 | "tags_url": "https://api.github.com/repos/chakki-works/typot-demo/tags", 1785 | "blobs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/blobs{/sha}", 1786 | "git_tags_url": "https://api.github.com/repos/chakki-works/typot-demo/git/tags{/sha}", 1787 | "git_refs_url": "https://api.github.com/repos/chakki-works/typot-demo/git/refs{/sha}", 1788 | "trees_url": "https://api.github.com/repos/chakki-works/typot-demo/git/trees{/sha}", 1789 | "statuses_url": "https://api.github.com/repos/chakki-works/typot-demo/statuses/{sha}", 1790 | "languages_url": "https://api.github.com/repos/chakki-works/typot-demo/languages", 1791 | "stargazers_url": "https://api.github.com/repos/chakki-works/typot-demo/stargazers", 1792 | "contributors_url": "https://api.github.com/repos/chakki-works/typot-demo/contributors", 1793 | "subscribers_url": "https://api.github.com/repos/chakki-works/typot-demo/subscribers", 1794 | "subscription_url": "https://api.github.com/repos/chakki-works/typot-demo/subscription", 1795 | "commits_url": "https://api.github.com/repos/chakki-works/typot-demo/commits{/sha}", 1796 | "git_commits_url": "https://api.github.com/repos/chakki-works/typot-demo/git/commits{/sha}", 1797 | "comments_url": "https://api.github.com/repos/chakki-works/typot-demo/comments{/number}", 1798 | "issue_comment_url": "https://api.github.com/repos/chakki-works/typot-demo/issues/comments{/number}", 1799 | "contents_url": "https://api.github.com/repos/chakki-works/typot-demo/contents/{+path}", 1800 | "compare_url": "https://api.github.com/repos/chakki-works/typot-demo/compare/{base}...{head}", 1801 | "merges_url": "https://api.github.com/repos/chakki-works/typot-demo/merges", 1802 | "archive_url": "https://api.github.com/repos/chakki-works/typot-demo/{archive_format}{/ref}", 1803 | "downloads_url": "https://api.github.com/repos/chakki-works/typot-demo/downloads", 1804 | "issues_url": "https://api.github.com/repos/chakki-works/typot-demo/issues{/number}", 1805 | "pulls_url": "https://api.github.com/repos/chakki-works/typot-demo/pulls{/number}", 1806 | "milestones_url": "https://api.github.com/repos/chakki-works/typot-demo/milestones{/number}", 1807 | "notifications_url": "https://api.github.com/repos/chakki-works/typot-demo/notifications{?since,all,participating}", 1808 | "labels_url": "https://api.github.com/repos/chakki-works/typot-demo/labels{/name}", 1809 | "releases_url": "https://api.github.com/repos/chakki-works/typot-demo/releases{/id}", 1810 | "deployments_url": "https://api.github.com/repos/chakki-works/typot-demo/deployments", 1811 | "created_at": "2017-05-24T02:24:37Z", 1812 | "updated_at": "2017-05-24T02:24:37Z", 1813 | "pushed_at": "2017-05-29T04:36:46Z", 1814 | "git_url": "git://github.com/chakki-works/typot-demo.git", 1815 | "ssh_url": "git@github.com:chakki-works/typot-demo.git", 1816 | "clone_url": "https://github.com/chakki-works/typot-demo.git", 1817 | "svn_url": "https://github.com/chakki-works/typot-demo", 1818 | "homepage": null, 1819 | "size": 2, 1820 | "stargazers_count": 0, 1821 | "watchers_count": 0, 1822 | "language": null, 1823 | "has_issues": true, 1824 | "has_projects": true, 1825 | "has_downloads": true, 1826 | "has_wiki": true, 1827 | "has_pages": false, 1828 | "forks_count": 0, 1829 | "mirror_url": null, 1830 | "open_issues_count": 2, 1831 | "forks": 0, 1832 | "open_issues": 2, 1833 | "watchers": 0, 1834 | "default_branch": "master" 1835 | }, 1836 | "organization": { 1837 | "login": "chakki-works", 1838 | "id": 25578516, 1839 | "url": "https://api.github.com/orgs/chakki-works", 1840 | "repos_url": "https://api.github.com/orgs/chakki-works/repos", 1841 | "events_url": "https://api.github.com/orgs/chakki-works/events", 1842 | "hooks_url": "https://api.github.com/orgs/chakki-works/hooks", 1843 | "issues_url": "https://api.github.com/orgs/chakki-works/issues", 1844 | "members_url": "https://api.github.com/orgs/chakki-works/members{/member}", 1845 | "public_members_url": "https://api.github.com/orgs/chakki-works/public_members{/member}", 1846 | "avatar_url": "https://avatars0.githubusercontent.com/u/25578516?v=3", 1847 | "description": "Our mission is to enable everyone leave the office by the tea time" 1848 | }, 1849 | "sender": { 1850 | "login": "icoxfog417", 1851 | "id": 544269, 1852 | "avatar_url": "https://avatars3.githubusercontent.com/u/544269?v=3", 1853 | "gravatar_id": "", 1854 | "url": "https://api.github.com/users/icoxfog417", 1855 | "html_url": "https://github.com/icoxfog417", 1856 | "followers_url": "https://api.github.com/users/icoxfog417/followers", 1857 | "following_url": "https://api.github.com/users/icoxfog417/following{/other_user}", 1858 | "gists_url": "https://api.github.com/users/icoxfog417/gists{/gist_id}", 1859 | "starred_url": "https://api.github.com/users/icoxfog417/starred{/owner}{/repo}", 1860 | "subscriptions_url": "https://api.github.com/users/icoxfog417/subscriptions", 1861 | "organizations_url": "https://api.github.com/users/icoxfog417/orgs", 1862 | "repos_url": "https://api.github.com/users/icoxfog417/repos", 1863 | "events_url": "https://api.github.com/users/icoxfog417/events{/privacy}", 1864 | "received_events_url": "https://api.github.com/users/icoxfog417/received_events", 1865 | "type": "User", 1866 | "site_admin": false 1867 | }, 1868 | "installation": { 1869 | "id": 11111 1870 | } 1871 | } 1872 | """ 1873 | 1874 | diff_sample = """ 1875 | diff --git a/content.md b/content.md 1876 | index b7ab025..67ea8f3 100644 1877 | --- a/content.md 1878 | +++ b/content.md 1879 | @@ -1,5 +1,7 @@ 1880 | # Typot Demo Content 1881 | 1882 | * Now release humans from checking the typos 1883 | -* Now relase humans from checking the typos 1884 | +* Now release humans from checking the typos 1885 | * Now release humans fram checkingg the typos 1886 | + 1887 | +ohh, typos! 1888 | """ 1889 | 1890 | diff_from_middle = """ 1891 | diff --git a/README.md b/README.md 1892 | index dc3326a..ab9eb25 100644 1893 | --- a/README.md 1894 | +++ b/README.md 1895 | @@ -3,3 +3,5 @@ 1896 | Typot automatically detect & fix typo! 1897 | 1898 | You can try its feature on this repository. 1899 | + 1900 | +I made mistoke here. 1901 | """ 1902 | --------------------------------------------------------------------------------