ci: allow edition of repository files for maintainers [skip ci]
This commit is contained in:
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -24,6 +24,8 @@ jobs:
|
|||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Check contributions requirements
|
- name: Check contributions requirements
|
||||||
run: npm test -- ci.test.js --noStackTrace
|
run: npm test -- ci.test.js --noStackTrace
|
||||||
|
env:
|
||||||
|
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: npm run linter
|
run: npm run linter
|
||||||
|
|
||||||
|
|||||||
@@ -19,25 +19,26 @@ describe("Check files editions (checkout your files if needed)", () => {
|
|||||||
".github/workflows/examples.yml",
|
".github/workflows/examples.yml",
|
||||||
".github/readme/partials/documentation/compatibility.md",
|
".github/readme/partials/documentation/compatibility.md",
|
||||||
])("%s", async file => expect((await diff()).includes(file)).toBe(false)))
|
])("%s", async file => expect((await diff()).includes(file)).toBe(false)))
|
||||||
describe("Repository level files were not modified", () =>
|
if (!["lowlighter"].includes(process.env.PR_AUTHOR))
|
||||||
void test.each([
|
describe("Repository level files were not modified", () =>
|
||||||
".github/config/*",
|
void test.each([
|
||||||
".github/ISSUE_TEMPLATE/*",
|
".github/config/*",
|
||||||
".github/readme/partials/license.md",
|
".github/ISSUE_TEMPLATE/*",
|
||||||
".github/scripts/*",
|
".github/readme/partials/license.md",
|
||||||
".github/workflows/*",
|
".github/scripts/*",
|
||||||
".github/architecture.svg",
|
".github/workflows/*",
|
||||||
".github/dependabot.yml",
|
".github/architecture.svg",
|
||||||
".github/FUNDING.yml",
|
".github/dependabot.yml",
|
||||||
".github/pull_request_template.md/*",
|
".github/FUNDING.yml",
|
||||||
"LICENSE",
|
".github/pull_request_template.md/*",
|
||||||
"ARCHITECTURE.md",
|
"LICENSE",
|
||||||
"SECURITY.md",
|
"ARCHITECTURE.md",
|
||||||
"tests/ci.test.js",
|
"SECURITY.md",
|
||||||
"source/.eslintrc.yml",
|
"tests/ci.test.js",
|
||||||
"source/app/mocks/.eslintrc.yml",
|
"source/.eslintrc.yml",
|
||||||
"vercel.json",
|
"source/app/mocks/.eslintrc.yml",
|
||||||
])("%s", async file => expect((await diff()).filter(edited => new RegExp(`^${file.replace(/[.]/g, "[.]").replace(/[*]/g, "[\\s\\S]*")}$`).test(edited)).length).toBe(0)))
|
"vercel.json",
|
||||||
|
])("%s", async file => expect((await diff()).filter(edited => new RegExp(`^${file.replace(/[.]/g, "[.]").replace(/[*]/g, "[\\s\\S]*")}$`).test(edited)).length).toBe(0)))
|
||||||
})
|
})
|
||||||
|
|
||||||
//Templates editions
|
//Templates editions
|
||||||
|
|||||||
Reference in New Issue
Block a user