Skip to content

chore: implement final branch protection and workflow tweaks#251

Merged
DrunkOnJava merged 9 commits intomainfrom
chore/restore-protection
Aug 1, 2025
Merged

chore: implement final branch protection and workflow tweaks#251
DrunkOnJava merged 9 commits intomainfrom
chore/restore-protection

Conversation

@DrunkOnJava
Copy link
Owner

🔧 Final Hybrid Workflow Configuration

This PR completes the hybrid workflow setup by implementing the remaining configuration tweaks:

Changes

  1. Added commit-limits.yml workflow

    • Enforces ≤30 files or ≤800 lines per commit
    • Validates branch naming conventions (feat/, fix/, docs/, etc.)
    • Checks conventional commit message format
  2. Updated PR management workflow

    • Changed stale PR timing: 10 days (was 7)
    • Changed auto-close timing: 30 days (was 14)
    • Disabled auto-merge for small PRs (commented out)
  3. Updated CODEOWNERS

    • Changed all references from @griffinradcliffe to @DrunkOnJava
    • Ensures GitHub recognizes your reviews for self-approval
  4. Prepared branch protection update

    • Created JSON config to require 1 review
    • Enables strict status checks
    • Enforces linear history (squash-only)

Next Steps

After merging this PR:

  1. Apply the new branch protection rules using:

    gh api repos/DrunkOnJava/ModularHomeInventory/branches/main/protection \
      --method PUT --input /tmp/protect-main.json
  2. Monitor tonight's first dev→main rebase (3 AM UTC)

Testing

  • CI will validate this PR follows the new rules
  • Commit limits workflow will run on this PR

Fixes the final configuration gaps identified in the hybrid workflow analysis.

- Add commit-limits.yml workflow to enforce size/naming rules
- Update PR management: stale after 10d, close after 30d
- Disable auto-merge for small PRs (commented out)
- Update CODEOWNERS to use @DrunkOnJava
- Prepare branch protection JSON for 1-review requirement
Copilot AI review requested due to automatic review settings July 31, 2025 23:29
@github-actions
Copy link

👋 Welcome to the Hybrid Workflow!

⚠️ Important: This PR targets main directly. Please ensure:

  • This is a critical fix or thoroughly tested feature
  • All tests pass
  • You've considered creating this PR to dev first

PR Guidelines

  • Keep PRs focused on a single feature or fix
  • Ensure all tests pass before review
  • Update documentation if needed
  • Respond to review feedback promptly

Review Process

PRs to main require:

  • Approved review from maintainer
  • All status checks passing
  • No merge conflicts

@github-actions
Copy link

🔍 PR Validation Results

Build Status: ✅ Passed
SwiftLint: ⚠️ Issues found
Project Structure: ❌ Issues found
Compilation: ❌ Failed


This comment was automatically generated by the PR validation workflow.

Copy link

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 implements the final configuration changes for a hybrid workflow setup, focusing on commit limits, PR management adjustments, and ownership updates. The changes establish stricter code quality controls while adjusting automated PR handling timelines.

Key changes include:

  • Added a comprehensive commit validation workflow with size limits and naming conventions
  • Extended PR stale/close timings and disabled auto-merge functionality
  • Updated all code ownership references to reflect current maintainer

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/commit-limits.yml New workflow enforcing commit size limits, branch naming, and conventional commit format
.github/workflows/pr-management.yml Disabled auto-merge functionality and extended PR lifecycle timings
.github/CODEOWNERS Updated all ownership references from @griffinradcliffe to @DrunkOnJava

Comment on lines +54 to +55
lines_added=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$1} END {print sum}')
lines_deleted=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$2} END {print sum}')
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

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

The awk command will output an empty string when there are no lines to sum, which could cause issues in arithmetic operations. Consider adding a default value: awk '{sum+=$1} END {print sum+0}' to ensure it always outputs a number.

Suggested change
lines_added=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$1} END {print sum}')
lines_deleted=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$2} END {print sum}')
lines_added=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$1} END {print sum+0}')
lines_deleted=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$2} END {print sum+0}')

Copilot uses AI. Check for mistakes.
# Get commit stats
files_changed=$(git diff-tree --no-commit-id --name-only -r $commit | wc -l)
lines_added=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$1} END {print sum}')
lines_deleted=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$2} END {print sum}')
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

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

The awk command will output an empty string when there are no lines to sum, which could cause issues in arithmetic operations. Consider adding a default value: awk '{sum+=$2} END {print sum+0}' to ensure it always outputs a number.

Suggested change
lines_deleted=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$2} END {print sum}')
lines_deleted=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$2} END {print sum+0}')

Copilot uses AI. Check for mistakes.
files_changed=$(git diff-tree --no-commit-id --name-only -r $commit | wc -l)
lines_added=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$1} END {print sum}')
lines_deleted=$(git diff-tree --no-commit-id --numstat -r $commit | awk '{sum+=$2} END {print sum}')
total_lines=$((lines_added + lines_deleted))
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

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

This arithmetic operation could fail if lines_added or lines_deleted are empty strings (when commits have no changes). The variables should be validated or defaulted to 0 before this calculation.

Suggested change
total_lines=$((lines_added + lines_deleted))
total_lines=$(( ${lines_added:-0} + ${lines_deleted:-0} ))

Copilot uses AI. Check for mistakes.
- Add comprehensive hybrid workflow section
- Update quick start with git hooks setup
- Include Claude wrapper usage instructions
- Document branch protection and CI/CD status
- Add workflow rules table for clarity
@github-actions github-actions bot added size/L and removed size/L labels Jul 31, 2025
@github-actions
Copy link

🔍 PR Validation Results

Build Status: ✅ Passed
SwiftLint: ⚠️ Issues found
Project Structure: ❌ Issues found
Compilation: ❌ Failed


This comment was automatically generated by the PR validation workflow.

- Automatically updates architecture dashboard on push to main/develop
- Triggers on build workflow completion to capture errors
- Analyzes build errors, code quality, and git history
- Deploys updated dashboard to Vercel
- Posts deployment status on pull requests

This workflow ensures the architecture dashboard stays up-to-date with
the latest codebase analysis and build health metrics.
@github-actions github-actions bot added size/XL and removed size/L labels Aug 1, 2025
@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🔍 PR Validation Results

Build Status: ✅ Passed
SwiftLint: ⚠️ Issues found
Project Structure: ❌ Issues found
Compilation: ❌ Failed


This comment was automatically generated by the PR validation workflow.

- Updated Claude settings and GitHub sync status
- Enhanced gitignore patterns
- Updated project.yml and Config/project.yml
- Refined Makefile build configurations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added size/XL and removed size/XL labels Aug 1, 2025
- Updated Infrastructure-Monitoring package configuration
- Moved to properly named InfrastructureMonitoring source directory
- Cleaned up deprecated monitoring source files
- Prepared for new monitoring architecture

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added size/XL and removed size/XL labels Aug 1, 2025
DrunkOnJava and others added 2 commits August 1, 2025 02:28
- Updated Infrastructure-Network package configuration
- Moved to properly named InfrastructureNetwork source directory
- Cleaned up deprecated network source files
- Maintained networking interfaces and protocols

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Updated Infrastructure-Security package configuration
- Moved to properly named InfrastructureSecurity source directory
- Cleaned up deprecated security source files
- Maintained security interfaces and authentication protocols

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added size/XL and removed size/XL labels Aug 1, 2025
- Reorganized Infrastructure-Storage with proper source structure
- Updated Services-Business and Services-External modules
- Enhanced Foundation layer with proper configurations
- Updated UI components and feature views
- Cleaned up Xcode project files and schemes
- Added new foundation models and core functionality
- Updated supporting files and test configurations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added size/XL and removed size/XL labels Aug 1, 2025
@github-actions github-actions bot added size/XL and removed size/XL labels Aug 1, 2025
@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🔍 PR Validation Results

Build Status: ✅ Passed
SwiftLint: ⚠️ Issues found
Project Structure: ❌ Issues found
Compilation: ❌ Failed


This comment was automatically generated by the PR validation workflow.

@DrunkOnJava DrunkOnJava merged commit d53f21c into main Aug 1, 2025
7 of 8 checks passed
@DrunkOnJava DrunkOnJava deleted the chore/restore-protection branch August 1, 2025 06:29
@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🔍 PR Validation Results

Build Status: ✅ Passed
SwiftLint: ⚠️ Issues found
Project Structure: ❌ Issues found
Compilation: ❌ Failed


This comment was automatically generated by the PR validation workflow.

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🧪 Test Results

iPhone Tests: ✅ Passed
iPad Tests: ✅ Passed
Coverage: See artifacts for detailed report

Test Summary:

  • Unit Tests: Skipped (not available)
  • UI Tests: Skipped (not available)
  • Accessibility Tests: Executed

View detailed results and coverage reports in the Actions tab.

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🔍 PR Validation Results

Build Status: ✅ Passed
SwiftLint: ⚠️ Issues found
Project Structure: ❌ Issues found
Compilation: ❌ Failed


This comment was automatically generated by the PR validation workflow.

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🧪 Test Results

iPhone Tests: ✅ Passed
iPad Tests: ✅ Passed
Coverage: See artifacts for detailed report

Test Summary:

  • Unit Tests: Skipped (not available)
  • UI Tests: Skipped (not available)
  • Accessibility Tests: Executed

View detailed results and coverage reports in the Actions tab.

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🧪 Test Results

iPhone Tests: ✅ Passed
iPad Tests: ✅ Passed
Coverage: See artifacts for detailed report

Test Summary:

  • Unit Tests: Skipped (not available)
  • UI Tests: Skipped (not available)
  • Accessibility Tests: Executed

View detailed results and coverage reports in the Actions tab.

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🔍 PR Validation Results

Build Status: ✅ Passed
SwiftLint: ⚠️ Issues found
Project Structure: ❌ Issues found
Compilation: ❌ Failed


This comment was automatically generated by the PR validation workflow.

1 similar comment
@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🔍 PR Validation Results

Build Status: ✅ Passed
SwiftLint: ⚠️ Issues found
Project Structure: ❌ Issues found
Compilation: ❌ Failed


This comment was automatically generated by the PR validation workflow.

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🧪 Test Results

iPhone Tests: ✅ Passed
iPad Tests: ✅ Passed
Coverage: See artifacts for detailed report

Test Summary:

  • Unit Tests: Skipped (not available)
  • UI Tests: Skipped (not available)
  • Accessibility Tests: Executed

View detailed results and coverage reports in the Actions tab.

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🔍 PR Validation Results

Build Status: ✅ Passed
SwiftLint: ⚠️ Issues found
Project Structure: ❌ Issues found
Compilation: ❌ Failed


This comment was automatically generated by the PR validation workflow.

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🧪 Test Results

iPhone Tests: ✅ Passed
iPad Tests: ✅ Passed
Coverage: See artifacts for detailed report

Test Summary:

  • Unit Tests: Skipped (not available)
  • UI Tests: Skipped (not available)
  • Accessibility Tests: Executed

View detailed results and coverage reports in the Actions tab.

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🧪 Test Results

iPhone Tests: ✅ Passed
iPad Tests: ✅ Passed
Coverage: See artifacts for detailed report

Test Summary:

  • Unit Tests: Skipped (not available)
  • UI Tests: Skipped (not available)
  • Accessibility Tests: Executed

View detailed results and coverage reports in the Actions tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants