MCPcopy Create free account
hub / github.com/cncf/gitvote / get_open_vote

Method get_open_vote

src/db.rs:175–191  ·  view source on GitHub ↗

[`DB::get_open_vote`]

(&self, repository_full_name: &str, issue_number: i64)

Source from the content-addressed store, hash-verified

173
174 /// [`DB::get_open_vote`]
175 async fn get_open_vote(&self, repository_full_name: &str, issue_number: i64) -> Result<Option<Vote>> {
176 let db = self.pool.get().await?;
177 let vote = db
178 .query_opt(
179 "
180 select *
181 from vote
182 where repository_full_name = $1::text
183 and issue_number = $2::bigint
184 and closed = false
185 ",
186 &[&repository_full_name, &issue_number],
187 )
188 .await?
189 .map(|row| Vote::from(&row));
190 Ok(vote)
191 }
192
193 /// [`DB::get_open_votes_with_close_on_passing`]
194 async fn get_open_votes_with_close_on_passing(&self) -> Result<Vec<Vote>> {

Callers 1

check_voteMethod · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected