Body
application/json
Repository identifier (format varies by service)
Example:
"owner/repository"
Git commit SHA or identifier
Example:
"abc123def456"
Authentication token for the service
Example:
"ghp_xxxxxxxxxxxx"
Version control service provider
Available options:
github, azuredevops, gitlab, bitbucket Example:
"github"
Base URL for the service (optional for GitHub, required for GitLab)
Example:
"https://gitlab.com"
Response
Anti-patterns results retrieved successfully
Anti-patterns response containing detected code smells and anti-patterns
Anti-patterns analysis results organized by file path
Example:
{
"owner/repository/abc123def456/src/utils.py/anti_patterns.json": [
{
"line_number": 42,
"endLine": null,
"issue_text": "TODO: Implement timeout for requests",
"type": "CODE_SMELL",
"message-id": "W0511",
"fixAvailable": false,
"symbol": "fixme",
"column": 9,
"endColumn": null,
"severity": "Minor",
"context_code_block": "def fetch_data(url):\n headers = {\"Authorization\": f\"Bearer {token}\"}\n # TODO: Implement timeout for requests\n response = requests.get(url, headers=headers)\n if response.status_code == 200:\n return response.json()\n return None"
}
]
}