Add fail_on_generated_edits helper#16
Merged
Merged
Conversation
Dormant helper (not auto-invoked): repos call it after import_dangerfile with the
generated file/dir path(s) to fail PRs that hand-edit generated files, bypassed by the
pr:auto_codegen label. Used by purchases-{js,android,ios} for their error-code files.
29b73a2 to
e8e6c5f
Compare
This was referenced Jun 15, 2026
AlvaroBrey
added a commit
to RevenueCat/purchases-js
that referenced
this pull request
Jun 15, 2026
- Adds a Danger check to prevent modification of autogenerated files from [purchases-error-codes](https://github.com/RevenueCat/purchases-error-codes). Calls a function defined in [RevenueCat/Dangerfile](RevenueCat/Dangerfile#16) - Bumps the [shared orb](RevenueCat/sdks-circleci-orb#68) to get the proper labels on the generated PRs <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > CI and Danger policy only; no runtime SDK or auth/data behavior changes. > > **Overview** > Adds a **Danger** guard that fails PRs that touch files under `src/generated/` (e.g. autogenerated `error-codes.ts` from purchases-error-codes), using the shared `fail_on_generated_edits` helper from **RevenueCat/Dangerfile**. > > Bumps the **sdks-common-config** CircleCI orb from `3.21.0` to `3.21.1` so automated `update_error_codes` PRs get the correct labels. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 680579e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
Adds a helper that will be called from codegen consumer repos to prevent modification of generated files