infracost_comment
Post cost estimate comments to pull requests on GitHub, GitLab, Azure Repos, or Bitbucket. Automatically updates existing comments to provide infrastructure cost visibility during code review.
Instructions
Post cost estimate comments to pull requests on GitHub, GitLab, Azure Repos, or Bitbucket. Automatically updates existing comments. Requires infracost CLI to be installed and appropriate platform credentials.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to Infracost JSON file | |
| platform | Yes | Git platform | |
| repo | No | Repository in format owner/repo | |
| pullRequest | No | Pull request number | |
| commit | No | Commit SHA to associate comment with | |
| tag | No | Tag for comment identification | |
| behavior | No | How to handle existing comments (default: update) |
Input Schema (JSON Schema)
{
"properties": {
"behavior": {
"description": "How to handle existing comments (default: update)",
"enum": [
"update",
"new",
"delete-and-new"
],
"type": "string"
},
"commit": {
"description": "Commit SHA to associate comment with",
"type": "string"
},
"path": {
"description": "Path to Infracost JSON file",
"type": "string"
},
"platform": {
"description": "Git platform",
"enum": [
"github",
"gitlab",
"azure-repos",
"bitbucket"
],
"type": "string"
},
"pullRequest": {
"description": "Pull request number",
"type": "string"
},
"repo": {
"description": "Repository in format owner/repo",
"type": "string"
},
"tag": {
"description": "Tag for comment identification",
"type": "string"
}
},
"required": [
"path",
"platform"
],
"type": "object"
}