Skip to content

Conversation

@TooAngel
Copy link
Contributor

@TooAngel TooAngel commented Nov 1, 2025

Summary

Implements automated enforcement of standard GitHub repository settings across all worlddriven organization repositories to ensure consistency and support the democratic merge workflow.

Changes

Standard Configuration Constants

  • STANDARD_REPO_SETTINGS: Enforces squash-only merge, branch cleanup, no auto-merge
  • STANDARD_BRANCH_RULESET: Requires PR, prevents force push and branch deletion

New Functions

  • createBranchProtectionRuleset(): Creates standard branch protection
  • updateRepositorySettings(): Updates repo settings to match standard
  • ensureStandardConfiguration(): Ensures existing repos have correct settings

Repository Creation

  • Updated createRepository() to use auto_init: true (creates initial README automatically)
  • Applies standard settings at creation time
  • Applies branch protection ruleset after creation

Existing Repository Enforcement

  • Added ensure-settings action type
  • Checks all existing repos and applies standard configuration
  • Updates merge settings and creates rulesets if missing

Reporting

  • Updated formatSyncReport() to show "Ensure settings" actions
  • Added summary count for settings enforcement

Configuration Enforced

Merge Settings:

  • ✅ Squash merge only (ensures 1 PR = 1 commit for fair voting)
  • ❌ Merge commits disabled
  • ❌ Rebase merge disabled
  • ✅ Delete branch after merge (keeps repository clean)
  • ❌ Auto-merge disabled (worlddriven bot handles merging)
  • ❌ Update branch disabled (prevents manipulation during voting)

Branch Protection:

  • ✅ Require pull request (enables democratic voting)
  • ✅ Prevent force push (protects contribution history for voting weights)
  • ✅ Prevent branch deletion (protects main branch)
  • ✅ 0 required reviews (worlddriven handles approval logic)
  • ✅ No bypass actors (true democracy - everyone participates)

Why This Matters

This standardization ensures:

  1. Fair Voting: Squash-only means 1 PR = 1 commit = fair contribution counting
  2. History Integrity: Force push protection preserves accurate contribution history
  3. Democratic Process: PR requirement enables the voting workflow
  4. Consistency: All repos follow the same rules
  5. Clean History: Branch cleanup and squash commits maintain readable history

Test Plan

  • Code compiles and script runs
  • Syntax validated with dummy token
  • Will test with real token when merged to worlddriven org
  • Verify settings applied to documentation repository
  • Verify settings applied to webapp repository
  • Test creating a new repository applies all settings

Token Permissions Required

For this to work, WORLDDRIVEN_GITHUB_TOKEN needs:

  • ✅ Repository Administration: Read and write (for settings and rulesets)
  • ✅ Contents: Read and write (for initial commits)
  • ✅ Organization Administration: Read and write (for repo creation/deletion)

Closes: Related to standardizing worlddriven organization configuration

Implement automated enforcement of standard GitHub repository settings
across all worlddriven organization repositories to ensure consistency
and support the democratic merge workflow.

Changes:
- Add standard repository settings (squash-only merge, branch cleanup)
- Add standard branch protection ruleset (require PR, prevent force push)
- Auto-apply settings during repository creation via auto_init
- Check and enforce settings for existing repositories
- Add branch protection rulesets automatically

Configuration enforced:
- Merge: Squash only (1 PR = 1 commit for fair voting)
- Branch cleanup: Delete branches after merge
- Branch protection: Require PR, prevent force push, prevent deletion
- No bypass actors: True democracy for all

This ensures all worlddriven repositories follow consistent practices
that support the contribution-weighted voting system and maintain
clean, auditable history.
@TooAngel TooAngel force-pushed the fix/standardize-github-configuration branch from 1bbadc5 to 20cffde Compare November 1, 2025 14:20
@worlddriven
Copy link
Contributor

worlddriven bot commented Nov 1, 2025

🤖 Worlddriven Status

📊 Live Status Dashboard

🗓️ Merge Date: 2025-11-04 at 10:54:31 UTC (today)
📅 Started: 2025-11-01 at 14:20:14 UTC
Speed Factor: 0.29 (71% faster due to reviews)
Positive votes: 5/7 contribution weight (coefficient: 0.71)
📈 Base Merge Time: 10 days → Current: 3 days

🎯 Want to influence when this merges?

Your review matters! As a contributor to this project, your voice helps determine the merge timeline.

How to review:

  1. Check the changes
    Files changed

  2. Leave your review
    Review changes

Your options:

  • ✅ Agree & Speed Up: Approve Approving makes this merge faster
  • ❌ Disagree & Slow Down: Request changes Requesting changes delays the merge

💡 Pro tip: The more contributors who agree, the faster this gets merged!

📊 View detailed stats on the dashboard

📋 Recent Activity

2025-11-04, 11:52:35 - Pull request merged by worlddriven ✅


This comment is automatically updated by worlddriven

@worlddriven worlddriven bot merged commit 5c6d69e into worlddriven:main Nov 4, 2025
3 checks passed
@TooAngel TooAngel deleted the fix/standardize-github-configuration branch November 8, 2025 06:34
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