Skip to content

demo: test check_db_entities workflow (do not merge)#2715

Closed
xsahil03x wants to merge 2 commits into
fix/ci-check-db-entities-fork-permsfrom
demo/test-check-db-entities-workflow
Closed

demo: test check_db_entities workflow (do not merge)#2715
xsahil03x wants to merge 2 commits into
fix/ci-check-db-entities-fork-permsfrom
demo/test-check-db-entities-workflow

Conversation

@xsahil03x
Copy link
Copy Markdown
Member

Purpose

Same-repo demo PR to smoke-test the updated check_db_entities workflow from #2714. Targets the fix branch directly so the workflow file with the new logic is what runs.

Do not merge. Close after verification.

What this validates

  • Workflow runs without error under pull_request_target
  • New diff strategy (fetch PR head SHA, git diff base...pr_head) correctly identifies the modified entity file
  • Concurrency key is unique per PR
  • Bot comment is posted

What this does NOT validate

  • The actual fork-token fix. Same-repo PRs always had write tokens under pull_request, so this can't reproduce the original 403. Only a real fork PR can validate that side of the change.

Expected behaviour

The bot should post a "Database Entity Files Modified" comment listing packages/stream_chat_persistence/lib/src/entity/channels.dart.

🤖 Generated with Claude Code

xsahil03x and others added 2 commits June 3, 2026 12:16
The check_db_entities workflow used `on: pull_request`, which gives
GITHUB_TOKEN read-only perms on fork PRs and made
peter-evans/create-or-update-comment fail with HTTP 403.

Switch to pull_request_target with least-privilege permissions
(contents: read, pull-requests: write). Avoid the usual
pull_request_target footgun by never checking out the PR head into a
working tree: fetch the PR head SHA as a ref and diff between SHAs,
so attacker-controlled file contents never reach checkout/smudge
filters/hooks while the write token is in scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Trivial comment change in channels.dart to exercise the new
pull_request_target-based workflow. Do not merge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a0b948ac-1258-4d42-8690-04f7c2d4de0c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch demo/test-check-db-entities-workflow

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 and usage tips.

@xsahil03x xsahil03x force-pushed the fix/ci-check-db-entities-fork-perms branch from 73a780b to 4aea8bc Compare June 3, 2026 10:30
@xsahil03x xsahil03x closed this Jun 3, 2026
@xsahil03x xsahil03x deleted the demo/test-check-db-entities-workflow branch June 3, 2026 10:31
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.64%. Comparing base (093743a) to head (2650ad6).
⚠️ Report is 1 commits behind head on fix/ci-check-db-entities-fork-perms.

Additional details and impacted files
@@                         Coverage Diff                          @@
##           fix/ci-check-db-entities-fork-perms    #2715   +/-   ##
====================================================================
  Coverage                                65.64%   65.64%           
====================================================================
  Files                                      423      423           
  Lines                                    26708    26708           
====================================================================
  Hits                                     17533    17533           
  Misses                                    9175     9175           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant