Skip to content

Commit

Permalink
Don't treat eslintrc deleting as needing a config check
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Jan 30, 2025
1 parent 9742628 commit 35e014f
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/mergebot/src/_tests/fixtures/71725/derived.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{
"path": "types/enhance__enhance/.eslintrc.json",
"kind": "package-meta",
"suspect": "edited"
"suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-eslintrcjson) (check: `rules`)"
},
{
"path": "types/enhance__enhance/.npmignore",
Expand Down
2 changes: 1 addition & 1 deletion packages/mergebot/src/_tests/fixtures/71725/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"variables": {
"input": {
"id": "IC_kwDOAFz6BM6bcLgn",
"body": "@agawley Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.\n\n***This is a live comment that I will keep updated.***\n\n## 1 package in this PR\n\n* `enhance__enhance` (*new!*) — [on npm](https://www.npmjs.com/package/@enhance/enhance), [on unpkg](https://unpkg.com/browse/@enhance/enhance@latest/)\n - 1 added owner: ✎@agawley\n - Config files to check:\n - [`enhance__enhance/.eslintrc.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71725/files/10894aa4e8d1717516ae8867f3fbaa50e88785ea#diff-8396f43ae17f6ac375fa3ccd977f1fa5f4623a11ad7d4bb5d770a7f49d0feebd): edited\n\n## Code Reviews\n\nThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=71725&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * ✅ Only a DT maintainer can approve changes when there are new packages added\n\nAll of the items on the list are green. **To merge, you need to post a comment including the string \"Ready to merge\"** to bring in your changes.\n\n----------------------\n... diagnostics scrubbed ...\n<!--typescript_bot_welcome-->"
"body": "@agawley Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.\n\n***This is a live comment that I will keep updated.***\n\n## 1 package in this PR\n\n* `enhance__enhance` (*new!*) — [on npm](https://www.npmjs.com/package/@enhance/enhance), [on unpkg](https://unpkg.com/browse/@enhance/enhance@latest/)\n - 1 added owner: ✎@agawley\n - Config files to check:\n - [`enhance__enhance/.eslintrc.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71725/files/10894aa4e8d1717516ae8867f3fbaa50e88785ea#diff-8396f43ae17f6ac375fa3ccd977f1fa5f4623a11ad7d4bb5d770a7f49d0feebd): not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-eslintrcjson) (check: `rules`)\n\n## Code Reviews\n\nThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=71725&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * ✅ Only a DT maintainer can approve changes when there are new packages added\n\nAll of the items on the list are green. **To merge, you need to post a comment including the string \"Ready to merge\"** to bring in your changes.\n\n----------------------\n... diagnostics scrubbed ...\n<!--typescript_bot_welcome-->"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mergebot/src/_tests/fixtures/71725/result.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"responseComments": [
{
"tag": "welcome",
"status": "@agawley Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.\n\n***This is a live comment that I will keep updated.***\n\n## 1 package in this PR\n\n* `enhance__enhance` (*new!*) — [on npm](https://www.npmjs.com/package/@enhance/enhance), [on unpkg](https://unpkg.com/browse/@enhance/enhance@latest/)\n - 1 added owner: ✎@agawley\n - Config files to check:\n - [`enhance__enhance/.eslintrc.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71725/files/10894aa4e8d1717516ae8867f3fbaa50e88785ea#diff-8396f43ae17f6ac375fa3ccd977f1fa5f4623a11ad7d4bb5d770a7f49d0feebd): edited\n\n## Code Reviews\n\nThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=71725&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * ✅ Only a DT maintainer can approve changes when there are new packages added\n\nAll of the items on the list are green. **To merge, you need to post a comment including the string \"Ready to merge\"** to bring in your changes.\n\n----------------------\n... diagnostics scrubbed ..."
"status": "@agawley Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.\n\n***This is a live comment that I will keep updated.***\n\n## 1 package in this PR\n\n* `enhance__enhance` (*new!*) — [on npm](https://www.npmjs.com/package/@enhance/enhance), [on unpkg](https://unpkg.com/browse/@enhance/enhance@latest/)\n - 1 added owner: ✎@agawley\n - Config files to check:\n - [`enhance__enhance/.eslintrc.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71725/files/10894aa4e8d1717516ae8867f3fbaa50e88785ea#diff-8396f43ae17f6ac375fa3ccd977f1fa5f4623a11ad7d4bb5d770a7f49d0feebd): not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-eslintrcjson) (check: `rules`)\n\n## Code Reviews\n\nThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=71725&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * ✅ Only a DT maintainer can approve changes when there are new packages added\n\nAll of the items on the list are green. **To merge, you need to post a comment including the string \"Ready to merge\"** to bring in your changes.\n\n----------------------\n... diagnostics scrubbed ..."
},
{
"tag": "merge-offer",
Expand Down
3 changes: 1 addition & 2 deletions packages/mergebot/src/_tests/fixtures/71790/derived.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"files": [
{
"path": "types/hapi__catbox-memory/.eslintrc.json",
"kind": "package-meta",
"suspect": "edited"
"kind": "package-meta-ok"
},
{
"path": "types/hapi__catbox-memory/.npmignore",
Expand Down
13 changes: 12 additions & 1 deletion packages/mergebot/src/_tests/fixtures/71790/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@
"variables": {
"input": {
"id": "IC_kwDOAFz6BM6cXqlQ",
"body": "@hkleungai Thank you for submitting this PR!\n\n***This is a live comment that I will keep updated.***\n\nThis PR touches some part of DefinitelyTyped infrastructure, so a DT maintainer will need to review it. This is rare — did you mean to do this?\n\n## 1 package in this PR (and infra files)\n\n* `hapi__catbox-memory` (*probably deleted!*) — [on npm](https://www.npmjs.com/package/@hapi/catbox-memory), [on unpkg](https://unpkg.com/browse/@hapi/catbox-memory@latest/)\n - Config files to check:\n - [`hapi__catbox-memory/.eslintrc.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71790/files/0a964f11f0a26b05b176e5d56763599b0c16e044#diff-8bad4f61b3e70b922be4f5f4505b1c009299493d2ba9644e4ecd61fa761c6fc1): edited\n* Infra files\n - [`notNeededPackages.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71790/files/0a964f11f0a26b05b176e5d56763599b0c16e044#diff-a275c2eae7b8f788a52327e76809026ee1bc5ea614393806c8f3cbab07202621)\n\n## Code Reviews\n\nBecause this PR edits the configuration file, it can be merged once it's reviewed by a DT maintainer.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=71790&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * 🕐 A DT maintainer needs to approve changes that affect DT infrastructure ([`notNeededPackages.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71790/files/0a964f11f0a26b05b176e5d56763599b0c16e044#diff-a275c2eae7b8f788a52327e76809026ee1bc5ea614393806c8f3cbab07202621))\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n----------------------\n... diagnostics scrubbed ...\n<!--typescript_bot_welcome-->"
"body": "@hkleungai Thank you for submitting this PR!\n\n***This is a live comment that I will keep updated.***\n\nThis PR touches some part of DefinitelyTyped infrastructure, so a DT maintainer will need to review it. This is rare — did you mean to do this?\n\n## 1 package in this PR (and infra files)\n\n* `hapi__catbox-memory` (*probably deleted!*) — [on npm](https://www.npmjs.com/package/@hapi/catbox-memory), [on unpkg](https://unpkg.com/browse/@hapi/catbox-memory@latest/)\n* Infra files\n - [`notNeededPackages.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71790/files/0a964f11f0a26b05b176e5d56763599b0c16e044#diff-a275c2eae7b8f788a52327e76809026ee1bc5ea614393806c8f3cbab07202621)\n\n## Code Reviews\n\nThis PR can be merged once it's reviewed by a DT maintainer.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=71790&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * 🕐 A DT maintainer needs to approve changes that affect DT infrastructure ([`notNeededPackages.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71790/files/0a964f11f0a26b05b176e5d56763599b0c16e044#diff-a275c2eae7b8f788a52327e76809026ee1bc5ea614393806c8f3cbab07202621))\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n----------------------\n... diagnostics scrubbed ...\n<!--typescript_bot_welcome-->"
}
}
},
{
"mutation": "mutation ($input: RemoveLabelsFromLabelableInput!) {\n removeLabelsFromLabelable(input: $input) {\n __typename\n }\n}\n",
"variables": {
"input": {
"labelIds": [
"MDU6TGFiZWwyMTU0ODE2NTQ5"
],
"labelableId": "PR_kwDOAFz6BM6Jcn5W"
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions packages/mergebot/src/_tests/fixtures/71790/result.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"projectColumn": "Needs Maintainer Action",
"labels": [
"Edits Infrastructure",
"Check Config"
"Edits Infrastructure"
],
"responseComments": [
{
"tag": "welcome",
"status": "@hkleungai Thank you for submitting this PR!\n\n***This is a live comment that I will keep updated.***\n\nThis PR touches some part of DefinitelyTyped infrastructure, so a DT maintainer will need to review it. This is rare — did you mean to do this?\n\n## 1 package in this PR (and infra files)\n\n* `hapi__catbox-memory` (*probably deleted!*) — [on npm](https://www.npmjs.com/package/@hapi/catbox-memory), [on unpkg](https://unpkg.com/browse/@hapi/catbox-memory@latest/)\n - Config files to check:\n - [`hapi__catbox-memory/.eslintrc.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71790/files/0a964f11f0a26b05b176e5d56763599b0c16e044#diff-8bad4f61b3e70b922be4f5f4505b1c009299493d2ba9644e4ecd61fa761c6fc1): edited\n* Infra files\n - [`notNeededPackages.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71790/files/0a964f11f0a26b05b176e5d56763599b0c16e044#diff-a275c2eae7b8f788a52327e76809026ee1bc5ea614393806c8f3cbab07202621)\n\n## Code Reviews\n\nBecause this PR edits the configuration file, it can be merged once it's reviewed by a DT maintainer.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=71790&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * 🕐 A DT maintainer needs to approve changes that affect DT infrastructure ([`notNeededPackages.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71790/files/0a964f11f0a26b05b176e5d56763599b0c16e044#diff-a275c2eae7b8f788a52327e76809026ee1bc5ea614393806c8f3cbab07202621))\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n----------------------\n... diagnostics scrubbed ..."
"status": "@hkleungai Thank you for submitting this PR!\n\n***This is a live comment that I will keep updated.***\n\nThis PR touches some part of DefinitelyTyped infrastructure, so a DT maintainer will need to review it. This is rare — did you mean to do this?\n\n## 1 package in this PR (and infra files)\n\n* `hapi__catbox-memory` (*probably deleted!*) — [on npm](https://www.npmjs.com/package/@hapi/catbox-memory), [on unpkg](https://unpkg.com/browse/@hapi/catbox-memory@latest/)\n* Infra files\n - [`notNeededPackages.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71790/files/0a964f11f0a26b05b176e5d56763599b0c16e044#diff-a275c2eae7b8f788a52327e76809026ee1bc5ea614393806c8f3cbab07202621)\n\n## Code Reviews\n\nThis PR can be merged once it's reviewed by a DT maintainer.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=71790&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * 🕐 A DT maintainer needs to approve changes that affect DT infrastructure ([`notNeededPackages.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71790/files/0a964f11f0a26b05b176e5d56763599b0c16e044#diff-a275c2eae7b8f788a52327e76809026ee1bc5ea614393806c8f3cbab07202621))\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n----------------------\n... diagnostics scrubbed ..."
},
{
"tag": "pinging-reviewers",
Expand Down
1 change: 1 addition & 0 deletions packages/mergebot/src/pr-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ configSuspicious["tsconfig.json"] = makeChecker(
},
},
);
configSuspicious[".eslintrc.json"] = makeChecker({}, urls.eslintrc);

type JSONLike = boolean | number | string | null | { [key: string]: JSONLike } | JSONLike[];

Expand Down
1 change: 1 addition & 0 deletions packages/mergebot/src/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const definitionOwners = readmeLink("Definition Owners");
export const workflow = readmeLink("Make a pull request");
export const tsconfigJson = readmeLink("`tsconfig.json`");
export const packageJson = readmeLink("`package.json`");
export const eslintrc = readmeLink("Linter: `.eslintrc.json`");
export const testsTs = readmeLink("`<my-package>-tests.ts`");

export const playground = (prNum: number) =>
Expand Down

0 comments on commit 35e014f

Please sign in to comment.