From 2872f56aacc67bc058de2a33c7f1e20239d30bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Mon, 3 Jul 2023 11:02:55 +0200 Subject: [PATCH] feat(cli): implemented CoC flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Idk why I even included this, but then again, it is probably not bad to be very explicit about what is a pledge. Signed-off-by: Christina Sørensen --- doc/roadmap.org | 4 ++-- src/main.rs | 2 +- src/test/test.yaml | 2 +- src/utils/strings.rs | 8 ++++++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/roadmap.org b/doc/roadmap.org index a92f0a7..df40644 100644 --- a/doc/roadmap.org +++ b/doc/roadmap.org @@ -12,9 +12,9 @@ - [X] commit with edit works - [X] Repo Flags Finished - [X] Optional Fields -- [ ] Subcommands +- [-] Subcommands - [ ] Quiet flag - - [ ] Do something about coc flag + - [-] Do something about coc flag - [ ] UX - [ ] Change failure emotes - [ ] Flag for disabling emotes diff --git a/src/main.rs b/src/main.rs index bcc2635..44170b4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,7 +61,7 @@ fn main() { match &args { args if args.license => println!("{}", utils::strings::INTERACTIVE_LICENSE), args if args.warranty => println!("{}", utils::strings::INTERACTIVE_WARRANTY), - args if args.code_of_conduct => unimplemented!(), + args if args.code_of_conduct => println!("{}", utils::strings::INTERACTIVE_COC), _ => (), } match &mut args.command { diff --git a/src/test/test.yaml b/src/test/test.yaml index 1184f45..aa2ec05 100644 --- a/src/test/test.yaml +++ b/src/test/test.yaml @@ -1,4 +1,5 @@ categories: + empty: {} stuff: flags: [] repos: @@ -43,7 +44,6 @@ categories: flags: - Clone - Push - empty: {} links: - name: gg rx: /home/ces/.config/gg diff --git a/src/utils/strings.rs b/src/utils/strings.rs index 75d7bba..d0d831f 100644 --- a/src/utils/strings.rs +++ b/src/utils/strings.rs @@ -46,6 +46,14 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. "; +pub const INTERACTIVE_COC: &str = "\ +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, nationality, personal appearance, race, religion, or sexual identity +and orientation. For more, see http://contributor-covenant.org/version/1/4"; + /// Contains the message for quick commit subcommand pub const QUICK_COMMIT: &str = "git: quick commit";