more logging
This commit is contained in:
parent
b7003f4cb6
commit
48b9b6bc0f
|
@ -79,9 +79,12 @@ pub async fn get_all_prs(repos: Vec<Repo>) -> Vec<Pull> {
|
|||
*/
|
||||
pub async fn get_new_prs(old: Vec<Pull>, repos: Vec<Repo>) -> ( Vec<Pull>, Vec<Pull> ) {
|
||||
|
||||
log::info!("Getting all PRs now");
|
||||
|
||||
let data = get_all_prs(repos.clone()).await;
|
||||
let mut new_pulls: Vec<Pull> = vec![];
|
||||
|
||||
|
||||
for pull in data.iter() {
|
||||
let mut alr_exists = false;
|
||||
for old_pull in old.iter() {
|
||||
|
|
|
@ -70,6 +70,7 @@ async fn main() {
|
|||
fs::write(".pr-cache", data).await.unwrap();
|
||||
|
||||
for pr in new_prs.iter() {
|
||||
log::info!("Sending message about {} ({})", pr.title, pr.url);
|
||||
bot.send_message(chat.id, format!("New PR\n{} ({}#{}) by {}\n{}", pr.title, pr.head.repo.name, pr.number, pr.user.login, pr.url)).await.unwrap();
|
||||
bot.send_message(chat.id, "апрувните пж @bleki42 @balistiktw @x3paerz").await.unwrap();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue