From e99eddb3c0ad865607be0ce0cc96c462d7d4d15f Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 4 Feb 2022 12:49:40 +0100 Subject: [PATCH] API: Update go.mod, style fixes --- api/go.mod | 2 +- api/go.sum | 4 ++-- gitsrht/repos.py | 24 +++++++++++++++++++----- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/api/go.mod b/api/go.mod index d67d404..34bd30d 100644 --- a/api/go.mod +++ b/api/go.mod @@ -3,7 +3,7 @@ module git.sr.ht/~sircmpwn/git.sr.ht/api go 1.14 require ( - git.sr.ht/~sircmpwn/core-go v0.0.0-20220126083025-75dfa2992b49 + git.sr.ht/~sircmpwn/core-go v0.0.0-20220203103213-b2c8e81ee698 github.com/99designs/gqlgen v0.14.0 github.com/Masterminds/squirrel v1.4.0 github.com/go-git/go-git/v5 v5.0.0 diff --git a/api/go.sum b/api/go.sum index 3f435b3..4970245 100644 --- a/api/go.sum +++ b/api/go.sum @@ -31,8 +31,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -git.sr.ht/~sircmpwn/core-go v0.0.0-20220126083025-75dfa2992b49 h1:+18ujTlMyXa6Zp1qXz7M4ha2eT8MuItSbeQd9w2LQ7I= -git.sr.ht/~sircmpwn/core-go v0.0.0-20220126083025-75dfa2992b49/go.mod h1:uUqzeO5OLl/nRZfPk0igIAweRZiVwUmu/OGYfjS9fWc= +git.sr.ht/~sircmpwn/core-go v0.0.0-20220203103213-b2c8e81ee698 h1:9BQtk5JzEvEuK8owkf/96S53b6bna/o7OXv/Do7lIb0= +git.sr.ht/~sircmpwn/core-go v0.0.0-20220203103213-b2c8e81ee698/go.mod h1:uUqzeO5OLl/nRZfPk0igIAweRZiVwUmu/OGYfjS9fWc= git.sr.ht/~sircmpwn/dowork v0.0.0-20210820133136-d3970e97def3 h1:9WCv5cK67s2SiY/R4DWT/OchEsFnfYDz3lbevKxZ4QI= git.sr.ht/~sircmpwn/dowork v0.0.0-20210820133136-d3970e97def3/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw= git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3 h1:4wDp4BKF7NQqoh73VXpZsB/t1OEhDpz/zEpmdQfbjDk= diff --git a/gitsrht/repos.py b/gitsrht/repos.py index 8115bbe..ded586c 100644 --- a/gitsrht/repos.py +++ b/gitsrht/repos.py @@ -92,8 +92,14 @@ class GitRepoApi(): return None resp = exec_gql("git.sr.ht", """ - mutation CreateRepository($name: String!, $visibility: Visibility = PUBLIC, $description: String) { - createRepository(name: $name, visibility: $visibility, description: $description) { + mutation CreateRepository( + $name: String!, + $visibility: Visibility = PUBLIC, + $description: String) { + createRepository( + name: $name, + visibility: $visibility, + description: $description) { id created updated @@ -108,7 +114,8 @@ class GitRepoApi(): visibility } } - """, valid=valid, user=user, name=repo_name, description=description, visibility=visibility) + """, valid=valid, user=user, name=repo_name, + description=description, visibility=visibility) if not valid.ok: return None @@ -123,8 +130,15 @@ class GitRepoApi(): return None resp = exec_gql("git.sr.ht", """ - mutation CreateRepository($name: String!, $visibility: Visibility = UNLISTED, $description: String, $cloneUrl: String) { - createRepository(name: $name, visibility: $visibility, description: $description, cloneUrl: $cloneUrl) { + mutation CreateRepository( + $name: String!, + $visibility: Visibility = UNLISTED, + $description: String, + $cloneUrl: String) { + createRepository(name: $name, + visibility: $visibility, + description: $description, + cloneUrl: $cloneUrl) { name } } -- 2.38.4