Skip to content

Add automated PR comment for untested linter rule changes#811

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/update-staging-lint-checks
Draft

Add automated PR comment for untested linter rule changes#811
Copilot wants to merge 4 commits intomainfrom
copilot/update-staging-lint-checks

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

When linter rules are modified without specifying rules to test (via labels or PR description), the Staging Lint Checks workflow now posts a reminder comment directing developers to validate their changes.

Changes

  • Workflow: Added pull-requests: write permission and passed github API client to script
  • Change detection: Detects modifications to packages/rulesets/src/{spectral,native}/functions/** using startsWith() matching to avoid false positives
  • Comment logic: Posts reminder only when:
    1. Linter rule files changed
    2. No rules specified via test-* labels or rules: in PR body
    3. No existing comment (uses HTML marker <!-- staging-lint-checks-reminder --> for deduplication)
  • Testing: Added 16 unit tests covering path detection, duplicate prevention, and error handling

Comment posted

⚠️ **Linter Rule Changes Detected**

This PR modifies linter rule files, but no specific rules were selected for testing.

Make sure to validate the changes to the linter rules using 'Staging Lint Checks' workflow.

To test your changes, add one of the following:
- A label in the format `test-<RuleName>` (e.g., `test-PostResponseCodes`)
- A line in the PR description: `rules: RuleName1, RuleName2`

The workflow triggers on PR open/sync/edit/label events, so duplicate prevention ensures clean comment threads.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 28, 2026 17:38
Co-authored-by: AkhilaIlla <36493984+AkhilaIlla@users.noreply.github.com>
Co-authored-by: AkhilaIlla <36493984+AkhilaIlla@users.noreply.github.com>
Co-authored-by: AkhilaIlla <36493984+AkhilaIlla@users.noreply.github.com>
Copilot AI changed the title [WIP] Update staging lint checks to add validation comment Add automated PR comment for untested linter rule changes Jan 28, 2026
Copilot AI requested a review from AkhilaIlla January 28, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants