Update staging-lint-check workflow to block PR merge upon failure#823
Update staging-lint-check workflow to block PR merge upon failure#823AkhilaIlla wants to merge 11 commits intomainfrom
Conversation
|
@copilot: fix the linter error |
|
@mikeharder I've opened a new pull request, #828, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Pull request overview
Updates the staging lint checks workflow to become merge-blocking, relying on PR labels for rule selection and using the GitHub API to detect when rule source files change.
Changes:
- Make staging lint checks fail the workflow (and block merge) on command failures and on validation errors unless
errors-acknowledgedis present. - Detect linter rule source changes via
pulls.listFilesand requiretest-<RuleName>labels when rule files change. - Remove PR-body-based rule selection and document the new gating/label behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/test/runner.test.js | Updates tests to reflect removal of FAIL_ON_ERRORS env usage. |
| .github/workflows/test/extract-rule-names.test.js | Updates tests for label-only selection and adds coverage for new gating/detection helpers. |
| .github/workflows/staging-lint-checks.yaml | Updates workflow triggers/sparse checkout and switches to default export + passes github into the script. |
| .github/workflows/src/extract-rule-names-and-run-validation.js | Implements merge-blocking gates, rule-change detection via GitHub API, and label-only rule selection. |
| .github/workflows/README-staging-lint-checks.md | Documents the new merge-blocking gates and label-only usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * Blocking scenarios: | ||
| * 1. Command failures — AutoRest or script crashes | ||
| * 2. Validation errors without "errors-acknowledged" label | ||
| * |
There was a problem hiding this comment.
The numbering in the “Blocking scenarios” comment doesn’t match the numbering used in the code below (comment mentions scenarios 1–2, while the implementation refers to “Scenario 2” and “Scenario 3”). This makes the gating logic harder to follow.
Align the comment and the inline scenario labels so they refer to the same set of scenarios.
* Initial plan * Remove unused hasLabel import to fix linter error Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
|
@mikeharder I've opened a new pull request, #829, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@copilot: fix formatting |
|
@mikeharder I've opened a new pull request, #830, to work on those changes. Once the pull request is ready, I'll request review from you. |
) * Initial plan * Add pull-requests: read permission to staging-lint-checks workflow Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
* Initial plan * Fix prettier formatting in README and test file Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
|
@AkhilaIlla I've opened a new pull request, #831, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@AkhilaIlla I've opened a new pull request, #832, to work on those changes. Once the pull request is ready, I'll request review from you. |
| @@ -11,37 +11,52 @@ merged into the main codebase. | |||
| The workflow serves as a validation tool for linter rule development with the following workflow: | |||
There was a problem hiding this comment.
@copilot move this file to copilot instructions folder or the contributing.md
whereever it makes more sense for copilot to access it.
|
@AkhilaIlla I've opened a new pull request, #833, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@AkhilaIlla I've opened a new pull request, #834, to work on those changes. Once the pull request is ready, I'll request review from you. |
This PR improves the staging lint check workflow by adding merge-blocking capabilities, detecting linter rule source changes via the GitHub API, and simplifying rule selection to labels only.