Skip to content

feat(#2610): add github actions output notification provider for drift#2627

Open
Mallikarjunadevops wants to merge 1 commit intodiggerhq:developfrom
Mallikarjunadevops:feature/issue-2610-github-action-outputs-drift
Open

feat(#2610): add github actions output notification provider for drift#2627
Mallikarjunadevops wants to merge 1 commit intodiggerhq:developfrom
Mallikarjunadevops:feature/issue-2610-github-action-outputs-drift

Conversation

@Mallikarjunadevops
Copy link
Copy Markdown

Resolves #2610.
Historically, Digger restricted Drift Detection notifications to either Slack webhooks or GitHub Issues. This Pull Request implements a new native provider to export drift detection results strictly as standard GitHub Actions Outputs ($GITHUB_OUTPUT), allowing downstream CI pipeline steps to securely process the raw results via environment variables.

How

  • Added the drift-detection-github-action-output boolean configuration parameter to action.yml.
  • Created a GithubActionOutputNotification implementation mirroring the core_drift.Notification interface design.
  • Implemented cryptographically-secure randomized 16-byte encoded delimiters to ensure that Terraform's multi-line diffs (driftMessage) write correctly to $GITHUB_OUTPUT without terminating the step boundary.
  • Upgraded the Basic and Advanced providers to detect INPUT_DRIFT_DETECTION_GITHUB_ACTION_OUTPUT securely and override behavior prior to faulting back to the configuration error string.

Testing

  • Extended cli/pkg/drift/ testing coverage by mocking out $GITHUB_OUTPUT to a temporary directory payload buffer.
  • Verified correct multi-line <<EOF boundary string injection and format logic natively via the new github_action_test.go suite to guarantee pipeline host safety.
  • Handled backwards compatibility perfectly; the string mapping ignores legacy configurations organically.

Disclosure: I consulted with an AI assistant to verify GitHub Actions output delimiter formats and scaffold the unit tests for this functionality.

_ reviewed , tested and verified manually._

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to export drift notification data as GitHub Workflow outputs instead of Slack or GitHub issues.

1 participant