Skip to content

Update staging-lint-check workflow to block PR merge upon failure#823

Open
AkhilaIlla wants to merge 11 commits intomainfrom
akhilailla/test_test
Open

Update staging-lint-check workflow to block PR merge upon failure#823
AkhilaIlla wants to merge 11 commits intomainfrom
akhilailla/test_test

Conversation

@AkhilaIlla
Copy link
Contributor

@AkhilaIlla AkhilaIlla commented Feb 3, 2026

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.

@AkhilaIlla AkhilaIlla changed the title Log the error for Autorest failures in staging-lint-check pipeline Update staging-lint-check workflow to block PR merge upon failure Feb 20, 2026
@mikeharder mikeharder requested a review from Copilot February 21, 2026 00:04
@mikeharder
Copy link
Member

@copilot: fix the linter error

Copy link
Contributor

Copilot AI commented Feb 21, 2026

@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.

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

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-acknowledged is present.
  • Detect linter rule source changes via pulls.listFiles and require test-<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.

Comment on lines +214 to +217
* Blocking scenarios:
* 1. Command failures — AutoRest or script crashes
* 2. Validation errors without "errors-acknowledged" label
*
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@copilot update the doc

* 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>
Copy link
Contributor

Copilot AI commented Feb 23, 2026

@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.

@mikeharder
Copy link
Member

@copilot: fix formatting

Copy link
Contributor

Copilot AI commented Feb 23, 2026

@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.

Copilot AI and others added 2 commits February 23, 2026 12:09
)

* 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>
Copy link
Contributor

Copilot AI commented Feb 24, 2026

@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>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@copilot update the job name to match the workflow name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@copilot make this update in the same PR

Copy link
Contributor

Copilot AI commented Feb 24, 2026

@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:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@copilot move this file to copilot instructions folder or the contributing.md
whereever it makes more sense for copilot to access it.

Copy link
Contributor

Copilot AI commented Feb 24, 2026

@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.

Copy link
Contributor

Copilot AI commented Feb 24, 2026

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants