aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/github
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2024-08-08 13:37:33 +0200
committerGitHub <noreply@github.com>2024-08-08 13:37:33 +0200
commit253f0f01207d0f058f1535380cd1850e20f2efb9 (patch)
treebc08f1ef71d613416db9e01e6b6262c14b0899da /src-tauri/src/github
parente552eb3e2cefb0b0ce4ca6affb850144cf0e33f5 (diff)
parent3cab2a7852fdc4663c8c7f4df6a52b831e610e92 (diff)
downloadFlightCore-253f0f01207d0f058f1535380cd1850e20f2efb9.tar.gz
FlightCore-253f0f01207d0f058f1535380cd1850e20f2efb9.zip
Merge branch 'main' into feat/change-repair-window-to-tab
Diffstat (limited to 'src-tauri/src/github')
-rw-r--r--src-tauri/src/github/release_notes.rs45
1 files changed, 44 insertions, 1 deletions
diff --git a/src-tauri/src/github/release_notes.rs b/src-tauri/src/github/release_notes.rs
index e3a14537..4adfb24b 100644
--- a/src-tauri/src/github/release_notes.rs
+++ b/src-tauri/src/github/release_notes.rs
@@ -1,3 +1,4 @@
+use rand::prelude::SliceRandom;
use serde::{Deserialize, Serialize};
use std::vec::Vec;
use ts_rs::TS;
@@ -168,9 +169,51 @@ pub async fn generate_release_note_announcement() -> Result<String, String> {
let modders_info = "Mod compatibility should not be impacted";
let server_hosters_info = "REPLACE ME";
+ let mut rng = rand::thread_rng();
+ let attributes = vec![
+ "adorable",
+ "amazing",
+ "beautiful",
+ "blithsome",
+ "brilliant",
+ "compassionate",
+ "dazzling",
+ "delightful",
+ "distinguished",
+ "elegant",
+ "enigmatic",
+ "enthusiastic",
+ "fashionable",
+ "fortuitous",
+ "friendly",
+ "generous",
+ "gleeful",
+ "gorgeous",
+ "handsome",
+ "lively",
+ "lovely",
+ "lucky",
+ "lustrous",
+ "marvelous",
+ "merry",
+ "mirthful",
+ "phantasmagorical",
+ "pretty",
+ "propitious",
+ "ravishing",
+ "sincere",
+ "sophisticated fellow",
+ "stupendous",
+ "vivacious",
+ "wonderful",
+ "zestful",
+ ];
+
+ let selected_attribute = attributes.choose(&mut rng).unwrap();
+
// Build announcement string
let return_string = format!(
- r"Hello beautiful people <3
+ r"Hello {selected_attribute} people <3
**Northstar `{current_ns_version}` is out!**
{general_info}