fix: enabled open to community review for bot-authored PRs#2313
fix: enabled open to community review for bot-authored PRs#2313rayank906 wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe PR removes the author-type check from the label-sync logic so the ChangesCommunity Review Label Policy
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 3ca74046-96e4-4542-a691-2ace0a8f94ef
📒 Files selected for processing (2)
.github/scripts/review-sync/helpers/labels.js.github/scripts/review-sync/tests/test-labels.js
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/scripts/review-sync/tests/test-labels.js (1)
165-173: 🧹 Nitpick | 🔵 Trivial | 💤 Low valueConsider adding a symmetric test for human PRs with COMMUNITY_REVIEW already present.
The test suite covers bot PRs both with and without the
COMMUNITY_REVIEWlabel (lines 113-118 and 155-162), but only tests human PRs missing the label (line 165-171). Adding a test for a human PR that already hasqueue:junior-committerandCOMMUNITY_REVIEWwould improve symmetry and make the test coverage more explicit, even though it exercises the same code path as the bot test at line 113-118.🧪 Suggested additional test case
{ name: 'syncLabel: human PR receives community review label if missing', test: async () => { const mock = createMockGithub({ roles: {}, reviews: [] }); const pr = { number: 1, labels: [{ name: 'queue:junior-committer' }], head: { sha: '123' }, user: { type: 'User' } }; const changed = await syncLabel(mock, 'o', 'r', pr, false); return changed === true && mock.calls.labelsAdded.includes(COMMUNITY_REVIEW.name); }, }, + { + name: 'syncLabel: human PR with community review label already present → returns false', + test: async () => { + const mock = createMockGithub({ roles: {}, reviews: [] }); + const pr = { number: 1, labels: [{ name: 'queue:junior-committer' }, { name: COMMUNITY_REVIEW.name }], head: { sha: '123' }, user: { type: 'User' } }; + const changed = await syncLabel(mock, 'o', 'r', pr, false); + return changed === false && mock.calls.labelsAdded.length === 0; + }, + }, ];
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 82cfec31-9e7e-4ad4-8016-7f5668703937
📒 Files selected for processing (1)
.github/scripts/review-sync/tests/test-labels.js
|
Hi @rayank906 you need to fix your signing please, following the guide here https://github.com/hiero-ledger/sdk-collaboration-hub/tree/main/guides/issue-progression/for-developers |
Signed-off-by: Rayan Kamdem <rayankdm@umich.edu>
Signed-off-by: Rayan Kamdem <rayankdm@umich.edu>
|
Hi @exploreriii I have signed off commits and rewrote commit history. I believe it should be good now |
|
Please check the github official docs to upload your key, if you click here |
|
@exploreriii Thank you so much it now says verified. I hadn't added the new GPG key to Github. I have also clicked update branch. |
Description:
Enabled "open to community review" for bot-authored PRs.
Changes
needCommunityReviewlogic to allow community review for bot-authored PRs. Updated unit testssyncLabel: bot PR does NOT receive community review labelandsyncLabel: already correct, no stale → returns falselogics to expect the label to be added.Fixes #2272