Control via git.diff on File Content

Requesting support for performing a git.diff on file content within push and/or trigger policy contexts, to enable conditional evaluation of PR and tracked runs based on the nature of the changes β€” especially at the field or line level.

As it stands:

  • Trigger and push policies currently provide access to lists of changed files, but not necessarily to the diff contents themselves in a structured, queryable form.

  • This makes it difficult to implement fine-grained policies that inspect how a file has changed β€” not just which file has changed.

  • For example, changing a description field in a .tf file is low risk, but modifying IAM permissions or backend configurations is high risk and should trigger different enforcement.

Proposed Solution

Enhance policy contexts (ideally both push and trigger, or at least push) to expose:

  • A structured version of git.diff, with access to file content diffs (not just file names).

  • The ability to inspect added, removed, or modified lines within files.

Workaround
-
Problem
-

Please authenticate to join the conversation.

Upvoters
Status

πŸ‘€ In Review

Board

πŸ’‘ Feature Requests

Tags

Policies

Date

7 months ago

Subscribe to post

Get notified by email when there are changes.