Skip to main content

PR Review and Authorship

frugally.app participates in pull request reviews by posting cost-impact comments on infrastructure changes. It also tracks infrastructure authorship — who changed what — for cost attribution and audit purposes.


PR cost-impact reviews

When a PR modifies Infrastructure-as-Code files, frugally.app automatically posts a review comment summarising the cost impact. This is powered by IaC Scanning and gives reviewers immediate visibility into the financial implications of the change.

What the review comment contains

SectionContent
Cost summaryTotal estimated monthly cost change (increase, decrease, or neutral)
Resource breakdownPer-resource cost changes (new, modified, or removed)
Current vs proposedSide-by-side comparison of current and proposed monthly costs
ConfidenceHow confident the estimate is based on available data

[SCREENSHOT: github-pr-review-comment.png -- Cost-impact review comment on a PR]

Review comment behaviour

SettingOptions
When to commentEvery PR with IaC changes (default), only when cost increases, or only above a threshold
Comment styleSummary only, or summary with per-resource breakdown
Update on pushUpdate the existing comment when new commits are pushed (default) or post a new comment

Configure at Settings > GitHub > PR Reviews.


Inline annotations

In addition to the summary comment, frugally.app can post inline review annotations on specific lines of code:

Annotation typeWhen it appears
Cost increaseA line that adds or modifies a resource, increasing cost
Cost decreaseA line that removes or downsizes a resource, decreasing cost
Cost warningA line that changes an expensive resource type or region
Best practiceA suggestion for a more cost-effective configuration

Inline annotations appear in the GitHub PR "Files changed" tab, directly on the relevant lines.

tip

Inline annotations help reviewers understand the cost impact of specific changes without reading the full summary. They are especially useful in large PRs with many resource changes.


Authorship tracking

frugally.app tracks who creates, modifies, and deletes infrastructure resources through pull requests. This data feeds into Guard's Cost Attribution to help answer "who is responsible for this cost?"

What is tracked

Data pointSource
AuthorThe PR author (mapped to a frugally.app user via GitHub username)
TimestampWhen the PR was merged
Resources affectedWhich AWS resources were created, modified, or deleted
Cost impactThe estimated cost change from the PR
Repository and fileWhere the change was made

How authorship data is used

FeatureHow it uses authorship
Cost AttributionAttributes resource costs to the team or user who created them
Guard ProjectsLinks infrastructure changes back to the PR and author
Resource HistoryShows the PR that introduced or modified a resource in Resource History
Executive DashboardAggregates cost-impact data by team and individual

Configuring review behaviour

Navigate to Settings > GitHub > PR Reviews:

SettingDescriptionDefault
Enable PR reviewsPost cost-impact comments on PRsEnabled
Enable inline annotationsPost inline code annotationsEnabled
Comment thresholdMinimum cost change to trigger a comment$0 (always comment)
Track authorshipRecord who changed which resourcesEnabled
Map GitHub usersMap GitHub usernames to frugally.app usersAuto-mapped by email

User mapping

frugally.app maps GitHub users to frugally.app users by matching email addresses. If a GitHub user's email does not match any frugally.app user:

  • Authorship is recorded with the GitHub username
  • Cost attribution falls back to the repository or team level
  • You can manually map users at Settings > GitHub > User Mapping

Requiring cost review

To ensure every infrastructure PR is cost-reviewed before merging:

  1. Add the frugally.app check as a required status check in your branch protection rules
  2. Set a cost increase threshold that fails the check (in IaC Scanning settings)
  3. Optionally, require a Guard Project approval for PRs above a certain cost threshold

This creates a workflow where infrastructure changes cannot be merged without cost visibility and, for high-cost changes, without formal approval.