Add automated rules update workflow with documentation#25
Conversation
santosomar
left a comment
There was a problem hiding this comment.
Thank you @thomas-bartlett! Looks great
There was a problem hiding this comment.
Pull request overview
This PR adds automated rule update functionality for GitHub repositories using CodeGuard rules. The workflow checks monthly for new rule versions and automatically creates pull requests when updates are available, supporting Cursor, Windsurf, GitHub Copilot, and Antigravity IDE formats.
Changes:
- Added GitHub Actions workflow that runs monthly to check for CodeGuard rule updates and creates PRs when new versions are detected
- Added documentation section in getting-started.md explaining the automated update feature, setup process, and supported formats
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/update-codeguard-rules.yml | New workflow that detects installed rule formats, checks for version updates from GitHub releases, downloads and extracts new rules, and creates/updates PRs with changes |
| docs/getting-started.md | Added "Keeping Rules Updated (Automated)" section documenting the workflow setup and supported formats |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 |
There was a problem hiding this comment.
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git checkout -B "$BRANCH" | ||
| git add . |
There was a problem hiding this comment.
Using git add . stages all changes in the repository. While the workflow only modifies rule files in specific directories, it's better practice to explicitly add only the directories that were updated. Consider using git add followed by the specific directories that were detected and updated (e.g., iterate through DETECTED_DIRS or UPDATED and add each directory), which makes the intent clearer and prevents accidentally staging unintended changes.
| git add . | |
| git add $UPDATED |
Adds a GitHub Actions workflow that automatically checks for CodeGuard rule updates monthly and creates PRs when new versions are available. Supports Cursor, Windsurf, GitHub Copilot, and Antigravity formats. Documentation added to getting-started.md explaining setup and usage.
Fixes #22