-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add Go-based validation utility for steering committee election bios #8596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
35c0c33
to
65fa27e
Compare
65fa27e
to
f60d1d0
Compare
There was a problem hiding this 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 adds a comprehensive Go-based validation utility for steering committee election candidate bios while standardizing the file formats and headers to use proper YAML structure.
- Replaces shell-based validation with a comprehensive Go utility that supports YAML parsing, filename validation, and template compliance checking
- Standardizes YAML headers in 2025-GB candidate files and nomination template to use proper YAML structure
- Updates dependencies to maintain Go 1.22.4 compatibility while adding yaml.v3 support
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
sigs.yaml | Restructured YAML format to use proper list syntax |
hack/verify-steering-election.sh | Replaced shell logic with Go utility invocation |
hack/verify-steering-election-tool.go | New comprehensive validation utility with YAML parsing and template checking |
go.mod | Updated dependencies for yaml.v3 and newer package versions |
elections/steering/2025/nomination-template.md | Fixed YAML header structure for proper parsing |
elections/steering/2025-GB/*.md | Added missing YAML info fields to candidate files |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
f60d1d0
to
f7d4906
Compare
f7d4906
to
d4f7c4a
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cblecker The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
d4f7c4a
to
c8949f1
Compare
/test all |
- Update 2025-GB candidate files to include full YAML header structure - Fix YAML info section to use map format instead of list format - Update 2025 nomination template to match new YAML structure - Ensure consistency across all election file formats 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Create new Go utility with enhanced validation capabilities - Validate YAML header format using gopkg.in/yaml.v3 library - Check filename format matches GitHub ID in header - Verify required template sections are present - Support both regular steering and GB election formats - Apply validation only to elections from 2025 forward - Update shell script to invoke Go utility Features: - Proper YAML parsing instead of regex validation - Unified validation logic for all election types - Better error messages for malformed headers - Type-safe validation of candidate bio structure 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Replace hard-coded year range ending at 2030 with a dynamic approach that calculates the end year as current year + 5. This eliminates the need for manual updates and ensures the tool continues working without maintenance as time progresses. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Update regex to match exactly 61 dashes instead of 3+ for better consistency and error detection. This matches the actual format used in all candidate files and will help catch formatting errors. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add startYear constant set to 2026 for easier configuration - Update findBioFiles to use startYear constant instead of hardcoded 2025 - Update comments to reference the constant instead of specific years 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add tests for extractYAMLHeader function with various dash counts and formats - Add tests for countWords function with different content types - Add tests for validateFileNameAndGitHubID with valid/invalid formats - Add tests for validateTemplateCompliance with required fields and sections - Add tests for findBioFiles function with year filtering logic - All tests cover both success and error cases for robust validation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
c8949f1
to
fad9166
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
/lgtm |
Summary
Changes
hack/verify-steering-election-tool.go
) with YAML parsing, filename validation, and template compliance checkinghack/verify-steering-election.sh
) to invoke Go utilityFeatures
gopkg.in/yaml.v3
instead of regex patternscandidate-username.md
matches GitHub ID in header)Test Plan
make verify
)