diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..b493431b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +[*] +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +end_of_line = crlf diff --git a/README.md b/README.md index 2920e73d..2590d350 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,9 @@ Home of MapDiffBot2 and IconDiffBot2. This is a monorepo of all the respective binary crate, under the `crates/` directory. Licensing of our code is MIT, dependency on SpacemanDMM enforces a license of GPLv3 on the final binary. + +--- + +IDB2 install link: [https://github.com/apps/icondiffbot-2](https://github.com/apps/icondiffbot-2) + +MDB2 install link: [https://github.com/apps/mapdiffbot-2](https://github.com/apps/mapdiffbot-2) diff --git a/crates/diffbot_lib/src/github/error_template.txt b/crates/diffbot_lib/src/github/error_template.txt index 9c003f5b..7b1e089e 100644 --- a/crates/diffbot_lib/src/github/error_template.txt +++ b/crates/diffbot_lib/src/github/error_template.txt @@ -2,9 +2,9 @@ An unexpected error occured during processing, possibly caused by malformed maps The following stack trace may be useful:
- - Stack trace - + + Stack trace + {stack_trace} diff --git a/crates/diffbot_lib/src/github/github_api.rs b/crates/diffbot_lib/src/github/github_api.rs index 2e34f976..08e97881 100644 --- a/crates/diffbot_lib/src/github/github_api.rs +++ b/crates/diffbot_lib/src/github/github_api.rs @@ -30,7 +30,7 @@ impl CheckRun { .post( format!("/repos/{full_repo}/check-runs"), Some(&CreateCheckRun { - name: name.unwrap_or("MapDiffBot2").to_string(), + name: name.unwrap_or("BYONDDiffBot").to_string(), head_sha: head_sha.to_string(), }), ) @@ -210,7 +210,7 @@ pub async fn download_file>( path.push("."); path.push(DOWNLOAD_DIR); path.push(&target.sha); - path.set_extension("dmi"); + path.set_extension("dmi"); // Method should have an IDB qualifier due to being a shared crate async_fs::create_dir_all(path.parent().unwrap()).await?; let mut file = File::create(&path).await?; diff --git a/crates/icondiffbot2/config.example.toml b/crates/icondiffbot2/config.example.toml index 02990219..28b5a851 100644 --- a/crates/icondiffbot2/config.example.toml +++ b/crates/icondiffbot2/config.example.toml @@ -1,5 +1,5 @@ blacklist = [ - 1337, + 1337, ] blacklist_contact = "Good luck!" diff --git a/crates/icondiffbot2/src/table_builder.rs b/crates/icondiffbot2/src/table_builder.rs index abe07fa3..4ebb403e 100644 --- a/crates/icondiffbot2/src/table_builder.rs +++ b/crates/icondiffbot2/src/table_builder.rs @@ -74,7 +74,7 @@ impl<'a> OutputTableBuilder<'a> { if current_output_text.len() + diff_block.len() > 60_000 { chunks.push(Output { title: "Icon difference rendering", - summary: "*This is still a beta. Please file any issues [here](https://github.com/spacestation13/BYONDDiffBots/).*\n\nIcons with diff:".to_string(), + summary: "*Please file any issues [here](https://github.com/spacestation13/BYONDDiffBots/issues).*\n\nIcons with diff:".to_string(), text: std::mem::take(&mut current_output_text) }); } @@ -85,7 +85,7 @@ impl<'a> OutputTableBuilder<'a> { if !current_output_text.is_empty() { chunks.push(Output { title: "Icon difference rendering", - summary: "*This is still a beta. Please file any issues [here](https://github.com/spacestation13/BYONDDiffBots/).*\n\nIcons with diff:".to_string(), + summary: "*Please file any issues [here](https://github.com/spacestation13/BYONDDiffBots/issues).*\n\nIcons with diff:".to_string(), text: std::mem::take(&mut current_output_text) }); } diff --git a/crates/icondiffbot2/templates/diff_details.txt b/crates/icondiffbot2/templates/diff_details.txt index 1ffc0334..a9b60845 100644 --- a/crates/icondiffbot2/templates/diff_details.txt +++ b/crates/icondiffbot2/templates/diff_details.txt @@ -1,7 +1,7 @@
- - {typ} - {filename} - + + {typ} - {filename} + |State Name (duplicate)|Old Icon|New Icon|Status| |----------|--------|--------|------| diff --git a/crates/mapdiffbot2/README.md b/crates/mapdiffbot2/README.md deleted file mode 100644 index 8e8c9e97..00000000 --- a/crates/mapdiffbot2/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# MapDiffBot - -Tool for rendering BYOND map diffs. - -Add the (currently in beta) app [here](https://github.com/apps/mapdiffbot2-beta). -Pull requests to your repository that modify .dmm files will get a check containing -rendered map changes. diff --git a/crates/mapdiffbot2/config.example.toml b/crates/mapdiffbot2/config.example.toml index b02dd997..c16c3b0f 100644 --- a/crates/mapdiffbot2/config.example.toml +++ b/crates/mapdiffbot2/config.example.toml @@ -1,5 +1,5 @@ blacklist = [ - 1337, + 1337, ] blacklist_contact = "Good luck!" diff --git a/crates/mapdiffbot2/src/job_processor.rs b/crates/mapdiffbot2/src/job_processor.rs index b98daaab..22b3b5ba 100644 --- a/crates/mapdiffbot2/src/job_processor.rs +++ b/crates/mapdiffbot2/src/job_processor.rs @@ -183,8 +183,8 @@ fn generate_finished_output>( let mut builder = CheckOutputBuilder::new( "Map renderings", - "*This is still a beta. Please file any issues [here](https://github.com/MCHSL/mapdiffbot2/issues).*\n\nMaps with diff:", - ); + "*Please file any issues [here](https://github.com/spacestation13/BYONDDiffBots/issues).*\n\nMaps with diff:", + ); let link_base = format!("{}/{}", file_url, non_abs_directory); @@ -261,13 +261,13 @@ pub fn do_job(job: Job) -> Result { trace!("Directory doesn't exist, creating dir"); std::fs::create_dir_all(&repo_dir)?; handle.block_on(async { - let output = Output { - title: "Cloning repo...", - summary: "The repository is being cloned, this will take a few minutes. Future runs will not require cloning.".to_owned(), - text: "".to_owned(), - }; - let _ = job.check_run.set_output(output).await; // we don't really care if updating the job fails, just continue - }); + let output = Output { + title: "Cloning repo...", + summary: "The repository is being cloned, this will take a few minutes. Future runs will not require cloning.".to_owned(), + text: "".to_owned(), + }; + let _ = job.check_run.set_output(output).await; // we don't really care if updating the job fails, just continue + }); clone_repo(&repo, &repo_dir).context("Cloning repo")?; } diff --git a/crates/mapdiffbot2/templates/diff_template_add.txt b/crates/mapdiffbot2/templates/diff_template_add.txt index e64e3d14..23b0faf0 100644 --- a/crates/mapdiffbot2/templates/diff_template_add.txt +++ b/crates/mapdiffbot2/templates/diff_template_add.txt @@ -1,7 +1,7 @@
- - ADDED - {filename} - + + ADDED - {filename} + Added: [Raw link]({image_link}) diff --git a/crates/mapdiffbot2/templates/diff_template_mod.txt b/crates/mapdiffbot2/templates/diff_template_mod.txt index 1ea31aea..f792c5b9 100644 --- a/crates/mapdiffbot2/templates/diff_template_mod.txt +++ b/crates/mapdiffbot2/templates/diff_template_mod.txt @@ -1,7 +1,7 @@
- - MODIFIED - {filename} - + + MODIFIED - {filename} + Modified region: {bounds} diff --git a/crates/mapdiffbot2/templates/diff_template_remove.txt b/crates/mapdiffbot2/templates/diff_template_remove.txt index a691b18b..fcbda0f9 100644 --- a/crates/mapdiffbot2/templates/diff_template_remove.txt +++ b/crates/mapdiffbot2/templates/diff_template_remove.txt @@ -1,7 +1,7 @@
- - REMOVED - {filename} - + + REMOVED - {filename} + Removed: [Raw link]({image_link})