fix: use request environment for approval notifications #5551
Merged
x032205 merged 1 commit intoInfisical:mainfrom Feb 28, 2026
Merged
fix: use request environment for approval notifications #5551x032205 merged 1 commit intoInfisical:mainfrom
x032205 merged 1 commit intoInfisical:mainfrom
Conversation
Use the request's environment slug instead of the legacy policy.envId column, which always resolves to the same environment for multi-env policies.
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
Greptile SummaryFixes a bug where approval request notifications (Slack, email, etc.) displayed incorrect environment names for multi-environment policies. Since PR #4220, Changes:
This ensures notifications show the actual environment being modified, not just one of the environments covered by a multi-environment policy. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 68c5dcf |
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.
Context
Approval request notifications (Slack, etc) pull the environment name from
policy.envId, a column that doesn't represent multi-environment policies since #4220. For policies that span multiple environments, this column only ever points to one of them, so notifications end up saying one environment even when the requests are for different environments.Switched all three call sites to look up the environment from the request context instead.
Screenshots
N/A
Steps to verify the change
Type
Checklist