From 9530b7f19df44871e5ca811c78070f6ceec4928a Mon Sep 17 00:00:00 2001 From: colorq Date: Tue, 23 Jun 2020 23:37:56 +0800 Subject: [PATCH 1/8] add test.txt --- test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..e69de29 From 751f3282249bb8e69369a01c9d776d52b532d331 Mon Sep 17 00:00:00 2001 From: colorq Date: Tue, 23 Jun 2020 23:39:22 +0800 Subject: [PATCH 2/8] remove test.txt --- test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test.txt diff --git a/test.txt b/test.txt deleted file mode 100644 index e69de29..0000000 From f44b111c2e89d1832384fe92a19ae8928de90b9e Mon Sep 17 00:00:00 2001 From: colorq Date: Tue, 23 Jun 2020 23:41:24 +0800 Subject: [PATCH 3/8] add test.txt --- test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..e69de29 From 27dcff11c07f66648a27c4ac669a89b3e15a80dd Mon Sep 17 00:00:00 2001 From: colorq Date: Tue, 23 Jun 2020 23:43:33 +0800 Subject: [PATCH 4/8] remove test.txt --- test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test.txt diff --git a/test.txt b/test.txt deleted file mode 100644 index e69de29..0000000 From dcfd8e24b67c98bca3588ccb44c4c8ff07bb159c Mon Sep 17 00:00:00 2001 From: colorq Date: Wed, 24 Jun 2020 08:55:46 +0800 Subject: [PATCH 5/8] add a func --- api/apps/apps.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/apps/apps.py b/api/apps/apps.py index da3a787..b86ef5c 100644 --- a/api/apps/apps.py +++ b/api/apps/apps.py @@ -19,3 +19,6 @@ def get_a_user_installation(self, username, **kwargs): """ headers = {'Accept': 'application/vnd.github.machine-man-preview+json'} return self.get("/users/{}/installation".format(username), headers=headers, **kwargs) + + def pa(self): + pass From f88ebc9fbda4490fc3fbc63f648f40b49e9b6fb6 Mon Sep 17 00:00:00 2001 From: colorq Date: Wed, 24 Jun 2020 08:58:29 +0800 Subject: [PATCH 6/8] reset --- api/apps/apps.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/api/apps/apps.py b/api/apps/apps.py index b86ef5c..da3a787 100644 --- a/api/apps/apps.py +++ b/api/apps/apps.py @@ -19,6 +19,3 @@ def get_a_user_installation(self, username, **kwargs): """ headers = {'Accept': 'application/vnd.github.machine-man-preview+json'} return self.get("/users/{}/installation".format(username), headers=headers, **kwargs) - - def pa(self): - pass From 7946e82a850743ff113c908bc776656676e19bc3 Mon Sep 17 00:00:00 2001 From: colorq Date: Sun, 28 Jun 2020 11:35:05 +0800 Subject: [PATCH 7/8] add api/checks/runs.py --- api/checks/runs.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/api/checks/runs.py b/api/checks/runs.py index a5d0dca..2a863e5 100644 --- a/api/checks/runs.py +++ b/api/checks/runs.py @@ -9,3 +9,41 @@ def list_check_runs(self, owner, repo, ref, **kwargs): """ headers = {'Accept': 'application/vnd.github.antiope-preview+json'} return self.get("/repos/{}/{}/commits/{}/check-runs".format(owner, repo, ref), headers=headers, **kwargs) + + def create_a_check_runs(self, owner, repo, **kwargs): + """ + https://developer.github.com/v3/checks/runs/#create-a-check-run + """ + headers = {'Accept': 'application/vnd.github.antiope-preview+json'} + return self.post('/repos/{}/{}/check-runs'.format(owner, repo), headers = headers, **kwargs) + + def updata_a_check_runs(self, owner, repo, check_run_id, **kwargs): + """ + https://developer.github.com/v3/checks/runs/#update-a-check-run + """ + headers = {'Accept': 'application/vnd.github.antiope-preview+json'} + return self.patch('/repos/{}/{}/check-runs/{}'.format(owner, repo, check_run_id), headers = headers, **kwargs) + + def list_check_runs_in_a_check_suite(self, owner, repo, check_suite_id, **kwargs): + """ + https://developer.github.com/v3/checks/runs/#list-check-runs-in-a-check-suite + """ + headers = {'Accept': 'application/vnd.github.antiope-preview+json'} + return self.get('/repos/{}/{}/check-suites/{}/check-runs'.format(owner, repo, check_suite_id), headers = headers, **kwargs) + + def get_a_single_check_run(self, owner, repo, check_run_id, **kwargs): + """ + https://developer.github.com/v3/checks/runs/#get-a-check-run + """ + headers = {'Accept': 'application/vnd.github.antiope-preview+json'} + return self.get('/repos/:owner/:repo/check-runs/:check_run_id'.format(owner, repo, check_run_id), headers = headers, **kwargs) + + def list_annotations_for_a_check_run(self, owner, repo, check_run_id, **kwargs): + """ + https://developer.github.com/v3/checks/runs/#list-check-run-annotations + """ + headers = {'Accept': 'application/vnd.github.antiope-preview+json'} + return self.get('/repos/:owner/:repo/check-runs/:check_run_id/annotations'.format(owner, repo, check_run_id), headers = headers, **kwargs) + + + From 7763a95101170a5388c41b2a4da039eb01946061 Mon Sep 17 00:00:00 2001 From: colorq Date: Sun, 28 Jun 2020 11:50:52 +0800 Subject: [PATCH 8/8] modify runs.py --- api/checks/runs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/checks/runs.py b/api/checks/runs.py index 2a863e5..97616b9 100644 --- a/api/checks/runs.py +++ b/api/checks/runs.py @@ -36,14 +36,14 @@ def get_a_single_check_run(self, owner, repo, check_run_id, **kwargs): https://developer.github.com/v3/checks/runs/#get-a-check-run """ headers = {'Accept': 'application/vnd.github.antiope-preview+json'} - return self.get('/repos/:owner/:repo/check-runs/:check_run_id'.format(owner, repo, check_run_id), headers = headers, **kwargs) + return self.get('/repos/{}/{}/check-runs/{}'.format(owner, repo, check_run_id), headers = headers, **kwargs) def list_annotations_for_a_check_run(self, owner, repo, check_run_id, **kwargs): """ https://developer.github.com/v3/checks/runs/#list-check-run-annotations """ headers = {'Accept': 'application/vnd.github.antiope-preview+json'} - return self.get('/repos/:owner/:repo/check-runs/:check_run_id/annotations'.format(owner, repo, check_run_id), headers = headers, **kwargs) - + return self.get('/repos/{}/{}/check-runs/{}/annotations'.format(owner, repo, check_run_id), headers = headers, **kwargs) +