feat(#2610): add github actions output notification provider for drift#2627
Open
Mallikarjunadevops wants to merge 1 commit intodiggerhq:developfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
drift-detection-github-action-outputboolean configuration parameter toaction.yml.GithubActionOutputNotificationimplementation mirroring thecore_drift.Notificationinterface design.driftMessage) write correctly to$GITHUB_OUTPUTwithout terminating the step boundary.BasicandAdvancedproviders to detectINPUT_DRIFT_DETECTION_GITHUB_ACTION_OUTPUTsecurely and override behavior prior to faulting back to the configuration error string.Testing
cli/pkg/drift/testing coverage by mocking out$GITHUB_OUTPUTto a temporary directory payload buffer.<<EOFboundary string injection and format logic natively via the newgithub_action_test.gosuite to guarantee pipeline host safety.Disclosure: I consulted with an AI assistant to verify GitHub Actions output delimiter formats and scaffold the unit tests for this functionality.