Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/README-staging-lint-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ workflow behavior based on testing requirements.

### Labels

| Label | Purpose |
|---|---|
| `test-<RuleName>` | Specifies a rule to validate (e.g., `test-PostResponseCodes`) |
| `errors-acknowledged` | Confirms the PR author has reviewed validation errors |
| Label | Purpose |
| --------------------- | ------------------------------------------------------------- |
| `test-<RuleName>` | Specifies a rule to validate (e.g., `test-PostResponseCodes`) |
| `errors-acknowledged` | Confirms the PR author has reviewed validation errors |

## Debugging and Troubleshooting

Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/test/extract-rule-names.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe("extract-rule-names", () => {
expect(result).toEqual(expected);
});
});

describe("checkBlockingConditions", () => {
function mockCore() {
return {
Expand Down Expand Up @@ -233,7 +233,10 @@ describe("extract-rule-names", () => {
describe("detectRuleChanges", () => {
test("returns true when rule files are changed", async () => {
const mockPaginate = vi.fn().mockResolvedValue([
{ filename: "packages/rulesets/src/spectral/functions/post-response-codes.ts", status: "modified" },
{
filename: "packages/rulesets/src/spectral/functions/post-response-codes.ts",
status: "modified",
},
{ filename: "README.md", status: "modified" },
]);
const github = {
Expand Down Expand Up @@ -286,9 +289,11 @@ describe("extract-rule-names", () => {
});

test("ignores deleted rule files", async () => {
const mockPaginate = vi.fn().mockResolvedValue([
{ filename: "packages/rulesets/src/spectral/az-arm.ts", status: "removed" },
]);
const mockPaginate = vi
.fn()
.mockResolvedValue([
{ filename: "packages/rulesets/src/spectral/az-arm.ts", status: "removed" },
]);
const github = {
paginate: mockPaginate,
rest: { pulls: { listFiles: "listFiles" } },
Expand Down
Loading