Skip to content

[W-22393676] code-analyzer-core | implement curl for the apex guru call#469

Closed
nikhil-mittal-165 wants to merge 3 commits into
feature/W-22393691-apexguru-insights-integrationfrom
feature/W-22393691-apexguru-curl-logging
Closed

[W-22393676] code-analyzer-core | implement curl for the apex guru call#469
nikhil-mittal-165 wants to merge 3 commits into
feature/W-22393691-apexguru-insights-integrationfrom
feature/W-22393691-apexguru-curl-logging

Conversation

@nikhil-mittal-165

Copy link
Copy Markdown
Contributor

Ticket

code-analyzer-core | implement curl for the apex guru call

Base Branch

feature/W-22393691-apexguru-insights-integration

Commits

  • de528e4 feat(apexguru-engine): add curl command generation utility
  • 42c6f20 test(apexguru-engine): add curl command integration tests

Design Rationale

This PR implements curl command generation functionality for ApexGuru API calls, enabling better visibility into the requests being made to the ApexGuru service. The utility generates properly formatted curl commands that can be used for debugging and logging purposes.

Test Evidence

  • npm test passed in apexguru-engine (58/58 tests, 4/4 suites)
  • npm test passed in core (437/437 tests, 15/15 suites)
  • All coverage thresholds met

Dependencies

Depends on: #468

nikhil-mittal-165 and others added 3 commits June 12, 2026 13:00
Add generateCurlCommand() private method to ApexGuruService that
constructs equivalent curl commands for API calls. This enables
debugging and documentation of the actual HTTP requests made to
ApexGuru endpoints with proper authentication headers and base64
encoding.

- Add generateCurlCommand() with support for GET and POST requests
- Include proper header formatting (Authorization, Content-Type)
- Escape single quotes in request body
- Handle uninitialized connection gracefully
- Add comprehensive unit tests for all curl generation scenarios
Add integration tests that verify generated curl commands are
executable and produce valid responses. Tests are skipped when
no authentication is available (SF_TARGET_ORG not set).

- Test validate endpoint curl execution
- Test submit endpoint curl execution with base64 content
- Test query endpoint curl execution with requestId
- Test graceful handling of uninitialized connection
- Integration tests timeout at 30 seconds
@git2gus

git2gus Bot commented Jun 12, 2026

Copy link
Copy Markdown

Git2Gus App is installed but the .git2gus/config.json doesn't have right values. You should add the required configuration.

@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Unfortunately we can't verify the commit author(s): claude-unleashed <c***@.local>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce Inc. Contributor License Agreement and this Pull Request will be revalidated.

@nikhil-mittal-165 nikhil-mittal-165 marked this pull request as ready for review June 12, 2026 07:36
@nikhil-mittal-165 nikhil-mittal-165 deleted the feature/W-22393691-apexguru-curl-logging branch June 12, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant