feat: require GitHub Discussions on all repos#53
Conversation
Elevate Discussions from optional community feature to required org standard. Add Discussions Configuration section defining required categories (Ideas, General) and automated ideation workflow integration. Promote has_discussions audit check from warning to error via REQUIRED_SETTINGS_BOOL. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 2 minutes and 1 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughConsolidates the repository Discussions check into the centralized boolean settings loop in Changes
Sequence Diagram(s)sequenceDiagram
participant Repo
participant Audit as Compliance Audit Script
participant Ecosys as Ecosystem Detector
participant CI_Check as Workflow Requirement Check
participant Workflow as feature-ideation.yml (CI)
participant Discussions as GitHub Discussions
Repo->>Audit: run compliance audit
Audit->>Ecosys: detect ecosystems (checks for _bmad/)
Ecosys-->>Audit: returns bmad-method (if present)
Audit->>CI_Check: require workflows conditional on ecosystem
CI_Check-->>Audit: missing feature-ideation.yml ? create finding
Audit->>Discussions: verify has_discussions via REQUIRED_SETTINGS_BOOL
Discussions-->>Audit: has_discussions=true/false
Note right of Audit: emits findings for missing settings/workflows
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the org standards to make GitHub Discussions mandatory across repositories and attempts to enforce that requirement via the automated compliance audit script.
Changes:
- Updates
standards/github-settings.mdto mark “Has Discussions” as required and adds a new “Discussions Configuration” section with required categories and setup guidance. - Updates
scripts/compliance-audit.shto includehas_discussions:trueinREQUIRED_SETTINGS_BOOLand removes the old standalone Discussions warning check.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| standards/github-settings.md | Documents Discussions as required and defines required categories + setup instructions. |
| scripts/compliance-audit.sh | Moves Discussions into the “required settings” list and removes the previous dedicated check. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/compliance-audit.sh`:
- Line 44: The entry "has_discussions:true:Discussions must be enabled for
ideation and community engagement" is being treated as a warning because the
code at the spot that assigns severities always uses the literal "warning";
update the boolean-rule severity logic so it parses/uses a specified severity
(or a severity map) instead of hardcoding "warning". Specifically, change the
part that currently forces "warning" for all boolean settings to read a severity
token (or consult a map) for the rule string (the "has_discussions:..." rule)
and ensure "has_discussions" is emitted as "error" when configured accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8f719cae-7be4-4187-be37-0a4490dbb447
📒 Files selected for processing (2)
scripts/compliance-audit.shstandards/github-settings.md
Add bmad-method ecosystem detection (looks for _bmad/ directory) and conditionally require feature-ideation.yml workflow. Add CI Standards section 8 documenting the conditional workflow. Update ecosystem table in github-settings.md to include bmad-method. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
scripts/compliance-audit.sh (1)
44-44:⚠️ Potential issue | 🟠 Major
has_discussionsis still non-blocking in audit results.Adding this key to
REQUIRED_SETTINGS_BOOLdoes not make it required in practice because the boolean loop still emits"warning"for all keys. This keeps Discussions as advisory instead of enforced.Proposed fix
REQUIRED_SETTINGS_BOOL=( - "allow_auto_merge:true:Allow auto-merge must be enabled for Dependabot workflow" - "delete_branch_on_merge:true:Automatically delete head branches must be enabled" - "has_wiki:false:Wiki should be disabled — documentation lives in the repo" - "has_issues:true:Issue tracking must be enabled" - "has_discussions:true:Discussions must be enabled for ideation and community engagement" + "allow_auto_merge:true:warning:Allow auto-merge must be enabled for Dependabot workflow" + "delete_branch_on_merge:true:warning:Automatically delete head branches must be enabled" + "has_wiki:false:warning:Wiki should be disabled — documentation lives in the repo" + "has_issues:true:warning:Issue tracking must be enabled" + "has_discussions:true:error:Discussions must be enabled for ideation and community engagement" ) @@ - IFS=':' read -r key expected detail <<< "$entry" + IFS=':' read -r key expected severity detail <<< "$entry" @@ - add_finding "$repo" "settings" "$key" "warning" \ + add_finding "$repo" "settings" "$key" "$severity" \ "$detail (current: \`$actual\`, expected: \`$expected\`)" \ "standards/github-settings.md#repository-settings--standard-defaults"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/compliance-audit.sh` at line 44, The audit currently treats all keys in REQUIRED_SETTINGS_BOOL as non-blocking because the boolean-check loop always emits "warning"; update the loop in scripts/compliance-audit.sh that processes REQUIRED_SETTINGS_BOOL so that when a required key (e.g., "has_discussions") is missing/false it emits an error and causes the script to fail (non-zero exit) instead of only logging a warning; implement this by detecting required keys inside that loop (or maintain a separate REQUIRED_SETTINGS_BOOL_REQUIRED list) and calling the error path/exit when the check fails for those keys, ensuring "has_discussions" becomes enforced rather than advisory.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/compliance-audit.sh`:
- Around line 147-153: The check for bmad-method repos currently calls
add_finding("$repo","ci-workflows","missing-feature-ideation.yml","warning",...)
which emits a warning but should be an error per the "conditional-required"
policy; change the severity argument from "warning" to "error" in the
add_finding call that references feature-ideation.yml (inside the conditional
that checks ECOSYSTEMS and the gh_api for
.github/workflows/feature-ideation.yml) so the finding is emitted as an error.
In `@standards/github-settings.md`:
- Around line 74-80: The sentence in standards/github-settings.md weakens a
required rule by using "SHOULD" for BMAD repos; change the wording to "MUST" so
repositories with the BMAD Method (`_bmad/` directory) are required to have the
`feature-ideation.yml` workflow (which uses the Ideas category and creates
Discussions per proposal), and update any adjacent text or references (e.g., CI
Standards § Feature Ideation) to remain consistent with the stronger "MUST"
requirement.
---
Duplicate comments:
In `@scripts/compliance-audit.sh`:
- Line 44: The audit currently treats all keys in REQUIRED_SETTINGS_BOOL as
non-blocking because the boolean-check loop always emits "warning"; update the
loop in scripts/compliance-audit.sh that processes REQUIRED_SETTINGS_BOOL so
that when a required key (e.g., "has_discussions") is missing/false it emits an
error and causes the script to fail (non-zero exit) instead of only logging a
warning; implement this by detecting required keys inside that loop (or maintain
a separate REQUIRED_SETTINGS_BOOL_REQUIRED list) and calling the error path/exit
when the check fails for those keys, ensuring "has_discussions" becomes enforced
rather than advisory.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: b7b1d70d-0b4d-443c-a82e-0c338dc5cbea
📒 Files selected for processing (3)
scripts/compliance-audit.shstandards/ci-standards.mdstandards/github-settings.md
- Extend REQUIRED_SETTINGS_BOOL tuple format to include per-entry severity (key:expected:severity:detail) instead of hardcoding all as warning - Set has_discussions and has_issues to error severity; others remain warning - Change feature-ideation.yml finding from warning to error for BMAD repos - Change SHOULD to MUST for BMAD ideation workflow requirement in standards Addresses CodeRabbit and Copilot review comments on PR #53. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|



Summary
github-settings.mdwith required categories (Ideas, General) and setup instructionshas_discussionscompliance audit check fromwarningtoerrorby moving it intoREQUIRED_SETTINGS_BOOLChanges
standards/github-settings.mdscripts/compliance-audit.shhas_discussions:truetoREQUIRED_SETTINGS_BOOL(error-level enforcement)Context
This standard supports the new Feature Research & Ideation workflow which uses the Ideas discussion category to post and maintain per-idea feature proposal threads. Requiring Discussions org-wide ensures all repos are ready for this pattern.
Current compliance status
All repos except
.githubcurrently havehas_discussions: false— this PR will surface those as errors in the next audit run, prompting remediation.Test plan
github-settings.mdrenders correctly with new section and cross-referencecompliance-audit.shagainst a repo with discussions disabled — confirm it produces an error (not warning)🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
New Features