feat: Add enhanced workflow examples and comprehensive CODEOWNERS demonstration#1
Merged
Conversation
…onstration - Add test-codeowners-enforcement.yml: matrix testing with multiple scenarios - Add template-external-usage.yml: comprehensive template for external repos - Add demo-scenarios.yml: interactive demo workflow with different patterns - Enhanced .github/CODEOWNERS with extensive examples and comments - Updated README.md with new Example Workflows section - All workflows demonstrate testing, templating, and educational use cases
- Add @vercel/ncc for proper GitHub Actions bundling - Update build script to use ncc bundling - Fix JavaScript syntax error in demo workflow (context variable conflict) - Rebuild dist/index.js with all dependencies included - Ensure workflows can execute the action properly
👥 Code Owners Approval Status⏳ 0/5 required code owner groups have approved. Required Approvals:
This comment is automatically updated by the Dynamic Code Owners Reviewer Bot |
- Replace double-escaped \\n with proper \n line breaks in createCheckDetails() - Fix PR comment formatting to use proper newlines - Add empty lines for better readability in status check details - This resolves the issue where raw \n characters were appearing in GitHub status check details
The CI was failing because TypeScript declaration maps (.d.ts.map files) contained absolute paths that differed between local development and CI environments. Since we're using @vercel/ncc for bundling, we don't need the declaration maps from TypeScript compilation. Changes: - Disabled declarationMap in tsconfig.json - Removed existing .d.ts.map files - Rebuilt dist files without declaration maps This should resolve the 'uncommitted changes after build' CI error.
The demo scenarios were failing because the code was using cached CODEOWNERS data from the GitHub API instead of reading the temporary files created by the workflow steps. This caused all scenarios to use the original complex CODEOWNERS file instead of the simplified test scenarios. Changes: - Added detection for demo scenarios via DEMO_SCENARIO environment variable - Added filesystem reading function for CODEOWNERS in demo mode - Bypass cache when running demo scenarios to ensure fresh data - Import fs and path modules for filesystem operations This fix allows each demo scenario to use its own temporary CODEOWNERS file: - Single owner scenarios with simplified patterns - Multi-owner requirements for specific files - Mixed ownership with complex patterns - No-owner scenarios for certain file types
The demo summary job was failing with 'Cannot read properties of undefined (reading 'login')' because it was trying to access githubContext.repository.owner.login which doesn't exist in the GitHub context structure. Changes: - Removed the problematic createWorkflowDispatch call that was causing the error - Simplified the summary to use available GitHub context properties - Fixed the summary script to avoid undefined property access - Added current run information using accessible context properties This resolves the TypeError and allows the demo scenarios workflow to complete successfully with a proper summary report.
The path module was imported but never used in codeowners.ts, causing ESLint errors. Removed the unused import to clean up the code and pass linting checks.
Owner
Author
|
fixes #2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Overview
This PR adds comprehensive workflow examples that serve as:
📁 Files Added
📝 Files Enhanced
🧪 Testing
All workflows are designed to work in this repository context:
📊 Benefits
The workflows demonstrate all three purposes requested: testing, templating, and demonstration.