Skip to content

Add automated rules update workflow with documentation#25

Merged
santosomar merged 1 commit intomainfrom
feat/automated-rules-update
Feb 5, 2026
Merged

Add automated rules update workflow with documentation#25
santosomar merged 1 commit intomainfrom
feat/automated-rules-update

Conversation

@thomas-bartlett
Copy link
Contributor

@thomas-bartlett thomas-bartlett commented Feb 5, 2026

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

Copy link
Contributor

@santosomar santosomar left a comment

Choose a reason for hiding this comment

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

Thank you @thomas-bartlett! Looks great

@santosomar santosomar merged commit 530f231 into main Feb 5, 2026
5 checks passed
@santosomar santosomar deleted the feat/automated-rules-update branch February 5, 2026 17:49
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 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
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

This workflow uses actions/checkout@v6, but all other workflows in this repository use @v4. For consistency with the established codebase pattern, consider using @v4 to match build-ide-bundles.yml:16, deploy-docs.yml:22, and validate-rules.yml:29.

Copilot uses AI. Check for mistakes.
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 .
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
git add .
git add $UPDATED

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create GitHub action to pull and update CodeGuard Rules within repo

2 participants