Skip to content

BUILD-11718: reach 100% code coverage on config-poetry - #318

Merged
hedinasr merged 2 commits into
masterfrom
bugfix/hnasr/BUILD-11718-config-poetry-coverage
Jul 13, 2026
Merged

BUILD-11718: reach 100% code coverage on config-poetry#318
hedinasr merged 2 commits into
masterfrom
bugfix/hnasr/BUILD-11718-config-poetry-coverage

Conversation

@hedinasr

@hedinasr hedinasr commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add config-poetry to sonar-project.properties so SonarCloud tracks coverage for the extracted action scripts
  • Extend spec/config-poetry_spec.sh to cover previously untested paths in poetry_set_project_version.sh:
    • sourcing guard and main() entrypoint
    • provided CURRENT_VERSION / PROJECT_VERSION shortcut
    • GITHUB_OUTPUT and GITHUB_ENV writes
    • missing JFrog config removal (jf config remove) and Poetry credential export in configure_poetry_repox()

JIRA: https://sonarsource.atlassian.net/browse/BUILD-11718

Test plan

  • shellspec spec/config-poetry_spec.sh passes locally (15 examples)
  • CI Test Shell Scripts workflow passes and SonarCloud reports 100% coverage on config-poetry

@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Jul 9, 2026

Copy link
Copy Markdown

BUILD-11718

@hedinasr
hedinasr marked this pull request as ready for review July 10, 2026 13:12
@hedinasr
hedinasr requested a review from a team as a code owner July 10, 2026 13:12
Copilot AI review requested due to automatic review settings July 10, 2026 13:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to bring config-poetry to 100% code coverage by ensuring SonarCloud tracks the extracted action scripts and by extending ShellSpec coverage for previously untested branches in the config-poetry scripts.

Changes:

  • Add config-poetry to sonar.sources so SonarCloud includes it in analysis and coverage tracking.
  • Extend spec/config-poetry_spec.sh with new examples covering env/output writes, error-tolerant JFrog config removal, sourcing guards, and main() execution paths.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
spec/config-poetry_spec.sh Adds ShellSpec examples to cover additional branches in configure_poetry_repox and poetry_set_project_version (including main() and environment/output writes).
sonar-project.properties Adds config-poetry to SonarCloud’s sonar.sources list so coverage is tracked for that directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread spec/config-poetry_spec.sh
Comment thread spec/config-poetry_spec.sh
hedinasr and others added 2 commits July 10, 2026 15:29
Add config-poetry to Sonar sources and extend ShellSpec tests to cover
poetry_set_project_version sourcing, main(), provided versions, and
GITHUB_ENV/GITHUB_OUTPUT writes.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@hedinasr
hedinasr force-pushed the bugfix/hnasr/BUILD-11718-config-poetry-coverage branch from 53ef8fc to d471feb Compare July 10, 2026 13:29
@sonarqubecloud

Copy link
Copy Markdown

@hedinasr
hedinasr merged commit dbb7515 into master Jul 13, 2026
17 checks passed
@hedinasr
hedinasr deleted the bugfix/hnasr/BUILD-11718-config-poetry-coverage branch July 13, 2026 08:15
@gitar-bot

gitar-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Integration of config-poetry into sonar-project.properties and expanded test coverage for entrypoint, output writes, and JFrog configuration logic ensures 100% code coverage. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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.

3 participants