From 8eeee75cd239c93db0c2ac181940879c7e31e0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20H=C3=BCseyin=20Kafadar?= <43652059+mhkafadar@users.noreply.github.com> Date: Fri, 9 Dec 2022 19:38:57 +0300 Subject: [PATCH] ci: update dockerfile and project name --- Cargo.lock | 30 +++++++++++++++--------------- Cargo.toml | 2 +- Dockerfile | 6 +++--- src/http_server.rs | 2 +- src/telegram_bot.rs | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2baba99..a78baa5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1018,6 +1018,21 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c96aba5aa877601bb3f6dd6a63a969e1f82e60646e81e71b14496995e9853c91" +[[package]] +name = "notifine" +version = "0.1.0" +dependencies = [ + "actix-web", + "diesel", + "dotenv", + "log", + "pretty_env_logger", + "rand", + "serde", + "teloxide", + "tokio", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -1546,21 +1561,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20f34339676cdcab560c9a82300c4c2581f68b9369aedf0fae86f2ff9565ff3e" -[[package]] -name = "telegram-gitlab" -version = "0.1.0" -dependencies = [ - "actix-web", - "diesel", - "dotenv", - "log", - "pretty_env_logger", - "rand", - "serde", - "teloxide", - "tokio", -] - [[package]] name = "teloxide" version = "0.11.3" diff --git a/Cargo.toml b/Cargo.toml index f186472..e721f29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "telegram-gitlab" +name = "notifine" version = "0.1.0" edition = "2021" diff --git a/Dockerfile b/Dockerfile index d352c7f..30c8419 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,6 @@ RUN cargo build --release FROM debian:bullseye-slim EXPOSE 8080 RUN apt-get update && apt-get install postgresql -y -COPY --from=builder ./target/release/telegram-gitlab ./target/release/telegram-gitlab -RUN chmod +x ./target/release/telegram-gitlab -CMD ["/target/release/telegram-gitlab"] +COPY --from=builder ./target/release/notifine ./target/release/notifine +RUN chmod +x ./target/release/notifine +CMD ["/target/release/notifine"] diff --git a/src/http_server.rs b/src/http_server.rs index f96fb6a..ec38193 100644 --- a/src/http_server.rs +++ b/src/http_server.rs @@ -6,8 +6,8 @@ use crate::webhook_handlers::unknown_event::handle_unknown_event; use actix_web::{ get, middleware, post, web, App, HttpRequest, HttpResponse, HttpServer, Responder, }; +use notifine::{find_chat_by_id, find_webhook_by_webhook_url}; use serde::Deserialize; -use telegram_gitlab::{find_chat_by_id, find_webhook_by_webhook_url}; #[derive(Debug, Deserialize)] pub struct GitlabEvent { diff --git a/src/telegram_bot.rs b/src/telegram_bot.rs index e9ec817..70356ae 100644 --- a/src/telegram_bot.rs +++ b/src/telegram_bot.rs @@ -1,7 +1,7 @@ +use notifine::{create_chat, create_webhook}; use rand::distributions::Alphanumeric; use rand::{thread_rng, Rng}; use std::ops::Add; -use telegram_gitlab::{create_chat, create_webhook}; use teloxide::dispatching::dialogue; use teloxide::dispatching::dialogue::InMemStorage; use teloxide::dptree::case;