Skip to content

Add --project-key CLI option to usethis show sonarqube#1487

Merged
nathanjmcdougall merged 2 commits into
mainfrom
copilot/add-sonar-project-key-cli-option
Mar 25, 2026
Merged

Add --project-key CLI option to usethis show sonarqube#1487
nathanjmcdougall merged 2 commits into
mainfrom
copilot/add-sonar-project-key-cli-option

Conversation

Copilot AI commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Allow the SonarQube project key to be provided via --project-key on the CLI, rather than requiring it in pyproject.toml.

usethis show sonarqube --project-key my-org_my-project
  • CLI layer (_ui/interface/show.py): Added project_key_opt and wired it through the sonarqube command
  • Core layer (_core/show.py): Threaded optional project_key kwarg to get_sonar_project_properties
  • Integration layer (_integrations/sonarqube/config.py): When project_key is provided, validate and use it directly; otherwise fall back to reading from tool.usethis.sonarqube.project-key in pyproject.toml
  • Tests: CLI-level and integration-level coverage for basic usage, pyproject override, and invalid key rejection
Original prompt

This section details on the original issue you should resolve

<issue_title>Support SONAR_PROJECT_KEY being provided by CLI option to usethis show sonarqube</issue_title>
<issue_description>Similar to #929

The CLI option would be --project-key.</issue_description>

Comments on the Issue (you are @copilot in this section)


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Add support for SONAR_PROJECT_KEY in usethis show sonarqube Add --project-key CLI option to usethis show sonarqube Mar 24, 2026
Copilot AI requested a review from nathanjmcdougall March 24, 2026 23:15
@codecov

codecov Bot commented Mar 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Mar 24, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 2 untouched benchmarks


Comparing copilot/add-sonar-project-key-cli-option (cc547ac) with main (81b8233)

Open in CodSpeed

@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review March 25, 2026 00:05
@nathanjmcdougall nathanjmcdougall merged commit baef774 into main Mar 25, 2026
20 checks passed
@nathanjmcdougall nathanjmcdougall deleted the copilot/add-sonar-project-key-cli-option branch March 25, 2026 00:05
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.

Support SONAR_PROJECT_KEY being provided by CLI option to usethis show sonarqube

2 participants