Skip to content

ci: exempt env templates from danger env protection rule - #1899

Merged
LucasSantana-Dev merged 1 commit into
mainfrom
ci/danger-env-template-exemption
Jul 27, 2026
Merged

LucasSantana-Dev merged 1 commit into
mainfrom
ci/danger-env-template-exemption

Conversation

@LucasSantana-Dev

@LucasSantana-Dev LucasSantana-Dev commented Jul 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

PR #1674 (external contributor) fails danger with no possible resolution: the .env* protection rule fires on .env.example, and its own message demands "explicit confirmation per project policy" but the code offers no confirmation mechanism. Any PR touching the tracked template fails forever.

Fix: exempt the standard template names (.env.example, .env.sample, .env.template) from the fail. Real .env files still fail.

Danger runs on pull_request_target against base-repo code, so once this merges, re-running danger on #1674 picks it up without a branch update.

Test plan


Summary by cubic

Exempts .env.example, .env.sample, and .env.template from the Danger .env* protection so template updates don’t fail CI, while still blocking real .env files. This unblocks PRs that touch tracked env templates (e.g., #1674).

  • Bug Fixes
    • Updated dangerfile.ts to ignore standard env templates in the .env* check.
    • The rule still fails on actual .env files.
    • Re-running Danger on affected PRs will pass.

Written for commit 0520fe5. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@LucasSantana-Dev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5e7f5239-90b7-4f7a-84f9-3ca5b3239951

📥 Commits

Reviewing files that changed from the base of the PR and between a424106 and 0520fe5.

📒 Files selected for processing (1)
  • dangerfile.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/danger-env-template-exemption

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@LucasSantana-Dev
LucasSantana-Dev enabled auto-merge (squash) July 27, 2026 19:49

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Auto-approved: This fix exempts tracked env templates from a CI protection rule that was incorrectly blocking them, while preserving the fail on real .env files. The change is narrow, clearly beneficial, and carries no operational or security tradeoff.

Re-trigger cubic

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 643e016 into main Jul 27, 2026
41 checks passed
@LucasSantana-Dev
LucasSantana-Dev deleted the ci/danger-env-template-exemption branch July 27, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant