Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

Description

Sonar requires full git history for proper analysis. Shallow clones cause warnings and incomplete scans.

Added fetch-depth: 0 to the checkout step in .github/workflows/maven_push.yml. Merged with main branch to incorporate the latest workflow updates including checkout action upgrade to v5 and cache-dependency-path configuration.

Final configuration:

- uses: actions/checkout@v5
  with:
    fetch-depth: 0

The merge with main also brought in improvements to Maven caching configuration.

Resolves #397

Checklist:

  • Public methods are documented
  • Public methods are tested
  • New and existing tests pass when run locally
  • There are no new warnings or errors
Original prompt

This section details on the original issue you should resolve

<issue_title>[Chore]: Update maven_push.yml for Sonar - disable shallow clone</issue_title>
<issue_description>### What

Amend .github/workflows/maven_push.yml so that 'actions/checkout' uses 'fetch-depth: 0', allowing Sonar to analyze full git history. Do not change any other workflow.

Why

Sonar requires full commit history to work correctly. Shallow clones with limited depth cause warnings and incomplete analysis.

Notes

The log warning was seen during Sonar scan. Only update the checkout step in maven_push.yml.</issue_description>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
Copilot AI changed the title [WIP] Update maven_push.yml to disable shallow clone for Sonar Disable shallow clone in maven_push.yml for Sonar analysis Nov 19, 2025
Copilot AI requested a review from thomasturrell November 19, 2025 13:00
@thomasturrell thomasturrell marked this pull request as ready for review November 19, 2025 13:02
Copilot AI review requested due to automatic review settings November 19, 2025 13:02
@thomasturrell
Copy link
Contributor

@copilot please rebase with main and resolve conflicts

Copy link
Contributor

Copilot AI left a comment

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 disables shallow cloning in the maven_push.yml workflow to enable proper Sonar analysis by providing full git history access.

  • Added fetch-depth: 0 to the checkout step in the maven_push workflow

Copilot AI and others added 2 commits November 19, 2025 13:10
Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 19, 2025

@copilot please rebase with main and resolve conflicts

Completed! Merged with main branch and resolved the conflict. The workflow now has:

  • actions/checkout@v5 (from main)
  • fetch-depth: 0 (for Sonar)
  • cache-dependency-path configuration (from main)

Commit: ac6da08

@sonarqubecloud
Copy link

Copilot AI requested a review from thomasturrell November 19, 2025 13:13
@thomasturrell thomasturrell merged commit e6c10e2 into main Nov 19, 2025
4 checks passed
@thomasturrell thomasturrell deleted the copilot/update-maven-push-yml branch November 19, 2025 13:15
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.

[Chore]: Update maven_push.yml for Sonar - disable shallow clone

2 participants