You've already forked AstralRinth
forked from didirus/AstralRinth
skip projects with no issues
This commit is contained in:
@@ -20,6 +20,7 @@ use sqlx::PgPool;
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::net::Ipv4Addr;
|
use std::net::Ipv4Addr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
use log::info;
|
||||||
|
|
||||||
pub fn config(cfg: &mut web::ServiceConfig) {
|
pub fn config(cfg: &mut web::ServiceConfig) {
|
||||||
cfg.service(
|
cfg.service(
|
||||||
@@ -197,6 +198,11 @@ pub async fn delphi_result_ingest(
|
|||||||
redis: web::Data<RedisPool>,
|
redis: web::Data<RedisPool>,
|
||||||
body: web::Json<DelphiIngest>,
|
body: web::Json<DelphiIngest>,
|
||||||
) -> Result<HttpResponse, ApiError> {
|
) -> Result<HttpResponse, ApiError> {
|
||||||
|
if body.issues.is_empty() {
|
||||||
|
info!("No issues found for file {}", body.url);
|
||||||
|
return Ok(HttpResponse::NoContent().finish());
|
||||||
|
}
|
||||||
|
|
||||||
let webhook_url = dotenvy::var("DELPHI_SLACK_WEBHOOK")?;
|
let webhook_url = dotenvy::var("DELPHI_SLACK_WEBHOOK")?;
|
||||||
|
|
||||||
let project = crate::database::models::Project::get_id(
|
let project = crate::database::models::Project::get_id(
|
||||||
|
|||||||
Reference in New Issue
Block a user