Skip to content

Conversation

@fernandosantos-br
Copy link
Collaborator

  • Added new attributes to GitInfo for commit SHA, remote URL, and repository validation.
  • Implemented methods to parse repository URLs and set up GitHub authentication.
  • Enhanced error handling for invalid Git repositories and fetch operations.
  • Improved logic for determining current and base references from CI/CD environments.
  • Added support for fetching base references from CircleCI using GitHub API.
  • Introduced fallback mechanism for base references and improved logging throughout.

- Added new attributes to GitInfo for commit SHA, remote URL, and repository validation.
- Implemented methods to parse repository URLs and set up GitHub authentication.
- Enhanced error handling for invalid Git repositories and fetch operations.
- Improved logic for determining current and base references from CI/CD environments.
- Added support for fetching base references from CircleCI using GitHub API.
- Introduced fallback mechanism for base references and improved logging throughout.
Copilot AI review requested due to automatic review settings July 23, 2025 23:55
Copy link

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 enhances the GitUtils class with improved repository information handling and CI/CD environment support. The changes focus on making Git operations more robust, adding better error handling, and expanding support for different CI/CD platforms like CircleCI.

  • Improved repository URL parsing with support for SSH and HTTPS formats
  • Enhanced CI/CD environment detection including CircleCI support with GitHub API integration
  • Added comprehensive error handling and authentication management with proper URL restoration
Comments suppressed due to low confidence (1)

src/codeql_wrapper/infrastructure/git_utils.py:484

  • [nitpick] The timeout value of 10 seconds may be too short for API calls in slow network conditions. Consider using a configurable timeout or increasing to 30 seconds.
            with urllib.request.urlopen(request, timeout=10) as response:

fernandosantos-br and others added 5 commits July 23, 2025 20:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@fernandosantos-br fernandosantos-br merged commit 88c452c into main Jul 24, 2025
5 checks passed
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