Skip to content

Commit

Permalink
fix(discord): fix grammar/wording
Browse files Browse the repository at this point in the history
  • Loading branch information
hackermondev committed Jun 7, 2024
1 parent 5052350 commit 316d461
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ COPY . .
RUN cargo install --path src/sexurity-discord
RUN cargo install --path src/sexurity-poller

FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y wget jq && rm -rf /var/lib/apt/lists/*
FROM ubuntu
RUN apt-get update && apt-get install -y wget jq curl && rm -rf /var/lib/apt/lists/*
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && chmod +x /usr/local/bin/yq

COPY --from=builder /usr/local/cargo/bin/sexurity-discord /usr/local/bin/sexurity-discord
COPY --from=builder /usr/local/cargo/bin/sexurity-poller /usr/local/bin/sexurity-poller
COPY ./yaml_to_cli.sh /usr/local/bin/yaml_to_cli.sh
ENV RUST_LOG info
ENV RUST_LOG info
11 changes: 11 additions & 0 deletions src/sexurity-discord/src/breakdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ pub fn calculate_rep_breakdown(mut rep_points: i32) -> ReputationBreakdown {
index += 1;
}

if rep_points != 0 {
return ReputationBreakdown {
high_bounty: 0,
medium_bounty: 0,
low_bounty: 0,
triaged: 0,
not_applicable: 0,
spam: 0,
};
}

breakdown
}

Expand Down
2 changes: 1 addition & 1 deletion src/sexurity-discord/src/subscriptions/reports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use sexurity_api::redis::redis::Connection;
use std::thread::{self, JoinHandle};
use twilight_model::channel::message::embed::Embed;
use twilight_util::builder::embed::EmbedFieldBuilder;
use twilight_util::builder::embed::{EmbedBuilder, EmbedFooterBuilder};
use twilight_util::builder::embed::EmbedBuilder;

pub fn start_reports_subscription<E: Fn(Vec<Embed>) + Sync + std::marker::Send + 'static>(
mut conn: Connection,
Expand Down
2 changes: 1 addition & 1 deletion src/sexurity-discord/src/subscriptions/reputation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fn build_embed_data(diff: Vec<models::RepData>, handle: &str) -> Option<Embed> {
);

if new.rank == -1 {
text = format!("[**``{}``**]({}) was added to [**``{}``**]({}) with **{} reputation** (rank: <100)", new.user_name, format!("https://hackerone.com/{}", new.user_name), handle, format!("https://hackerone.com/{}", handle), new.reputation);
text = format!("[**``{}``**]({}) was added to [**``{}``**]({}) with **{} reputation** (rank: >100)", new.user_name, format!("https://hackerone.com/{}", new.user_name), handle, format!("https://hackerone.com/{}", handle), new.reputation);
}

let embed = EmbedBuilder::new()
Expand Down

0 comments on commit 316d461

Please sign in to comment.