@@ -51,7 +51,7 @@ FROM pull_request as pr
5151WHERE pr.repository = $1
5252 AND pr.number = $2
5353"# ,
54- repo. to_string ( ) ,
54+ repo as & GithubRepoName ,
5555 pr_number. 0 as i32
5656 )
5757 . fetch_optional ( executor)
@@ -69,7 +69,7 @@ pub(crate) async fn create_pull_request(
6969INSERT INTO pull_request (repository, number)
7070VALUES ($1, $2) ON CONFLICT DO NOTHING
7171"# ,
72- repo. to_string ( ) ,
72+ repo as & GithubRepoName ,
7373 pr_number. 0 as i32
7474 )
7575 . execute ( executor)
@@ -210,7 +210,7 @@ INSERT INTO build (repository, branch, commit_sha, parent, status)
210210VALUES ($1, $2, $3, $4, $5)
211211RETURNING id
212212"# ,
213- repo. to_string ( ) ,
213+ repo as & GithubRepoName ,
214214 branch,
215215 commit_sha. 0 ,
216216 parent. 0 ,
@@ -243,7 +243,7 @@ WHERE repository = $1
243243 AND branch = $2
244244 AND commit_sha = $3
245245"# ,
246- repo. to_string ( ) ,
246+ repo as & GithubRepoName ,
247247 branch,
248248 commit_sha. 0
249249 )
@@ -271,7 +271,7 @@ FROM build
271271WHERE repository = $1
272272 AND status = $2
273273"# ,
274- repo. to_string ( ) ,
274+ repo as & GithubRepoName ,
275275 BuildStatus :: Pending as BuildStatus
276276 )
277277 . fetch_all ( executor)
@@ -470,7 +470,7 @@ pub(crate) async fn get_repository(
470470 FROM repository
471471 WHERE name = $1
472472 "# ,
473- repo. to_string ( )
473+ repo as & GithubRepoName
474474 )
475475 . fetch_optional ( executor)
476476 . await ?;
@@ -495,7 +495,7 @@ pub(crate) async fn upsert_repository(
495495 ON CONFLICT (name)
496496 DO UPDATE SET tree_state = EXCLUDED.tree_state, treeclosed_src = EXCLUDED.treeclosed_src
497497 "# ,
498- repo. to_string ( ) ,
498+ repo as & GithubRepoName ,
499499 priority,
500500 src
501501 )
0 commit comments