Skip to content

fix: match github cortex mentions case-insensitively#410

Open
nijanthanvijayakumar wants to merge 2 commits into
CortexLM:mainfrom
nijanthanvijayakumar:fix/github-mention-case
Open

fix: match github cortex mentions case-insensitively#410
nijanthanvijayakumar wants to merge 2 commits into
CortexLM:mainfrom
nijanthanvijayakumar:fix/github-mention-case

Conversation

@nijanthanvijayakumar
Copy link
Copy Markdown

@nijanthanvijayakumar nijanthanvijayakumar commented May 21, 2026

Summary

  • make GitHub comment trigger matching case-insensitive for @Cortex and /Cortex
  • normalize parsed GitHub commands so @Cortex Fix maps to fix
  • fix the existing agent test helper import so focused CLI tests compile

Bounty issue: PlatformNetwork/bounty-challenge#44439

Validation

  • cargo fmt --package cortex-cli --check
  • cargo test -p cortex-cli github_cmd::tests -- --nocapture
  • cargo check -p cortex-cli --lib
  • git diff --check
  • Docker Desktop:
    docker run --rm -v "$PWD":/work -w /work -e CARGO_TARGET_DIR=/tmp/cortex-target rust:1.95-bookworm bash -c 'export PATH=/usr/local/cargo/bin:$PATH; apt-get update && apt-get install -y pkg-config libasound2-dev && rustup component add rustfmt && cargo fmt --package cortex-cli --check && cargo test -p cortex-cli github_cmd::tests -- --nocapture'

Screenshots / proof

Docker result:

running 6 tests
test github_cmd::tests::test_get_help_message ... ok
test github_cmd::tests::test_parse_cortex_command ... ok
test github_cmd::tests::test_contains_cortex_trigger_case_insensitive ... ok
test github_cmd::tests::test_install_validates_path_is_directory ... ok
test github_cmd::tests::test_install_accepts_valid_directory ... ok
test github_cmd::tests::test_install_validates_path_exists ... ok

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 975 filtered out

Notes

  • Contributing guide checked: docs/CONTRIBUTING.md
  • PR title uses the repo's fix: convention
  • Branch has two focused commits

Import the shared file helper directly so cortex-cli tests compile on main.
Normalize github command triggers so mixed-case @cortex and /Cortex comments are parsed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant