Skip to content

feat: require GitHub Discussions on all repos#53

Merged
don-petry merged 3 commits intomainfrom
feat/discussions-standard
Apr 6, 2026
Merged

feat: require GitHub Discussions on all repos#53
don-petry merged 3 commits intomainfrom
feat/discussions-standard

Conversation

@don-petry
Copy link
Copy Markdown
Contributor

@don-petry don-petry commented Apr 6, 2026

Summary

  • Elevates GitHub Discussions from an optional setting to a required org standard
  • Adds a new Discussions Configuration section to github-settings.md with required categories (Ideas, General) and setup instructions
  • Promotes has_discussions compliance audit check from warning to error by moving it into REQUIRED_SETTINGS_BOOL
  • Documents the automated ideation workflow integration that uses the Ideas category

Changes

standards/github-settings.md

  • Updated Has Discussions row to mark as Required with cross-reference to new section
  • Added Discussions Configuration section with required categories, automated ideation workflow reference, and setup instructions

scripts/compliance-audit.sh

  • Added has_discussions:true to REQUIRED_SETTINGS_BOOL (error-level enforcement)
  • Removed redundant standalone warning-level discussions check

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 .github currently have has_discussions: false — this PR will surface those as errors in the next audit run, prompting remediation.

Test plan

  • Verify github-settings.md renders correctly with new section and cross-reference
  • Run compliance-audit.sh against a repo with discussions disabled — confirm it produces an error (not warning)
  • Run against a repo with discussions enabled — confirm no finding
  • Enable Discussions on all org repos and verify audit passes clean

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Require GitHub Discussions on all repositories; add setup guidance and two required categories: "Ideas" and "General".
    • Add ecosystem-specific guidance linking the BMAD Method to an ideation workflow and required permissions/secrets.
  • New Features

    • Repositories are now evaluated for Discussions and for BMAD Method classification; BMAD repos are expected to include an ideation workflow that posts weekly to the "Ideas" category.

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>
Copilot AI review requested due to automatic review settings April 6, 2026 03:06
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 1 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: af806988-0adc-4982-bd72-a45f19e5e0f0

📥 Commits

Reviewing files that changed from the base of the PR and between accd91d and ad03f14.

📒 Files selected for processing (2)
  • scripts/compliance-audit.sh
  • standards/github-settings.md
📝 Walkthrough

Walkthrough

Consolidates the repository Discussions check into the centralized boolean settings loop in scripts/compliance-audit.sh, adds BMAD Method ecosystem detection, and requires a feature-ideation.yml workflow for BMAD repos. Documentation updates require Discussions, specify categories, and add a BMAD conditional workflow spec.

Changes

Cohort / File(s) Summary
Compliance script
scripts/compliance-audit.sh
Added has_discussions to REQUIRED_SETTINGS_BOOL; removed the standalone check_repo_settings() discussions check; extended detect_ecosystems() to recognize _bmad/bmad-method; updated check_required_workflows() to require .github/workflows/feature-ideation.yml for bmad-method repos and emit ci-workflows: missing-feature-ideation.yml.
Repository settings standard
standards/github-settings.md
Marked Discussions as required; added a Discussions Configuration section requiring “Ideas” and “General” categories, described formatting and workflow integration for BMAD, and documented setup steps (including GraphQL/UI caveat).
CI standards
standards/ci-standards.md
Added “Conditional Workflows” entry for a BMAD feature-ideation.yml workflow: detection condition (_bmad/), weekly schedule, inputs/permissions/secrets, and prerequisite that the “Ideas” discussion category exists.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: require GitHub Discussions on all repos' clearly summarizes the main objective of the changeset: making GitHub Discussions a required standard across repositories.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/discussions-standard

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.md to mark “Has Discussions” as required and adds a new “Discussions Configuration” section with required categories and setup guidance.
  • Updates scripts/compliance-audit.sh to include has_discussions:true in REQUIRED_SETTINGS_BOOL and 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.

Comment thread scripts/compliance-audit.sh Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 42966c3 and 55fa346.

📒 Files selected for processing (2)
  • scripts/compliance-audit.sh
  • standards/github-settings.md

Comment thread scripts/compliance-audit.sh Outdated
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>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
scripts/compliance-audit.sh (1)

44-44: ⚠️ Potential issue | 🟠 Major

has_discussions is still non-blocking in audit results.

Adding this key to REQUIRED_SETTINGS_BOOL does 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

📥 Commits

Reviewing files that changed from the base of the PR and between 55fa346 and accd91d.

📒 Files selected for processing (3)
  • scripts/compliance-audit.sh
  • standards/ci-standards.md
  • standards/github-settings.md

Comment thread scripts/compliance-audit.sh
Comment thread standards/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>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 6, 2026

@don-petry don-petry merged commit e1cf1d8 into main Apr 6, 2026
18 checks passed
@don-petry don-petry deleted the feat/discussions-standard branch April 6, 2026 03:26
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.

2 participants