diff --git a/src/_tests/fixtures/38979/result.json b/src/_tests/fixtures/38979/result.json index b5080e652..2d48ad9d3 100644 --- a/src/_tests/fixtures/38979/result.json +++ b/src/_tests/fixtures/38979/result.json @@ -23,6 +23,7 @@ "status": "It has been more than two weeks and this PR still has no reviews.\n\nI'll bump it to the DT maintainer queue. Thank you for your patience, @ExE-Boss.\n\n(Ping @RReverser.)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/43136/result.json b/src/_tests/fixtures/43136/result.json index 41273c6fc..1ccf61fcd 100644 --- a/src/_tests/fixtures/43136/result.json +++ b/src/_tests/fixtures/43136/result.json @@ -17,6 +17,7 @@ "status": "@RReverser Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/43144/result.json b/src/_tests/fixtures/43144/result.json index ba3d5303b..2aa11f5a3 100644 --- a/src/_tests/fixtures/43144/result.json +++ b/src/_tests/fixtures/43144/result.json @@ -14,6 +14,7 @@ "status": "@jeffreymeng Everything looks good here. Great job! I am ready to merge this PR (at f1f5c4b) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n\n(@pocesar: you can do this too.)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/43151/result.json b/src/_tests/fixtures/43151/result.json index 15118ca39..d992cf84d 100644 --- a/src/_tests/fixtures/43151/result.json +++ b/src/_tests/fixtures/43151/result.json @@ -13,6 +13,7 @@ "status": "πŸ”” @adamzerella β€” you're the only owner, but it would still be good if you find someone to [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43151/files) in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/43160/result.json b/src/_tests/fixtures/43160/result.json index e6a7a641e..b8a56ecfd 100644 --- a/src/_tests/fixtures/43160/result.json +++ b/src/_tests/fixtures/43160/result.json @@ -19,6 +19,7 @@ "status": "@rikkertkoppes The CI build failed! Please [review the logs for more information](https://github.com/DefinitelyTyped/DefinitelyTyped/commit/22c73c88cc9c09efd4c2998ec360607dd4c36c2e/checks?check_suite_id=731664306).\r\n\r\nOnce you've pushed the fixes, the build will automatically re-run. Thanks!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/43175/result.json b/src/_tests/fixtures/43175/result.json index 97905e9f0..c56623841 100644 --- a/src/_tests/fixtures/43175/result.json +++ b/src/_tests/fixtures/43175/result.json @@ -22,6 +22,7 @@ "status": "@couven92 Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/43235/result.json b/src/_tests/fixtures/43235/result.json index d95c720fa..a9cccda2c 100644 --- a/src/_tests/fixtures/43235/result.json +++ b/src/_tests/fixtures/43235/result.json @@ -11,6 +11,7 @@ "status": "πŸ”” @Esri @bsvensson β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43235/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/43314/result.json b/src/_tests/fixtures/43314/result.json index a7fd4d28b..ec003ab99 100644 --- a/src/_tests/fixtures/43314/result.json +++ b/src/_tests/fixtures/43314/result.json @@ -13,6 +13,7 @@ "status": "πŸ”” @metonym β€” you're the only owner, but it would still be good if you find someone to [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43314/files) in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/43695-duplicate-comment/result.json b/src/_tests/fixtures/43695-duplicate-comment/result.json index 374edbf1a..24bd704e8 100644 --- a/src/_tests/fixtures/43695-duplicate-comment/result.json +++ b/src/_tests/fixtures/43695-duplicate-comment/result.json @@ -22,6 +22,7 @@ "status": "It has been more than two weeks and this PR still has no reviews.\n\nI'll bump it to the DT maintainer queue. Thank you for your patience, @alexandercerutti.\n\n(Ping Β«anyone?Β».)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/43695-post-review/result.json b/src/_tests/fixtures/43695-post-review/result.json index 51109cabf..3ea09be91 100644 --- a/src/_tests/fixtures/43695-post-review/result.json +++ b/src/_tests/fixtures/43695-post-review/result.json @@ -14,6 +14,7 @@ "status": "@alexandercerutti One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/43695/result.json b/src/_tests/fixtures/43695/result.json index 8ee3dae2c..8bc4d1d34 100644 --- a/src/_tests/fixtures/43695/result.json +++ b/src/_tests/fixtures/43695/result.json @@ -14,6 +14,7 @@ "status": "@alexandercerutti One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/43960-post-close/result.json b/src/_tests/fixtures/43960-post-close/result.json index 3a62818e6..08863cd92 100644 --- a/src/_tests/fixtures/43960-post-close/result.json +++ b/src/_tests/fixtures/43960-post-close/result.json @@ -1,6 +1,7 @@ { "labels": [], "responseComments": [], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": false, diff --git a/src/_tests/fixtures/43960/result.json b/src/_tests/fixtures/43960/result.json index 0bac2a8d8..22dfe60c0 100644 --- a/src/_tests/fixtures/43960/result.json +++ b/src/_tests/fixtures/43960/result.json @@ -14,6 +14,7 @@ "status": "@aaltepet One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44105/result.json b/src/_tests/fixtures/44105/result.json index 3a62818e6..08863cd92 100644 --- a/src/_tests/fixtures/44105/result.json +++ b/src/_tests/fixtures/44105/result.json @@ -1,6 +1,7 @@ { "labels": [], "responseComments": [], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": false, diff --git a/src/_tests/fixtures/44256/result.json b/src/_tests/fixtures/44256/result.json index 3a62818e6..08863cd92 100644 --- a/src/_tests/fixtures/44256/result.json +++ b/src/_tests/fixtures/44256/result.json @@ -1,6 +1,7 @@ { "labels": [], "responseComments": [], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": false, diff --git a/src/_tests/fixtures/44267/result.json b/src/_tests/fixtures/44267/result.json index d97c5d4aa..d1590e32d 100644 --- a/src/_tests/fixtures/44267/result.json +++ b/src/_tests/fixtures/44267/result.json @@ -14,6 +14,7 @@ "status": "@ErikMartensson 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 which I will keep updated.***\n\n## 1 package in this PR\n\n* `intercom-client` [on npm](https://www.npmjs.com/package/intercom-client), [on unpkg](https://unpkg.com/browse/intercom-client@latest/)\n - owner-approval: @malithrw\n\n## Code Reviews\n\nThis PR can be merged once it's reviewed by a DT maintainer.\n\n## Status\n\n * βœ… No merge conflicts\n * βœ… Continuous integration tests have passed\n * ❌ Only a DT maintainer can approve changes [without tests](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-test-editing-an-existing-package)\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 ..." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44282/result.json b/src/_tests/fixtures/44282/result.json index 7df903081..54b33575e 100644 --- a/src/_tests/fixtures/44282/result.json +++ b/src/_tests/fixtures/44282/result.json @@ -14,6 +14,7 @@ "status": "πŸ”” @fishcharlie β€” you're the only owner, but it would still be good if you find someone to [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44282/files) in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44288/result.json b/src/_tests/fixtures/44288/result.json index ff4bc27fd..25225f1b6 100644 --- a/src/_tests/fixtures/44288/result.json +++ b/src/_tests/fixtures/44288/result.json @@ -11,6 +11,7 @@ "status": "πŸ”” @gosticks β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44288/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44290/result.json b/src/_tests/fixtures/44290/result.json index c7c95575c..e58c58d07 100644 --- a/src/_tests/fixtures/44290/result.json +++ b/src/_tests/fixtures/44290/result.json @@ -1,6 +1,7 @@ { "labels": [], "responseComments": [], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": false, diff --git a/src/_tests/fixtures/44299-with-files/result.json b/src/_tests/fixtures/44299-with-files/result.json index c07fdb0bf..4bc63724f 100644 --- a/src/_tests/fixtures/44299-with-files/result.json +++ b/src/_tests/fixtures/44299-with-files/result.json @@ -13,6 +13,7 @@ "status": "πŸ”” @geopic β€” you're the only owner, but it would still be good if you find someone to [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44299/files) in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44299/result.json b/src/_tests/fixtures/44299/result.json index c07fdb0bf..4bc63724f 100644 --- a/src/_tests/fixtures/44299/result.json +++ b/src/_tests/fixtures/44299/result.json @@ -13,6 +13,7 @@ "status": "πŸ”” @geopic β€” you're the only owner, but it would still be good if you find someone to [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44299/files) in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44316/result.json b/src/_tests/fixtures/44316/result.json index 55e2ae95b..8ffbdb3fb 100644 --- a/src/_tests/fixtures/44316/result.json +++ b/src/_tests/fixtures/44316/result.json @@ -14,6 +14,7 @@ "status": "πŸ”” @mattleff β€” you're the only owner, but it would still be good if you find someone to [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44316/files) in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44343-pending-travis/result.json b/src/_tests/fixtures/44343-pending-travis/result.json index 909ba1ecb..d52199b7c 100644 --- a/src/_tests/fixtures/44343-pending-travis/result.json +++ b/src/_tests/fixtures/44343-pending-travis/result.json @@ -11,6 +11,7 @@ "status": "πŸ”” @joeriks β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44343/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44343-pre-travis/result.json b/src/_tests/fixtures/44343-pre-travis/result.json index 909ba1ecb..d52199b7c 100644 --- a/src/_tests/fixtures/44343-pre-travis/result.json +++ b/src/_tests/fixtures/44343-pre-travis/result.json @@ -11,6 +11,7 @@ "status": "πŸ”” @joeriks β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44343/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44343/result.json b/src/_tests/fixtures/44343/result.json index 909ba1ecb..d52199b7c 100644 --- a/src/_tests/fixtures/44343/result.json +++ b/src/_tests/fixtures/44343/result.json @@ -11,6 +11,7 @@ "status": "πŸ”” @joeriks β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44343/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44402/result.json b/src/_tests/fixtures/44402/result.json index cc4e244a3..6830aaff4 100644 --- a/src/_tests/fixtures/44402/result.json +++ b/src/_tests/fixtures/44402/result.json @@ -16,6 +16,7 @@ "status": "@sandersn Everything looks good here. Great job! I am ready to merge this PR (at 5dfb994) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44411/result.json b/src/_tests/fixtures/44411/result.json index e5e343d02..953fb93d1 100644 --- a/src/_tests/fixtures/44411/result.json +++ b/src/_tests/fixtures/44411/result.json @@ -13,6 +13,7 @@ "status": "πŸ”” @dawnmist @erbridge β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44411/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44424-1-travis-instantly-finished/result.json b/src/_tests/fixtures/44424-1-travis-instantly-finished/result.json index bbf12029d..3911f89a2 100644 --- a/src/_tests/fixtures/44424-1-travis-instantly-finished/result.json +++ b/src/_tests/fixtures/44424-1-travis-instantly-finished/result.json @@ -13,6 +13,7 @@ "status": "πŸ”” @chrisbarker @rdepena @whyn07m3 @licui3936 β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44424/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44424-2-after-travis-second/result.json b/src/_tests/fixtures/44424-2-after-travis-second/result.json index 4c26fc90e..db581a252 100644 --- a/src/_tests/fixtures/44424-2-after-travis-second/result.json +++ b/src/_tests/fixtures/44424-2-after-travis-second/result.json @@ -13,6 +13,7 @@ "status": "πŸ”” @chrisbarker @rdepena @whyn07m3 @licui3936 β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44424/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44437/result.json b/src/_tests/fixtures/44437/result.json index b8894ffa7..5d7957da7 100644 --- a/src/_tests/fixtures/44437/result.json +++ b/src/_tests/fixtures/44437/result.json @@ -16,6 +16,7 @@ "status": "@johnnyreilly Everything looks good here. Great job! I am ready to merge this PR (at eb92456) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n\n(@Berkays, @unindented, @kamontat, @theweirdone, @whoaa512: you can do this too.)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44439/result.json b/src/_tests/fixtures/44439/result.json index 7256583a5..b4d067b2a 100644 --- a/src/_tests/fixtures/44439/result.json +++ b/src/_tests/fixtures/44439/result.json @@ -14,6 +14,7 @@ "status": "πŸ”” @lith-light-g β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44439/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44631/result.json b/src/_tests/fixtures/44631/result.json index 97cf27132..908b4e1af 100644 --- a/src/_tests/fixtures/44631/result.json +++ b/src/_tests/fixtures/44631/result.json @@ -14,6 +14,7 @@ "status": "@mAAdhaTTah Unfortunately, this pull request currently has a merge conflict πŸ˜₯. Please update your PR branch to be up-to-date with respect to master. Have a nice day!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44857/result.json b/src/_tests/fixtures/44857/result.json index 3ecd03109..5df627f27 100644 --- a/src/_tests/fixtures/44857/result.json +++ b/src/_tests/fixtures/44857/result.json @@ -23,6 +23,7 @@ "status": "It has been more than two weeks and this PR still has no reviews.\n\nI'll bump it to the DT maintainer queue. Thank you for your patience, @ExE-Boss.\n\n(Ping @Microsoft, @DefinitelyTyped, @jkomyno, @a-tarasyuk, @alvis, @r3nya, @btoueg, @brunoscheufler, @smac89, @touffy, @DeividasBakanas, @eyqs, @Flarna, @Hannes-Magnusson-CK, @KSXGitHub, @hoo29, @kjin, @ajafff, @islishude, @mwiktorczyk, @mohsen1, @n-e, @galkin, @parambirs, @eps1lon, @SimonSchick, @ThomasdenH, @WilcoBakker, @wwwy3y3, @samuela, @kuehlein, @j-oliveras, @bhongy, @chyzwar, @trivikr, @nguymin4, @yoursunny, @qwelias, @Ryan-Willpower, @peterblazejewicz, @addaleax, @JasonHK.)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44989-14days/result.json b/src/_tests/fixtures/44989-14days/result.json index c7ca3ae07..fa707036b 100644 --- a/src/_tests/fixtures/44989-14days/result.json +++ b/src/_tests/fixtures/44989-14days/result.json @@ -20,6 +20,7 @@ "status": "Re-ping @petr-motejlek / @TheHandsomeCoder, @donnut, @mdekrey, @sbking, @afharo, @teves-castro, @1M0reBug, @hojberg, @samsonkeung, @angeloocana, @raynerd, @moshensky, @ethanresnick, @deftomat, @blimusiek, @biern, @rayhaneh, @rgm, @drewwyatt, @jottenlips, @minitesh, @krantisinh, @pirix-gh, @brekk, @nemo108, @jituanlin, @Philippe-mills, @Saul-Mirone, @Nicholaiii:\n\nThis PR has been ready to merge for over a week, and I haven't seen any requests to merge it. I will close it on Jul 6th (in three weeks) if this doesn't happen.\n\n(If there's no reason to avoid merging it, please do so. Otherwise, if it shouldn't be merged or if it needs more time, please close it or turn it into a draft.)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44989-32days/result.json b/src/_tests/fixtures/44989-32days/result.json index 519b80538..1707ed5c6 100644 --- a/src/_tests/fixtures/44989-32days/result.json +++ b/src/_tests/fixtures/44989-32days/result.json @@ -20,6 +20,7 @@ "status": "After a month, no one has requested merging the PR 😞. I'm going to assume that the change is not wanted after all, and will therefore close it." } ], + "explanations": [], "shouldClose": true, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44989-3days/result.json b/src/_tests/fixtures/44989-3days/result.json index fc56c02e5..c485d7799 100644 --- a/src/_tests/fixtures/44989-3days/result.json +++ b/src/_tests/fixtures/44989-3days/result.json @@ -15,6 +15,7 @@ "status": "@petr-motejlek Everything looks good here. Great job! I am ready to merge this PR (at 9ca6086) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n\n(@TheHandsomeCoder, @donnut, @mdekrey, @sbking, @afharo, @teves-castro, @1M0reBug, @hojberg, @samsonkeung, @angeloocana, @raynerd, @moshensky, @ethanresnick, @deftomat, @blimusiek, @biern, @rayhaneh, @rgm, @drewwyatt, @jottenlips, @minitesh, @krantisinh, @pirix-gh, @brekk, @nemo108, @jituanlin, @Philippe-mills, @Saul-Mirone, @Nicholaiii: you can do this too.)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/44989-7days/result.json b/src/_tests/fixtures/44989-7days/result.json index 32abc71d5..3b47a93d0 100644 --- a/src/_tests/fixtures/44989-7days/result.json +++ b/src/_tests/fixtures/44989-7days/result.json @@ -15,6 +15,7 @@ "status": "@petr-motejlek Everything looks good here. Great job! I am ready to merge this PR (at 9ca6086) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n\n(@TheHandsomeCoder, @donnut, @mdekrey, @sbking, @afharo, @teves-castro, @1M0reBug, @hojberg, @samsonkeung, @angeloocana, @raynerd, @moshensky, @ethanresnick, @deftomat, @blimusiek, @biern, @rayhaneh, @rgm, @drewwyatt, @jottenlips, @minitesh, @krantisinh, @pirix-gh, @brekk, @nemo108, @jituanlin, @Philippe-mills, @Saul-Mirone, @Nicholaiii: you can do this too.)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/45137/result.json b/src/_tests/fixtures/45137/result.json index d2b05eaa5..fcf97313d 100644 --- a/src/_tests/fixtures/45137/result.json +++ b/src/_tests/fixtures/45137/result.json @@ -17,6 +17,7 @@ "status": "@lirbank Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `mongodb` [on npm](https://www.npmjs.com/package/mongodb), [on unpkg](https://unpkg.com/browse/mongodb@latest/) (author is owner)\n - owner-approval: @LinusU\n - 1 removed owner: ✎@lirbank\n\n## Code Reviews\n\nThis PR can be merged once it's reviewed by a DT maintainer.\n\n## Status\n\n * βœ… No merge conflicts\n * βœ… Continuous integration tests have passed\n * ❌ Only a DT maintainer can approve changes [without tests](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-test-editing-an-existing-package)\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 ..." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/45627/result.json b/src/_tests/fixtures/45627/result.json index 8b0624942..f31ff1921 100644 --- a/src/_tests/fixtures/45627/result.json +++ b/src/_tests/fixtures/45627/result.json @@ -26,6 +26,7 @@ "status": "After a month, no one has requested merging the PR 😞. I'm going to assume that the change is not wanted after all, and will therefore close it." } ], + "explanations": [], "shouldClose": true, "shouldMerge": true, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/45836/result.json b/src/_tests/fixtures/45836/result.json index f1b7092cd..ac67f023f 100644 --- a/src/_tests/fixtures/45836/result.json +++ b/src/_tests/fixtures/45836/result.json @@ -15,6 +15,7 @@ "status": ":passport_control: Hi @mmorearty,\n\nI can't [accept a merge request](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-make-a-pull-request) until the PR has a green CI and was appropriately reviewed. I will let you know once that happens.\n\nThanks, and happy typing!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/45884/result.json b/src/_tests/fixtures/45884/result.json index a16bdbf25..83be5ac98 100644 --- a/src/_tests/fixtures/45884/result.json +++ b/src/_tests/fixtures/45884/result.json @@ -19,6 +19,7 @@ "status": "@sgratzl Everything looks good here. Great job! I am ready to merge this PR (at 1dcf44a) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n\n(@phreed, @wy193777, @ypconstante, @janniclas, @cerberuser, @gsbelarus, @peterjferrarotto, @spaxe, @appleparan, @Veckodag: you can do this too.)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/45888/result.json b/src/_tests/fixtures/45888/result.json index 6d08fb4a6..b8df4a1e2 100644 --- a/src/_tests/fixtures/45888/result.json +++ b/src/_tests/fixtures/45888/result.json @@ -18,6 +18,7 @@ "status": "πŸ”” @sampsonjoliver @andipaetzold @JiriBalcar @CodeLenny β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45888/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/45890/result.json b/src/_tests/fixtures/45890/result.json index f37164f96..7ad2a00c0 100644 --- a/src/_tests/fixtures/45890/result.json +++ b/src/_tests/fixtures/45890/result.json @@ -14,6 +14,7 @@ "status": "πŸ”” @dimkirt β€” you're the only owner, but it would still be good if you find someone to [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45890/files) in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/45946/result.json b/src/_tests/fixtures/45946/result.json index fcd635822..57374df64 100644 --- a/src/_tests/fixtures/45946/result.json +++ b/src/_tests/fixtures/45946/result.json @@ -14,6 +14,7 @@ "status": "πŸ”” @rubensworks β€” you're the only owner, but it would still be good if you find someone to [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45946/files) in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/45982/result.json b/src/_tests/fixtures/45982/result.json index 42b94acd7..446ecb278 100644 --- a/src/_tests/fixtures/45982/result.json +++ b/src/_tests/fixtures/45982/result.json @@ -9,6 +9,7 @@ "status": "@dasa β€” There was an error that prevented me from properly processing this PR:\n\n error parsing owners: At 1:1 : Expected /\\/\\/ Type definitions for (non-npm package )?/" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/45999/result.json b/src/_tests/fixtures/45999/result.json index b6d714f80..c9cfba5db 100644 --- a/src/_tests/fixtures/45999/result.json +++ b/src/_tests/fixtures/45999/result.json @@ -15,6 +15,7 @@ "status": "@alexpyzhianov Everything looks good here. Great job! I am ready to merge this PR (at 381a2a9) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n\n(@johnnyreilly, @bbenezech, @pzavolinsky, @digiguru, @ericanderson, @DovydasNavickas, @theruther4d, @guilhermehubner, @ferdaber, @jrakotoharisoa, @pascaloliv, @hotell, @franklixuefei, @Jessidhia, @saranshkataria, @lukyth, @eps1lon, @zieka, @dancerphil, @dimitropoulos, @disjukr, @vhfmag, @hellatan: you can do this too.)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/46008/result.json b/src/_tests/fixtures/46008/result.json index a7a7c3271..d51d5524d 100644 --- a/src/_tests/fixtures/46008/result.json +++ b/src/_tests/fixtures/46008/result.json @@ -19,6 +19,7 @@ "status": "@risingBirdSong Everything looks good here. Great job! I am ready to merge this PR (at 3e19cb9) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n\n(@p5-types, @Zalastax: you can do this too.)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/46019/result.json b/src/_tests/fixtures/46019/result.json index b84054eed..8c270688b 100644 --- a/src/_tests/fixtures/46019/result.json +++ b/src/_tests/fixtures/46019/result.json @@ -15,6 +15,7 @@ "status": "@peterblazejewicz Everything looks good here. Great job! I am ready to merge this PR (at ceca9f7) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/46120/result.json b/src/_tests/fixtures/46120/result.json index 77b39e27b..58006a21b 100644 --- a/src/_tests/fixtures/46120/result.json +++ b/src/_tests/fixtures/46120/result.json @@ -20,6 +20,7 @@ "status": ":passport_control: Hi @reubenrybnik,\n\nI can't [accept a merge request](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-make-a-pull-request) until the PR has a green CI and was appropriately reviewed. I will let you know once that happens.\n\nThanks, and happy typing!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/46191/result.json b/src/_tests/fixtures/46191/result.json index 7f34630ce..0050a60cb 100644 --- a/src/_tests/fixtures/46191/result.json +++ b/src/_tests/fixtures/46191/result.json @@ -23,6 +23,7 @@ "status": "@jordanoverbye The CI build failed! Please [review the logs for more information](https://github.com/DefinitelyTyped/DefinitelyTyped/commit/3cc81dbde57a1b0eda6f69f539fa49b8d420adff/checks?check_suite_id=938074936).\r\n\r\nOnce you've pushed the fixes, the build will automatically re-run. Thanks!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/46196/result.json b/src/_tests/fixtures/46196/result.json index ffe777f34..35ace154a 100644 --- a/src/_tests/fixtures/46196/result.json +++ b/src/_tests/fixtures/46196/result.json @@ -11,6 +11,7 @@ "status": "πŸ”” @HeeL β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46196/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/46279/result.json b/src/_tests/fixtures/46279/result.json index a7d8c8606..6174753b1 100644 --- a/src/_tests/fixtures/46279/result.json +++ b/src/_tests/fixtures/46279/result.json @@ -19,6 +19,7 @@ "status": "πŸ”” @pzingg β€” you're the only owner, but it would still be good if you find someone to [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46279/files) in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/46804/result.json b/src/_tests/fixtures/46804/result.json index ab7e7840b..8a1761f49 100644 --- a/src/_tests/fixtures/46804/result.json +++ b/src/_tests/fixtures/46804/result.json @@ -17,6 +17,7 @@ "status": "πŸ”” @hrngoode @adina-todoran @BreadAndRoses95 β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46804/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/46879/result.json b/src/_tests/fixtures/46879/result.json index 4b87b1d5a..23c7dc19d 100644 --- a/src/_tests/fixtures/46879/result.json +++ b/src/_tests/fixtures/46879/result.json @@ -13,6 +13,7 @@ "status": "πŸ”” @sudoplz @GiedriusGrabauskas β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46879/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/47017-blessed-and-one-owner/result.json b/src/_tests/fixtures/47017-blessed-and-one-owner/result.json index 14288e838..263c29ae6 100644 --- a/src/_tests/fixtures/47017-blessed-and-one-owner/result.json +++ b/src/_tests/fixtures/47017-blessed-and-one-owner/result.json @@ -10,6 +10,7 @@ "status": "@mastermatt Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 2 packages in this PR\n\n* `express-serve-static-core` [on npm](https://www.npmjs.com/package/express-serve-static-core), [on unpkg](https://unpkg.com/browse/express-serve-static-core@latest/)\n - owner-approval: @dwrss\n* `express` [on npm](https://www.npmjs.com/package/express), [on unpkg](https://unpkg.com/browse/express@latest/)\n\n## Code Reviews\n\nThis PR can be merged once it's reviewed.\n\n## Status\n\n * βœ… No merge conflicts\n * βœ… Continuous integration tests have passed\n * ❌ All owners or a DT maintainer needs to approve changes which affect more than one package\n - βœ… express-serve-static-core\n - ❌ express\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 ..." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/47017-blessed-and-two-owner/result.json b/src/_tests/fixtures/47017-blessed-and-two-owner/result.json index f68fc505e..8fc7c858e 100644 --- a/src/_tests/fixtures/47017-blessed-and-two-owner/result.json +++ b/src/_tests/fixtures/47017-blessed-and-two-owner/result.json @@ -16,6 +16,7 @@ "status": "@mastermatt Everything looks good here. Great job! I am ready to merge this PR (at dbe687d) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/47017-blessed/result.json b/src/_tests/fixtures/47017-blessed/result.json index 60e0393c7..ab6f65209 100644 --- a/src/_tests/fixtures/47017-blessed/result.json +++ b/src/_tests/fixtures/47017-blessed/result.json @@ -14,6 +14,7 @@ "status": "πŸ”” @borisyankov @19majkel94 @kacepe @micksatana @samijaber @aereal @JoseLion @dwrss @andoshin11 @CMUH @puneetar @dfrankland β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/47017/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/47017/result.json b/src/_tests/fixtures/47017/result.json index 69cc7992c..48b7ad6d9 100644 --- a/src/_tests/fixtures/47017/result.json +++ b/src/_tests/fixtures/47017/result.json @@ -14,6 +14,7 @@ "status": "πŸ”” @borisyankov @19majkel94 @kacepe @micksatana @samijaber @aereal @JoseLion @dwrss @andoshin11 @CMUH @puneetar @dfrankland β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/47017/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/48216/result.json b/src/_tests/fixtures/48216/result.json index 9ba676916..b048047ef 100644 --- a/src/_tests/fixtures/48216/result.json +++ b/src/_tests/fixtures/48216/result.json @@ -11,6 +11,7 @@ "status": "πŸ”” @innovation-team @rlbaxter β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/48216/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/48236/result.json b/src/_tests/fixtures/48236/result.json index 21950903b..8e0de7773 100644 --- a/src/_tests/fixtures/48236/result.json +++ b/src/_tests/fixtures/48236/result.json @@ -18,6 +18,7 @@ "status": "@jablko Everything looks good here. Great job! I am ready to merge this PR (at b4d71f6) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n\n(@climba03003: you can do this too.)" } ], + "explanations": [], "shouldClose": false, "shouldMerge": true, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/48652-merge-offer/result.json b/src/_tests/fixtures/48652-merge-offer/result.json index aa5a7f6ce..1499e4b64 100644 --- a/src/_tests/fixtures/48652-merge-offer/result.json +++ b/src/_tests/fixtures/48652-merge-offer/result.json @@ -20,6 +20,7 @@ "status": "@RyanCavanaugh, @thorn0, @falsyvalues Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/48652-prereq/result.json b/src/_tests/fixtures/48652-prereq/result.json index 8d3caa424..9e2be4c46 100644 --- a/src/_tests/fixtures/48652-prereq/result.json +++ b/src/_tests/fixtures/48652-prereq/result.json @@ -24,6 +24,7 @@ "status": ":passport_control: Hi @mgol,\n\nI can't [accept a merge request](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-make-a-pull-request) until the PR has a green CI and was appropriately reviewed. I will let you know once that happens.\n\nThanks, and happy typing!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/48652-retract-merge-offer-and-prerequest/result.json b/src/_tests/fixtures/48652-retract-merge-offer-and-prerequest/result.json index c7a627d0a..4972185cf 100644 --- a/src/_tests/fixtures/48652-retract-merge-offer-and-prerequest/result.json +++ b/src/_tests/fixtures/48652-retract-merge-offer-and-prerequest/result.json @@ -18,6 +18,7 @@ "status": ":passport_control: Hi @mgol,\n\nI can't [accept a merge request](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-make-a-pull-request) until the PR has a green CI and was appropriately reviewed. I will let you know once that happens.\n\nThanks, and happy typing!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/48652-retract-merge-offer/result.json b/src/_tests/fixtures/48652-retract-merge-offer/result.json index 6e9648234..6cb7e1194 100644 --- a/src/_tests/fixtures/48652-retract-merge-offer/result.json +++ b/src/_tests/fixtures/48652-retract-merge-offer/result.json @@ -14,6 +14,7 @@ "status": "@mgol One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/48708/result.json b/src/_tests/fixtures/48708/result.json index 75d99cc91..a1c0efeac 100644 --- a/src/_tests/fixtures/48708/result.json +++ b/src/_tests/fixtures/48708/result.json @@ -20,6 +20,7 @@ "status": "@martin-badin I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Dec 12th (in a week) if the issues aren't addressed." } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/48945/result.json b/src/_tests/fixtures/48945/result.json index 639edf992..eb94b2c2d 100644 --- a/src/_tests/fixtures/48945/result.json +++ b/src/_tests/fixtures/48945/result.json @@ -14,6 +14,7 @@ "status": "@google-api-typings-generator One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/49417/result.json b/src/_tests/fixtures/49417/result.json index 7060b732e..cea59b057 100644 --- a/src/_tests/fixtures/49417/result.json +++ b/src/_tests/fixtures/49417/result.json @@ -19,6 +19,7 @@ "status": "@tuuling Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/49548/result.json b/src/_tests/fixtures/49548/result.json index 8a9272a2a..0af77ae79 100644 --- a/src/_tests/fixtures/49548/result.json +++ b/src/_tests/fixtures/49548/result.json @@ -19,6 +19,7 @@ "status": "Re-ping Β«anyone?Β»:\n\nThis PR has been out for over a week, yet I haven't seen any reviews.\n\nCould someone please give it some attention? Thanks!" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/49575/result.json b/src/_tests/fixtures/49575/result.json index b9a794fe4..d276d0eef 100644 --- a/src/_tests/fixtures/49575/result.json +++ b/src/_tests/fixtures/49575/result.json @@ -18,6 +18,7 @@ "status": "@elibarzilay, @sandersn Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?" } ], + "explanations": [], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/49639/_downloads.json b/src/_tests/fixtures/49639/_downloads.json new file mode 100644 index 000000000..e8d47bfba --- /dev/null +++ b/src/_tests/fixtures/49639/_downloads.json @@ -0,0 +1,3 @@ +{ + "jasmine": 7855902 +} diff --git a/src/_tests/fixtures/49639/_files.json b/src/_tests/fixtures/49639/_files.json new file mode 100644 index 000000000..bb1420663 --- /dev/null +++ b/src/_tests/fixtures/49639/_files.json @@ -0,0 +1,8 @@ +{ + "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856:types/jasmine/tsconfig.json": "{\n \"files\": [\n \"index.d.ts\",\n \"jasmine-tests.ts\"\n ],\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"lib\": [\n \"es6\",\n \"dom\"\n ],\n \"noImplicitAny\": true,\n \"noImplicitThis\": true,\n \"strictNullChecks\": true,\n \"baseUrl\": \"../\",\n \"typeRoots\": [\n \"../\"\n ],\n \"types\": [],\n \"noEmit\": true,\n \"forceConsistentCasingInFileNames\": true\n }\n}\n", + "master:types/jasmine/tsconfig.json": "{\n \"files\": [\n \"index.d.ts\",\n \"jasmine-tests.ts\"\n ],\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"lib\": [\n \"es6\",\n \"dom\"\n ],\n \"noImplicitAny\": true,\n \"noImplicitThis\": true,\n \"strictNullChecks\": true,\n \"strictFunctionTypes\": false,\n \"baseUrl\": \"../\",\n \"typeRoots\": [\n \"../\"\n ],\n \"types\": [],\n \"noEmit\": true,\n \"forceConsistentCasingInFileNames\": true\n }\n}\n", + "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856:types/jasmine/tslint.json": "{\n \"extends\": \"dtslint/dt.json\",\n \"rules\": {\n \"await-promise\": false,\n \"ban-types\": false,\n \"no-declare-current-package\": false,\n \"no-empty-interface\": false,\n \"no-single-declare-module\": false,\n \"no-unnecessary-generics\": false,\n \"no-var-keyword\": false,\n \"one-variable-per-declaration\": false,\n \"only-arrow-functions\": false\n }\n}\n", + "master:types/jasmine/tslint.json": "{\n \"extends\": \"dtslint/dt.json\",\n \"rules\": {\n \"ban-types\": false,\n \"no-declare-current-package\": false,\n \"no-empty-interface\": false,\n \"no-single-declare-module\": false,\n \"no-unnecessary-generics\": false,\n \"no-var-keyword\": false,\n \"one-variable-per-declaration\": false,\n \"only-arrow-functions\": false\n }\n}\n", + "master:types/jasmine/index.d.ts": "// Type definitions for Jasmine 3.6\n// Project: http://jasmine.github.io\n// Definitions by: Boris Yankov \n// Theodore Brown \n// David PΓ€rsson \n// Gabe Moothart \n// Lukas Zech \n// Boris Breuer \n// Chris Yungmann \n// Giles Roadnight \n// Yaroslav Admin \n// Domas Trijonis \n// Moshe Kolodny \n// Stephen Farrar \n// Alex Povar \n// Dominik Ehrenberg \n// Chives \n// kirjs \n// Md. Enzam Hossain \n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n\n// For ddescribe / iit use : https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/karma-jasmine/karma-jasmine.d.ts\n\n/**\n * @deprecated Use {@link jasmine.ImplementationCallback} instead.\n */\ntype ImplementationCallback = jasmine.ImplementationCallback;\n\n/**\n * Create a group of specs (often called a suite).\n * @param description Textual description of the group\n * @param specDefinitions Function for Jasmine to invoke that will define inner suites a specs\n */\ndeclare function describe(description: string, specDefinitions: () => void): void;\n\n/**\n * A focused `describe`. If suites or specs are focused, only those that are focused will be executed.\n * @param description Textual description of the group\n * @param specDefinitions Function for Jasmine to invoke that will define inner suites a specs\n */\ndeclare function fdescribe(description: string, specDefinitions: () => void): void;\n\n/**\n * A temporarily disabled `describe`. Specs within an xdescribe will be marked pending and not executed.\n * @param description Textual description of the group\n * @param specDefinitions Function for Jasmine to invoke that will define inner suites a specs\n */\ndeclare function xdescribe(description: string, specDefinitions: () => void): void;\n\n/**\n * Define a single spec. A spec should contain one or more expectations that test the state of the code.\n * A spec whose expectations all succeed will be passing and a spec with any failures will fail.\n * @param expectation Textual description of what this spec is checking\n * @param assertion Function that contains the code of your test. If not provided the test will be pending.\n * @param timeout Custom timeout for an async spec.\n */\ndeclare function it(expectation: string, assertion?: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * A focused `it`. If suites or specs are focused, only those that are focused will be executed.\n * @param expectation Textual description of what this spec is checking\n * @param assertion Function that contains the code of your test. If not provided the test will be pending.\n * @param timeout Custom timeout for an async spec.\n */\ndeclare function fit(expectation: string, assertion?: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * A temporarily disabled `it`. The spec will report as pending and will not be executed.\n * @param expectation Textual description of what this spec is checking\n * @param assertion Function that contains the code of your test. If not provided the test will be pending.\n * @param timeout Custom timeout for an async spec.\n */\ndeclare function xit(expectation: string, assertion?: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * Mark a spec as pending, expectation results will be ignored.\n * If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending.\n * @param reason Reason the spec is pending.\n */\ndeclare function pending(reason?: string): void;\n\n/**\n * Sets a user-defined property that will be provided to reporters as\n * part of the properties field of SpecResult.\n * @since 3.6.0\n */\ndeclare function setSpecProperty(key: string, value: unknown): void;\n\n/**\n * Sets a user-defined property that will be provided to reporters as\n * part of the properties field of SuiteResult.\n * @since 3.6.0\n */\ndeclare function setSuiteProperty(key: string, value: unknown): void;\n\n/**\n * Run some shared setup before each of the specs in the describe in which it is called.\n * @param action Function that contains the code to setup your specs.\n * @param timeout Custom timeout for an async beforeEach.\n */\ndeclare function beforeEach(action: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * Run some shared teardown after each of the specs in the describe in which it is called.\n * @param action Function that contains the code to teardown your specs.\n * @param timeout Custom timeout for an async afterEach.\n */\ndeclare function afterEach(action: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * Run some shared setup once before all of the specs in the describe are run.\n * Note: Be careful, sharing the setup from a beforeAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.\n * @param action Function that contains the code to setup your specs.\n * @param timeout Custom timeout for an async beforeAll.\n */\ndeclare function beforeAll(action: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * Run some shared teardown once before all of the specs in the describe are run.\n * Note: Be careful, sharing the teardown from a afterAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.\n * @param action Function that contains the code to teardown your specs.\n * @param timeout Custom timeout for an async afterAll\n */\ndeclare function afterAll(action: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * Create an expectation for a spec.\n * @checkReturnValue see https://tsetse.info/check-return-value\n * @param spy\n */\ndeclare function expect(spy: T | jasmine.Spy): jasmine.FunctionMatchers;\n\n/**\n * Create an expectation for a spec.\n * @checkReturnValue see https://tsetse.info/check-return-value\n * @param actual\n */\ndeclare function expect(actual: ArrayLike): jasmine.ArrayLikeMatchers;\n\n/**\n * Create an expectation for a spec.\n * @checkReturnValue see https://tsetse.info/check-return-value\n * @param actual Actual computed value to test expectations against.\n */\ndeclare function expect(actual: T): jasmine.Matchers;\n\n/**\n * Create an expectation for a spec.\n */\ndeclare function expect(): jasmine.NothingMatcher;\n\n/**\n * Create an asynchronous expectation for a spec. Note that the matchers\n * that are provided by an asynchronous expectation all return promises\n * which must be either returned from the spec or waited for using `await`\n * in order for Jasmine to associate them with the correct spec.\n * @checkReturnValue see https://tsetse.info/check-return-value\n * @param actual Actual computed value to test expectations against.\n */\ndeclare function expectAsync(actual: T|PromiseLike): jasmine.AsyncMatchers;\n\n/**\n * Explicitly mark a spec as failed.\n * @param e Reason for the failure\n */\ndeclare function fail(e?: any): void;\n\n/**\n * Action method that should be called when the async work is complete.\n */\ninterface DoneFn extends Function {\n (): void;\n\n /** fails the spec and indicates that it has completed. If the message is an Error, Error.message is used */\n fail: (message?: Error | string) => void;\n}\n\n/**\n * Install a spy onto an existing object.\n * @param object The object upon which to install the `Spy`.\n * @param method The name of the method to replace with a `Spy`.\n */\ndeclare function spyOn(\n object: T, method: T[K] extends Function ? K : never,\n): jasmine.Spy<\n T[K] extends jasmine.Func ? T[K] :\n T[K] extends { new (...args: infer A): infer V } ? (...args: A) => V :\n never\n>;\n\n/**\n * Install a spy on a property installed with `Object.defineProperty` onto an existing object.\n * @param object The object upon which to install the `Spy`.\n * @param property The name of the property to replace with a `Spy`.\n * @param accessType The access type (get|set) of the property to `Spy` on.\n */\ndeclare function spyOnProperty(object: T, property: keyof T, accessType?: 'get' | 'set'): jasmine.Spy;\n\n/**\n * Installs spies on all writable and configurable properties of an object.\n * @param object The object upon which to install the `Spy`s.\n */\ndeclare function spyOnAllFunctions(object: T): jasmine.SpyObj;\n\ndeclare function runs(asyncMethod: Function): void;\ndeclare function waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void;\ndeclare function waits(timeout?: number): void;\n\ndeclare namespace jasmine {\n type Func = (...args: any[]) => any;\n\n // Use trick with prototype to allow abstract classes.\n // More info: https://stackoverflow.com/a/38642922/2009373\n type Constructor = Function & { prototype: any };\n\n type ImplementationCallback = (() => PromiseLike) | (() => void) | ((done: DoneFn) => void);\n\n type ExpectedRecursive = T | ObjectContaining | AsymmetricMatcher | {\n [K in keyof T]: ExpectedRecursive | Any;\n };\n type Expected = T | ObjectContaining | AsymmetricMatcher | Any | Spy | {\n [K in keyof T]: ExpectedRecursive;\n };\n type SpyObjMethodNames =\n T extends undefined ?\n (ReadonlyArray | { [methodName: string]: any }) :\n (ReadonlyArray | { [P in keyof T]?: T[P] extends Func ? ReturnType : any });\n\n type SpyObjPropertyNames =\n T extends undefined ?\n (ReadonlyArray | { [propertyName: string]: any }) :\n (Readonly", + "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856:types/jasmine/index.d.ts": "// Type definitions for Jasmine 3.6\n// Project: http://jasmine.github.io\n// Definitions by: Boris Yankov \n// Theodore Brown \n// David PΓ€rsson \n// Gabe Moothart \n// Lukas Zech \n// Boris Breuer \n// Chris Yungmann \n// Giles Roadnight \n// Yaroslav Admin \n// Domas Trijonis \n// Moshe Kolodny \n// Stephen Farrar \n// Alex Povar \n// Dominik Ehrenberg \n// Chives \n// kirjs \n// Md. Enzam Hossain \n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n\n// For ddescribe / iit use : https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/karma-jasmine/karma-jasmine.d.ts\n\n/**\n * @deprecated Use {@link jasmine.ImplementationCallback} instead.\n */\ntype ImplementationCallback = jasmine.ImplementationCallback;\n\n/**\n * Create a group of specs (often called a suite).\n * @param description Textual description of the group\n * @param specDefinitions Function for Jasmine to invoke that will define inner suites a specs\n */\ndeclare function describe(description: string, specDefinitions: () => void): void;\n\n/**\n * A focused `describe`. If suites or specs are focused, only those that are focused will be executed.\n * @param description Textual description of the group\n * @param specDefinitions Function for Jasmine to invoke that will define inner suites a specs\n */\ndeclare function fdescribe(description: string, specDefinitions: () => void): void;\n\n/**\n * A temporarily disabled `describe`. Specs within an xdescribe will be marked pending and not executed.\n * @param description Textual description of the group\n * @param specDefinitions Function for Jasmine to invoke that will define inner suites a specs\n */\ndeclare function xdescribe(description: string, specDefinitions: () => void): void;\n\n/**\n * Define a single spec. A spec should contain one or more expectations that test the state of the code.\n * A spec whose expectations all succeed will be passing and a spec with any failures will fail.\n * @param expectation Textual description of what this spec is checking\n * @param assertion Function that contains the code of your test. If not provided the test will be pending.\n * @param timeout Custom timeout for an async spec.\n */\ndeclare function it(expectation: string, assertion?: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * A focused `it`. If suites or specs are focused, only those that are focused will be executed.\n * @param expectation Textual description of what this spec is checking\n * @param assertion Function that contains the code of your test. If not provided the test will be pending.\n * @param timeout Custom timeout for an async spec.\n */\ndeclare function fit(expectation: string, assertion?: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * A temporarily disabled `it`. The spec will report as pending and will not be executed.\n * @param expectation Textual description of what this spec is checking\n * @param assertion Function that contains the code of your test. If not provided the test will be pending.\n * @param timeout Custom timeout for an async spec.\n */\ndeclare function xit(expectation: string, assertion?: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * Mark a spec as pending, expectation results will be ignored.\n * If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending.\n * @param reason Reason the spec is pending.\n */\ndeclare function pending(reason?: string): void;\n\n/**\n * Sets a user-defined property that will be provided to reporters as\n * part of the properties field of SpecResult.\n * @since 3.6.0\n */\ndeclare function setSpecProperty(key: string, value: unknown): void;\n\n/**\n * Sets a user-defined property that will be provided to reporters as\n * part of the properties field of SuiteResult.\n * @since 3.6.0\n */\ndeclare function setSuiteProperty(key: string, value: unknown): void;\n\n/**\n * Run some shared setup before each of the specs in the describe in which it is called.\n * @param action Function that contains the code to setup your specs.\n * @param timeout Custom timeout for an async beforeEach.\n */\ndeclare function beforeEach(action: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * Run some shared teardown after each of the specs in the describe in which it is called.\n * @param action Function that contains the code to teardown your specs.\n * @param timeout Custom timeout for an async afterEach.\n */\ndeclare function afterEach(action: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * Run some shared setup once before all of the specs in the describe are run.\n * Note: Be careful, sharing the setup from a beforeAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.\n * @param action Function that contains the code to setup your specs.\n * @param timeout Custom timeout for an async beforeAll.\n */\ndeclare function beforeAll(action: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * Run some shared teardown once before all of the specs in the describe are run.\n * Note: Be careful, sharing the teardown from a afterAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.\n * @param action Function that contains the code to teardown your specs.\n * @param timeout Custom timeout for an async afterAll\n */\ndeclare function afterAll(action: jasmine.ImplementationCallback, timeout?: number): void;\n\n/**\n * Create an expectation for a spec.\n * @checkReturnValue see https://tsetse.info/check-return-value\n * @param spy\n */\ndeclare function expect(spy: T | jasmine.Spy): jasmine.FunctionMatchers;\n\n/**\n * Create an expectation for a spec.\n * @checkReturnValue see https://tsetse.info/check-return-value\n * @param actual\n */\ndeclare function expect(actual: ArrayLike): jasmine.ArrayLikeMatchers;\n\n/**\n * Create an expectation for a spec.\n * @checkReturnValue see https://tsetse.info/check-return-value\n * @param actual Actual computed value to test expectations against.\n */\ndeclare function expect(actual: T): jasmine.Matchers;\n\n/**\n * Create an expectation for a spec.\n */\ndeclare function expect(): jasmine.NothingMatcher;\n\n/**\n * Create an asynchronous expectation for a spec. Note that the matchers\n * that are provided by an asynchronous expectation all return promises\n * which must be either returned from the spec or waited for using `await`\n * in order for Jasmine to associate them with the correct spec.\n * @checkReturnValue see https://tsetse.info/check-return-value\n * @param actual Actual computed value to test expectations against.\n */\ndeclare function expectAsync(actual: T|PromiseLike): jasmine.AsyncMatchers;\n\n/**\n * Explicitly mark a spec as failed.\n * @param e Reason for the failure\n */\ndeclare function fail(e?: any): void;\n\n/**\n * Action method that should be called when the async work is complete.\n */\ninterface DoneFn extends Function {\n (): void;\n\n /** fails the spec and indicates that it has completed. If the message is an Error, Error.message is used */\n fail: (message?: Error | string) => void;\n}\n\n/**\n * Install a spy onto an existing object.\n * @param object The object upon which to install the `Spy`.\n * @param method The name of the method to replace with a `Spy`.\n */\ndeclare function spyOn(\n object: T, method: T[K] extends Function ? K : never,\n): jasmine.Spy<\n T[K] extends jasmine.Func ? T[K] :\n T[K] extends { new (...args: infer A): infer V } ? (...args: A) => V :\n never\n>;\n\n/**\n * Install a spy on a property installed with `Object.defineProperty` onto an existing object.\n * @param object The object upon which to install the `Spy`.\n * @param property The name of the property to replace with a `Spy`.\n * @param accessType The access type (get|set) of the property to `Spy` on.\n */\ndeclare function spyOnProperty(object: T, property: keyof T, accessType?: 'get' | 'set'): jasmine.Spy;\n\n/**\n * Installs spies on all writable and configurable properties of an object.\n * @param object The object upon which to install the `Spy`s.\n */\ndeclare function spyOnAllFunctions(object: T): jasmine.SpyObj;\n\ndeclare function runs(asyncMethod: Function): void;\ndeclare function waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void;\ndeclare function waits(timeout?: number): void;\n\ndeclare namespace jasmine {\n type Func = (...args: any[]) => any;\n\n // Use trick with prototype to allow abstract classes.\n // More info: https://stackoverflow.com/a/38642922/2009373\n type Constructor = Function & { prototype: any };\n\n type ImplementationCallback = (() => PromiseLike) | (() => void) | ((done: DoneFn) => void);\n\n type ExpectedRecursive = T | ObjectContaining | AsymmetricMatcher | {\n [K in keyof T]: ExpectedRecursive | Any;\n };\n type Expected = T | ObjectContaining | AsymmetricMatcher | Any | Spy | {\n [K in keyof T]: ExpectedRecursive;\n };\n type SpyObjMethodNames =\n T extends undefined ?\n (ReadonlyArray | { [methodName: string]: any }) :\n (ReadonlyArray | { [P in keyof T]?: T[P] extends Func ? ReturnType : any });\n\n type SpyObjPropertyNames =\n T extends undefined ?\n (ReadonlyArray | { [propertyName: string]: any }) :\n (Readonly" +} diff --git a/src/_tests/fixtures/49639/_response.json b/src/_tests/fixtures/49639/_response.json new file mode 100644 index 000000000..1f5e31485 --- /dev/null +++ b/src/_tests/fixtures/49639/_response.json @@ -0,0 +1,469 @@ +{ + "data": { + "repository": { + "pullRequest": { + "id": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx", + "title": "[jasmine] Make Promise more lax.", + "createdAt": "2020-11-17T22:13:49Z", + "author": { + "login": "ienzam", + "__typename": "User" + }, + "authorAssociation": "CONTRIBUTOR", + "baseRef": { + "name": "master", + "__typename": "Ref" + }, + "labels": { + "nodes": [ + { + "name": "Author is Owner", + "__typename": "Label" + }, + { + "name": "Config Edit", + "__typename": "Label" + }, + { + "name": "Critical package", + "__typename": "Label" + }, + { + "name": "Maintainer Approved", + "__typename": "Label" + }, + { + "name": "Owner Approved", + "__typename": "Label" + }, + { + "name": "Perf: Same", + "__typename": "Label" + }, + { + "name": "Self Merge", + "__typename": "Label" + }, + { + "name": "Untested Change", + "__typename": "Label" + } + ], + "__typename": "LabelConnection" + }, + "isDraft": false, + "mergeable": "UNKNOWN", + "number": 49639, + "state": "OPEN", + "headRefOid": "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856", + "timelineItems": { + "nodes": [ + { + "__typename": "IssueComment", + "author": { + "login": "ienzam", + "__typename": "User" + }, + "createdAt": "2020-11-17T22:14:24Z" + }, + { + "__typename": "IssueComment", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "createdAt": "2020-11-17T22:14:25Z" + }, + { + "__typename": "IssueComment", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "createdAt": "2020-11-17T22:14:26Z" + }, + { + "__typename": "MovedColumnsInProjectEvent", + "actor": { + "login": "typescript-bot", + "__typename": "User" + }, + "createdAt": "2020-11-17T22:19:13Z" + }, + { + "__typename": "IssueComment", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "createdAt": "2020-11-18T00:18:03Z" + }, + { + "__typename": "IssueComment", + "author": { + "login": "sandersn", + "__typename": "User" + }, + "createdAt": "2020-11-19T00:49:19Z" + }, + { + "__typename": "MovedColumnsInProjectEvent", + "actor": { + "login": "typescript-bot", + "__typename": "User" + }, + "createdAt": "2020-11-19T00:50:43Z" + }, + { + "__typename": "IssueComment", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "createdAt": "2020-11-19T00:50:44Z" + }, + { + "__typename": "MovedColumnsInProjectEvent", + "actor": { + "login": "typescript-bot", + "__typename": "User" + }, + "createdAt": "2020-11-19T16:12:54Z" + }, + { + "__typename": "IssueComment", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "createdAt": "2020-11-19T16:22:10Z" + } + ], + "__typename": "PullRequestTimelineItemsConnection" + }, + "reviews": { + "nodes": [ + { + "author": { + "login": "chivesrs", + "__typename": "User" + }, + "commit": { + "oid": "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856", + "abbreviatedOid": "c5e5c98", + "__typename": "Commit" + }, + "comments": { + "nodes": [], + "__typename": "PullRequestReviewCommentConnection" + }, + "authorAssociation": "CONTRIBUTOR", + "state": "APPROVED", + "submittedAt": "2020-11-18T01:47:38Z", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639#pullrequestreview-532956637", + "__typename": "PullRequestReview" + }, + { + "author": { + "login": "sandersn", + "__typename": "User" + }, + "commit": { + "oid": "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856", + "abbreviatedOid": "c5e5c98", + "__typename": "Commit" + }, + "comments": { + "nodes": [ + { + "author": { + "login": "sandersn", + "__typename": "User" + }, + "createdAt": "2020-11-19T00:49:50Z", + "__typename": "PullRequestReviewComment" + }, + { + "author": { + "login": "sandersn", + "__typename": "User" + }, + "createdAt": "2020-11-19T00:50:04Z", + "__typename": "PullRequestReviewComment" + } + ], + "__typename": "PullRequestReviewCommentConnection" + }, + "authorAssociation": "CONTRIBUTOR", + "state": "CHANGES_REQUESTED", + "submittedAt": "2020-11-19T00:50:09Z", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639#pullrequestreview-533997518", + "__typename": "PullRequestReview" + }, + { + "author": { + "login": "chivesrs", + "__typename": "User" + }, + "commit": { + "oid": "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856", + "abbreviatedOid": "c5e5c98", + "__typename": "Commit" + }, + "comments": { + "nodes": [ + { + "author": { + "login": "chivesrs", + "__typename": "User" + }, + "createdAt": "2020-11-19T06:44:19Z", + "__typename": "PullRequestReviewComment" + } + ], + "__typename": "PullRequestReviewCommentConnection" + }, + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "submittedAt": "2020-11-19T06:44:19Z", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639#pullrequestreview-534120973", + "__typename": "PullRequestReview" + }, + { + "author": { + "login": "chivesrs", + "__typename": "User" + }, + "commit": { + "oid": "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856", + "abbreviatedOid": "c5e5c98", + "__typename": "Commit" + }, + "comments": { + "nodes": [ + { + "author": { + "login": "chivesrs", + "__typename": "User" + }, + "createdAt": "2020-11-19T06:44:20Z", + "__typename": "PullRequestReviewComment" + } + ], + "__typename": "PullRequestReviewCommentConnection" + }, + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "submittedAt": "2020-11-19T06:44:20Z", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639#pullrequestreview-534120993", + "__typename": "PullRequestReview" + }, + { + "author": { + "login": "sandersn", + "__typename": "User" + }, + "commit": { + "oid": "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856", + "abbreviatedOid": "c5e5c98", + "__typename": "Commit" + }, + "comments": { + "nodes": [], + "__typename": "PullRequestReviewCommentConnection" + }, + "authorAssociation": "CONTRIBUTOR", + "state": "APPROVED", + "submittedAt": "2020-11-19T16:12:15Z", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639#pullrequestreview-534609504", + "__typename": "PullRequestReview" + } + ], + "__typename": "PullRequestReviewConnection" + }, + "commits": { + "totalCount": 1, + "nodes": [ + { + "commit": { + "checkSuites": { + "nodes": [ + { + "app": { + "name": "GitHub Actions", + "__typename": "App" + }, + "conclusion": "SUCCESS", + "resourcePath": "/DefinitelyTyped/DefinitelyTyped/commit/c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856/checks?check_suite_id=1518437432", + "status": "COMPLETED", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856/checks?check_suite_id=1518437432", + "__typename": "CheckSuite" + }, + { + "app": { + "name": "Azure Pipelines", + "__typename": "App" + }, + "conclusion": "SUCCESS", + "resourcePath": "/DefinitelyTyped/DefinitelyTyped/commit/c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856/checks?check_suite_id=1518438082", + "status": "COMPLETED", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856/checks?check_suite_id=1518438082", + "__typename": "CheckSuite" + } + ], + "__typename": "CheckSuiteConnection" + }, + "status": null, + "authoredDate": "2020-11-17T22:10:59Z", + "committedDate": "2020-11-17T22:10:59Z", + "pushedDate": "2020-11-17T22:12:35Z", + "abbreviatedOid": "c5e5c98", + "oid": "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856", + "__typename": "Commit" + }, + "__typename": "PullRequestCommit" + } + ], + "__typename": "PullRequestCommitConnection" + }, + "comments": { + "totalCount": 7, + "nodes": [ + { + "id": "MDEyOklzc3VlQ29tbWVudDcyOTI0NjE2OA==", + "author": { + "login": "ienzam", + "__typename": "User" + }, + "body": "@chivesrs", + "createdAt": "2020-11-17T22:14:24Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "MDEyOklzc3VlQ29tbWVudDcyOTI0NjE3Mw==", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "body": "@ienzam Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\nThis PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Have you considered [adding tests](https://github.com/DefinitelyTyped/DefinitelyTyped#editing-tests-on-an-existing-package) to cover the change you're making? Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you.\n\n## 1 package in this PR\n\n* `jasmine` [on npm](https://www.npmjs.com/package/jasmine), [on unpkg](https://unpkg.com/browse/jasmine@latest/) (author is owner)\n - owner-approval: @chivesrs\n\n## Code Reviews\n\nBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged.\n\n## Status\n\n * βœ… No merge conflicts\n * βœ… Continuous integration tests have passed\n * βœ… A DT maintainer needs to approve changes which affect module config files\n - `jasmine/tslint.json`: not the required form and not moving towards it\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", + "createdAt": "2020-11-17T22:14:25Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "MDEyOklzc3VlQ29tbWVudDcyOTI0NjE3Ng==", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "body": "πŸ”” @borisyankov @theodorejb @davidparsson @gmoothart @lukas-zech-software @Engineer2B @cyungmann @Roaders @devoto13 @fdim @kolodny @stephenfarrar @zvirja @djungowski @chivesrs @kirjs β€” please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on.\n", + "createdAt": "2020-11-17T22:14:26Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "MDEyOklzc3VlQ29tbWVudDcyOTI5MzAwMw==", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "body": "\n\nπŸ‘‹ **Hi there!** I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.\n\n\nLet’s review the numbers, shall we?\n\n\n\n
\nComparison details πŸ“Š\n\n| | master | #49639 | diff |\n| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------ |\n| **Batch compilation** | | | |\n| Memory usage (MiB) | 84.5 | 88.3 | +4.5% |\n| Type count | 14774 | 14956 | +1% |\n| Assignability cache size | 4884 | 4908 | 0% |\n| | | | |\n| **Language service** | | | |\n| Samples taken | 2741 | 2741 | 0% |\n| Identifiers in tests | 2741 | 2741 | 0% |\n| **`getCompletionsAtPosition`** | | | |\n|     Mean duration (ms) | 343.7 | 343.3 | -0.1% |\n|     Mean [CV](https://en.wikipedia.org/wiki/Coefficient_of_variation) | 8.3% | 8.9% | |\n|     Worst duration (ms) | 552.5 | 531.3 | -3.8% |\n|     Worst identifier | [hasAttribute](/DefinitelyTyped/DefinitelyTyped/blob/826041049fb0f02f5d4f5874f57e78b8b563cc77/types/jasmine/jasmine-tests.ts#L927) | [undefined](/DefinitelyTyped/DefinitelyTyped/blob/b3a70c1134842184d1c201e6c07fec8bc55d948f/types/jasmine/jasmine-tests.ts#L1802) | |\n| **`getQuickInfoAtPosition`** | | | |\n|     Mean duration (ms) | 349.6 | 347.6 | -0.6% |\n|     Mean [CV](https://en.wikipedia.org/wiki/Coefficient_of_variation) | 9.7% | 9.7% | |\n|     Worst duration (ms) | 460.9 | 515.4 | +11.8% |\n|     Worst identifier | [resolveTo](/DefinitelyTyped/DefinitelyTyped/blob/826041049fb0f02f5d4f5874f57e78b8b563cc77/types/jasmine/jasmine-tests.ts#L592) | [jasmine](/DefinitelyTyped/DefinitelyTyped/blob/b3a70c1134842184d1c201e6c07fec8bc55d948f/types/jasmine/jasmine-tests.ts#L1448) | |\n\n\n
\n\nIt looks like nothing changed too much. I won’t post performance data again unless it gets worse.", + "createdAt": "2020-11-18T00:18:03Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "MDEyOklzc3VlQ29tbWVudDczMDA1MDY4OA==", + "author": { + "login": "sandersn", + "__typename": "User" + }, + "body": "For a critical package like jest I'd like to have multiple signoffs before merging.", + "createdAt": "2020-11-19T00:49:19Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "MDEyOklzc3VlQ29tbWVudDczMDA1MTEwNg==", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "body": "@ienzam One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. If you disagree with the reviewer's comments, you can \"dismiss\" the review using GitHub's review UI. Thank you!\n", + "createdAt": "2020-11-19T00:50:44Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "MDEyOklzc3VlQ29tbWVudDczMDQ4NDkxNw==", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "body": "I just published [`@types/jasmine@3.6.2` to npm](https://www.npmjs.com/package/@types/jasmine).", + "createdAt": "2020-11-19T16:22:10Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + } + ], + "__typename": "IssueCommentConnection" + }, + "files": { + "nodes": [ + { + "path": "types/jasmine/index.d.ts", + "additions": 13, + "deletions": 13, + "__typename": "PullRequestChangedFile" + }, + { + "path": "types/jasmine/tsconfig.json", + "additions": 0, + "deletions": 1, + "__typename": "PullRequestChangedFile" + }, + { + "path": "types/jasmine/tslint.json", + "additions": 1, + "deletions": 0, + "__typename": "PullRequestChangedFile" + } + ], + "__typename": "PullRequestChangedFileConnection", + "totalCount": 2 + }, + "projectCards": { + "nodes": [], + "__typename": "ProjectCardConnection" + }, + "__typename": "PullRequest" + }, + "__typename": "Repository" + } + }, + "loading": false, + "networkStatus": 7, + "stale": false +} diff --git a/src/_tests/fixtures/49639/derived.json b/src/_tests/fixtures/49639/derived.json new file mode 100644 index 000000000..ee89383d3 --- /dev/null +++ b/src/_tests/fixtures/49639/derived.json @@ -0,0 +1,80 @@ +{ + "type": "info", + "now": "2020-11-26T15:09:52.097Z", + "pr_number": 49639, + "author": "ienzam", + "headCommitOid": "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856", + "lastPushDate": "2020-11-17T22:12:35.000Z", + "lastActivityDate": "2020-11-19T16:12:15.000Z", + "maintainerBlessed": false, + "hasMergeConflict": false, + "isFirstContribution": false, + "popularityLevel": "Critical", + "pkgInfo": [ + { + "name": "jasmine", + "kind": "edit", + "files": [ + { + "path": "types/jasmine/index.d.ts", + "kind": "definition" + }, + { + "path": "types/jasmine/tsconfig.json", + "kind": "package-meta", + "suspect": { + "startLine": 21, + "endLine": 21, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson) and not moving towards it\n```suggestion\n \"forceConsistentCasingInFileNames\": true,\n \"strictFunctionTypes\": true\n```" + } + }, + { + "path": "types/jasmine/tslint.json", + "kind": "package-meta", + "suspect": { + "startLine": 4, + "endLine": 4, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson) and not moving towards it\n```suggestion\n```" + } + } + ], + "owners": [ + "borisyankov", + "theodorejb", + "davidparsson", + "gmoothart", + "lukas-zech-software", + "Engineer2B", + "cyungmann", + "Roaders", + "devoto13", + "fdim", + "kolodny", + "stephenfarrar", + "zvirja", + "djungowski", + "chivesrs", + "kirjs", + "ienzam" + ], + "addedOwners": [], + "deletedOwners": [], + "popularityLevel": "Critical" + } + ], + "reviews": [ + { + "type": "approved", + "reviewer": "sandersn", + "date": "2020-11-19T16:12:15.000Z", + "isMaintainer": false + }, + { + "type": "approved", + "reviewer": "chivesrs", + "date": "2020-11-18T01:47:38.000Z", + "isMaintainer": false + } + ], + "ciResult": "pass" +} diff --git a/src/_tests/fixtures/49639/mutations.json b/src/_tests/fixtures/49639/mutations.json new file mode 100644 index 000000000..a2a9ac8ad --- /dev/null +++ b/src/_tests/fixtures/49639/mutations.json @@ -0,0 +1,85 @@ +[ + { + "mutation": "mutation ($input: AddLabelsToLabelableInput!) {\n addLabelsToLabelable(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "labelIds": [ + "MDU6TGFiZWw1ODYxNzcwNjM=", + "MDU6TGFiZWwyMTU0ODE2NTQ5" + ], + "labelableId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx" + } + } + }, + { + "mutation": "mutation ($input: RemoveLabelsFromLabelableInput!) {\n removeLabelsFromLabelable(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "labelIds": [ + "MDU6TGFiZWwxNjA4NTUyNDEw", + "MDU6TGFiZWw2OTcwMTg5NzI=" + ], + "labelableId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx" + } + } + }, + { + "mutation": "mutation ($input: AddProjectCardInput!) {\n addProjectCard(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "contentId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx", + "projectColumnId": "MDEzOlByb2plY3RDb2x1bW43NTUyOTIy" + } + } + }, + { + "mutation": "mutation ($input: AddCommentInput!) {\n addComment(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "subjectId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx", + "body": "Hey @ienzam,\n\n:unamused: Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider [adding tests](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-test-editing-an-existing-package) to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you.\n" + } + } + }, + { + "mutation": "mutation ($input: UpdateIssueCommentInput!) {\n updateIssueComment(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "id": "MDEyOklzc3VlQ29tbWVudDcyOTI0NjE3Mw==", + "body": "@ienzam Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `jasmine` [on npm](https://www.npmjs.com/package/jasmine), [on unpkg](https://unpkg.com/browse/jasmine@latest/) (author is owner)\n - owner-approval: @chivesrs\n\n## Code Reviews\n\nBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged.\n\n## Status\n\n * βœ… No merge conflicts\n * βœ… Continuous integration tests have passed\n * ❌ A DT maintainer needs to approve changes which affect module config files ([`jasmine/tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639/files/c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856#diff-522bbd567aec6bfd3e2cd29af157310bd47eb79dbe6a670beb4da4e1a14d0f2d), [`jasmine/tslint.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639/files/c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856#diff-0a3e03c56e43fc53245f1e4296782b62788ba4c9e70c9439d22b1998e681f55e))\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n## Inactive\n\nThis PR has been inactive for 8 days.\n\n----------------------\n... diagnostics scrubbed ...\n" + } + } + }, + { + "mutation": "mutation ($input: AddPullRequestReviewThreadInput!) {\n addPullRequestReviewThread(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "pullRequestId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx", + "path": "types/jasmine/tsconfig.json", + "line": 21, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson) and not moving towards it\n```suggestion\n \"forceConsistentCasingInFileNames\": true,\n \"strictFunctionTypes\": true\n```" + } + } + }, + { + "mutation": "mutation ($input: AddPullRequestReviewThreadInput!) {\n addPullRequestReviewThread(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "pullRequestId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx", + "path": "types/jasmine/tslint.json", + "line": 4, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson) and not moving towards it\n```suggestion\n```" + } + } + }, + { + "mutation": "mutation ($input: SubmitPullRequestReviewInput!) {\n submitPullRequestReview(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "pullRequestId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx", + "body": "@ienzam I noticed these differences from the expected form. If you can revise your changes to avoid them, so much the better! Otherwise please reply with explanations why they're needed and a maintainer will take a look. Thanks!", + "event": "COMMENT" + } + } + } +] diff --git a/src/_tests/fixtures/49639/result.json b/src/_tests/fixtures/49639/result.json new file mode 100644 index 000000000..f34725b8f --- /dev/null +++ b/src/_tests/fixtures/49639/result.json @@ -0,0 +1,40 @@ +{ + "targetColumn": "Needs Maintainer Review", + "labels": [ + "Critical package", + "Other Approved", + "Owner Approved", + "Author is Owner", + "Check Config", + "Untested Change" + ], + "responseComments": [ + { + "tag": "suggest-testing", + "status": "Hey @ienzam,\n\n:unamused: Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider [adding tests](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-test-editing-an-existing-package) to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you." + }, + { + "tag": "welcome", + "status": "@ienzam Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `jasmine` [on npm](https://www.npmjs.com/package/jasmine), [on unpkg](https://unpkg.com/browse/jasmine@latest/) (author is owner)\n - owner-approval: @chivesrs\n\n## Code Reviews\n\nBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged.\n\n## Status\n\n * βœ… No merge conflicts\n * βœ… Continuous integration tests have passed\n * ❌ A DT maintainer needs to approve changes which affect module config files ([`jasmine/tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639/files/c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856#diff-522bbd567aec6bfd3e2cd29af157310bd47eb79dbe6a670beb4da4e1a14d0f2d), [`jasmine/tslint.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639/files/c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856#diff-0a3e03c56e43fc53245f1e4296782b62788ba4c9e70c9439d22b1998e681f55e))\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n## Inactive\n\nThis PR has been inactive for 8 days.\n\n----------------------\n... diagnostics scrubbed ..." + } + ], + "explanations": [ + { + "path": "types/jasmine/tsconfig.json", + "startLine": 21, + "endLine": 21, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson) and not moving towards it\n```suggestion\n \"forceConsistentCasingInFileNames\": true,\n \"strictFunctionTypes\": true\n```" + }, + { + "path": "types/jasmine/tslint.json", + "startLine": 4, + "endLine": 4, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson) and not moving towards it\n```suggestion\n```" + } + ], + "shouldClose": false, + "shouldMerge": false, + "shouldUpdateLabels": true, + "shouldUpdateProjectColumn": true, + "shouldRemoveFromActiveColumns": false +} diff --git a/src/_tests/fixtures/49841/derived.json b/src/_tests/fixtures/49841/derived.json index 128dd7dec..f8b8954b8 100644 --- a/src/_tests/fixtures/49841/derived.json +++ b/src/_tests/fixtures/49841/derived.json @@ -26,7 +26,11 @@ { "path": "types/react-native-sha1/tsconfig.json", "kind": "package-meta", - "suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson)" + "suspect": { + "startLine": 17, + "endLine": 17, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson)\n```suggestion\n```" + } }, { "path": "types/react-native-sha1/tslint.json", diff --git a/src/_tests/fixtures/49841/mutations.json b/src/_tests/fixtures/49841/mutations.json index 3be306eb7..ef7c25e60 100644 --- a/src/_tests/fixtures/49841/mutations.json +++ b/src/_tests/fixtures/49841/mutations.json @@ -37,7 +37,7 @@ "variables": { "input": { "subjectId": "MDExOlB1bGxSZXF1ZXN0NTI4OTE2Mjg5", - "body": "@shekari-ah Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `react-native-sha1` (*new!*) [on npm](https://www.npmjs.com/package/react-native-sha1), [on unpkg](https://unpkg.com/browse/react-native-sha1@latest/)\n - Config files to check:\n - [`react-native-sha1/tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49841/files/4849e8876b0ab7adc889ccc35b55fde6f0274837#diff-579fae17725faf40efb4aac22d7bcfb2337ec7080258e4a206f5a479968d3556): not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson)\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\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\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" + "body": "@shekari-ah Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `react-native-sha1` (*new!*) [on npm](https://www.npmjs.com/package/react-native-sha1), [on unpkg](https://unpkg.com/browse/react-native-sha1@latest/)\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\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\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" } } }, @@ -58,5 +58,26 @@ "body": "@shekari-ah The CI build failed! Please [review the logs for more information](https://github.com/DefinitelyTyped/DefinitelyTyped/commit/4849e8876b0ab7adc889ccc35b55fde6f0274837/checks?check_suite_id=1574877739).\r\n\r\nOnce you've pushed the fixes, the build will automatically re-run. Thanks!\n" } } + }, + { + "mutation": "mutation ($input: AddPullRequestReviewThreadInput!) {\n addPullRequestReviewThread(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "pullRequestId": "MDExOlB1bGxSZXF1ZXN0NTI4OTE2Mjg5", + "path": "types/react-native-sha1/tsconfig.json", + "line": 17, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson)\n```suggestion\n```" + } + } + }, + { + "mutation": "mutation ($input: SubmitPullRequestReviewInput!) {\n submitPullRequestReview(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "pullRequestId": "MDExOlB1bGxSZXF1ZXN0NTI4OTE2Mjg5", + "body": "@shekari-ah I noticed these differences from the expected form. If you can revise your changes to avoid them, so much the better! Otherwise please reply with explanations why they're needed and a maintainer will take a look. Thanks!", + "event": "COMMENT" + } + } } ] diff --git a/src/_tests/fixtures/49841/result.json b/src/_tests/fixtures/49841/result.json index c426d5844..a4877bb48 100644 --- a/src/_tests/fixtures/49841/result.json +++ b/src/_tests/fixtures/49841/result.json @@ -8,7 +8,7 @@ "responseComments": [ { "tag": "welcome", - "status": "@shekari-ah Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `react-native-sha1` (*new!*) [on npm](https://www.npmjs.com/package/react-native-sha1), [on unpkg](https://unpkg.com/browse/react-native-sha1@latest/)\n - Config files to check:\n - [`react-native-sha1/tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49841/files/4849e8876b0ab7adc889ccc35b55fde6f0274837#diff-579fae17725faf40efb4aac22d7bcfb2337ec7080258e4a206f5a479968d3556): not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson)\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\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\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": "@shekari-ah Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `react-native-sha1` (*new!*) [on npm](https://www.npmjs.com/package/react-native-sha1), [on unpkg](https://unpkg.com/browse/react-native-sha1@latest/)\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\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\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-others", @@ -19,6 +19,14 @@ "status": "@shekari-ah The CI build failed! Please [review the logs for more information](https://github.com/DefinitelyTyped/DefinitelyTyped/commit/4849e8876b0ab7adc889ccc35b55fde6f0274837/checks?check_suite_id=1574877739).\r\n\r\nOnce you've pushed the fixes, the build will automatically re-run. Thanks!" } ], + "explanations": [ + { + "path": "types/react-native-sha1/tsconfig.json", + "startLine": 17, + "endLine": 17, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson)\n```suggestion\n```" + } + ], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/50429/derived.json b/src/_tests/fixtures/50429/derived.json index c7090faf6..d3c9eb6dc 100644 --- a/src/_tests/fixtures/50429/derived.json +++ b/src/_tests/fixtures/50429/derived.json @@ -42,7 +42,11 @@ { "path": "types/omise-js/tslint.json", "kind": "package-meta", - "suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson)" + "suspect": { + "startLine": 1, + "endLine": 8, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson)\n```suggestion\n{ \"extends\": \"dtslint/dt.json\" }\n```" + } } ], "owners": [], diff --git a/src/_tests/fixtures/50429/mutations.json b/src/_tests/fixtures/50429/mutations.json index 8ffa7ad6d..fadaa0c60 100644 --- a/src/_tests/fixtures/50429/mutations.json +++ b/src/_tests/fixtures/50429/mutations.json @@ -24,7 +24,7 @@ "variables": { "input": { "id": "MDEyOklzc3VlQ29tbWVudDc1NTI4NDk3Mw==", - "body": "@SaltyAom 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 which I will keep updated.***\n\n## 1 package in this PR\n\n* `omise-js` (*new!*) [on npm](https://www.npmjs.com/package/omise-js), [on unpkg](https://unpkg.com/browse/omise-js@latest/)\n - Config files to check:\n - [`omise-js/tslint.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/50429/files/8454d0853c273f9a20b08bd68cfd5c6b4f70c018#diff-651e0e95c5e0be3d22dccf8cb88166e0cfe629300ebbfc9882793cd008c0d109): not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson)\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\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\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" + "body": "@SaltyAom 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 which I will keep updated.***\n\n## 1 package in this PR\n\n* `omise-js` (*new!*) [on npm](https://www.npmjs.com/package/omise-js), [on unpkg](https://unpkg.com/browse/omise-js@latest/)\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\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\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" } } }, @@ -36,5 +36,27 @@ "body": "@SaltyAom The CI build failed! Please [review the logs for more information](https://github.com/DefinitelyTyped/DefinitelyTyped/commit/8454d0853c273f9a20b08bd68cfd5c6b4f70c018/checks?check_suite_id=1778052567).\r\n\r\nOnce you've pushed the fixes, the build will automatically re-run. Thanks!\n" } } + }, + { + "mutation": "mutation ($input: AddPullRequestReviewThreadInput!) {\n addPullRequestReviewThread(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "pullRequestId": "MDExOlB1bGxSZXF1ZXN0NTUwNDE0ODEz", + "path": "types/omise-js/tslint.json", + "startLine": 1, + "line": 8, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson)\n```suggestion\n{ \"extends\": \"dtslint/dt.json\" }\n```" + } + } + }, + { + "mutation": "mutation ($input: SubmitPullRequestReviewInput!) {\n submitPullRequestReview(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "pullRequestId": "MDExOlB1bGxSZXF1ZXN0NTUwNDE0ODEz", + "body": "@SaltyAom I noticed these differences from the expected form. If you can revise your changes to avoid them, so much the better! Otherwise please reply with explanations why they're needed and a maintainer will take a look. Thanks!", + "event": "COMMENT" + } + } } ] diff --git a/src/_tests/fixtures/50429/result.json b/src/_tests/fixtures/50429/result.json index c2c19a9e0..3c815d696 100644 --- a/src/_tests/fixtures/50429/result.json +++ b/src/_tests/fixtures/50429/result.json @@ -8,7 +8,7 @@ "responseComments": [ { "tag": "welcome", - "status": "@SaltyAom 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 which I will keep updated.***\n\n## 1 package in this PR\n\n* `omise-js` (*new!*) [on npm](https://www.npmjs.com/package/omise-js), [on unpkg](https://unpkg.com/browse/omise-js@latest/)\n - Config files to check:\n - [`omise-js/tslint.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/50429/files/8454d0853c273f9a20b08bd68cfd5c6b4f70c018#diff-651e0e95c5e0be3d22dccf8cb88166e0cfe629300ebbfc9882793cd008c0d109): not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson)\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\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\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": "@SaltyAom 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 which I will keep updated.***\n\n## 1 package in this PR\n\n* `omise-js` (*new!*) [on npm](https://www.npmjs.com/package/omise-js), [on unpkg](https://unpkg.com/browse/omise-js@latest/)\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\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\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-others", @@ -19,6 +19,14 @@ "status": "@SaltyAom The CI build failed! Please [review the logs for more information](https://github.com/DefinitelyTyped/DefinitelyTyped/commit/8454d0853c273f9a20b08bd68cfd5c6b4f70c018/checks?check_suite_id=1778052567).\r\n\r\nOnce you've pushed the fixes, the build will automatically re-run. Thanks!" } ], + "explanations": [ + { + "path": "types/omise-js/tslint.json", + "startLine": 1, + "endLine": 8, + "body": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson)\n```suggestion\n{ \"extends\": \"dtslint/dt.json\" }\n```" + } + ], "shouldClose": false, "shouldMerge": false, "shouldUpdateLabels": true, diff --git a/src/_tests/fixtures/50443/result.json b/src/_tests/fixtures/50443/result.json index 302c1585b..f436f4522 100644 --- a/src/_tests/fixtures/50443/result.json +++ b/src/_tests/fixtures/50443/result.json @@ -15,6 +15,7 @@ "status": "@shockdevv Everything looks good here. Great job! I am ready to merge this PR (at 130c088) on your behalf.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n" } ], + "explanations": [], "shouldClose": false, "shouldMerge": true, "shouldUpdateLabels": true, diff --git a/src/comments.ts b/src/comments.ts index 9c50bf45a..4f3cf17ad 100644 --- a/src/comments.ts +++ b/src/comments.ts @@ -122,3 +122,8 @@ I'll bump it to the DT maintainer queue. Thank you for your patience, @${author} (Ping ${owners}.)`} as { [k: string]: string }; }; + +// Introduction to the review when config files diverge from the +// expected form +export const explanations = (user: string) => + `@${user} I noticed these differences from the expected form. If you can revise your changes to avoid them, so much the better! Otherwise please reply with explanations why they're needed and a maintainer will take a look. Thanks!`; diff --git a/src/compute-pr-actions.ts b/src/compute-pr-actions.ts index eba231424..f780a43d6 100644 --- a/src/compute-pr-actions.ts +++ b/src/compute-pr-actions.ts @@ -1,7 +1,7 @@ import * as Comments from "./comments"; import * as urls from "./urls"; import { PrInfo, BotResult, FileInfo } from "./pr-info"; -import { ReviewInfo } from "./pr-info"; +import { ReviewInfo, Explanation } from "./pr-info"; import { noNullish, flatten, unique, sameUser, min, sha256, abbrOid } from "./util/util"; import * as dayjs from "dayjs"; import * as advancedFormat from "dayjs/plugin/advancedFormat"; @@ -52,6 +52,7 @@ export interface Actions { targetColumn?: ColumnName; labels: LabelName[]; responseComments: Comments.Comment[]; + explanations: ({ path: string } & Explanation)[]; shouldClose: boolean; shouldMerge: boolean; shouldUpdateLabels: boolean; @@ -64,6 +65,7 @@ function createDefaultActions(): Actions { targetColumn: "Other", labels: [], responseComments: [], + explanations: [], shouldClose: false, shouldMerge: false, shouldUpdateLabels: true, @@ -76,6 +78,7 @@ function createEmptyActions(): Actions { return { labels: [], responseComments: [], + explanations: [], shouldClose: false, shouldMerge: false, shouldUpdateLabels: false, @@ -291,6 +294,10 @@ export function process(prInfo: BotResult, // Update intro comment post({ tag: "welcome", status: createWelcomeComment(info, post) }); + // Propagate explanations into actions + context.explanations = noNullish(flatten(info.pkgInfo.map(pkg => pkg.files.map(({ path, suspect }) => + suspect && { path, ...suspect })))); + // Ping reviewers when needed const headCommitAbbrOid = abbrOid(info.headCommitOid); if (!(info.hasChangereqs || info.approvedBy.includes("owner") || info.approvedBy.includes("maintainer"))) { @@ -426,9 +433,6 @@ function createWelcomeComment(info: ExtendedPrInfo, post: (c: Comments.Comment) const announceList = (what: string, xs: readonly string[]) => `${xs.length} ${what}${xs.length !== 1 ? "s" : ""}`; const usersToString = (users: string[]) => users.map(u => (info.isAuthor(u) ? "✎" : "") + "@" + u).join(", "); - const reviewLink = (f: FileInfo) => - `[\`${f.path.replace(/^types\/(.*\/)/, "$1")}\`](${ - urls.review(info.pr_number)}/${info.headCommitOid}#diff-${sha256(f.path)})`; display(``, `## ${announceList("package", info.packages)} in this PR`, @@ -458,15 +462,6 @@ function createWelcomeComment(info: ExtendedPrInfo, post: (c: Comments.Comment) displayOwners("added", p.addedOwners); displayOwners("removed", p.deletedOwners); if (!info.authorIsOwner && p.owners.length >= 4 && p.addedOwners.some(info.isAuthor)) addedSelfToManyOwners++; - - let showSuspects = false; - for (const file of p.files) { - if (!file.suspect) continue; - if (!showSuspects) display(` - Config files to check:`); - display(` - ${reviewLink(file)}: ${file.suspect}`); - showSuspects = true; - } - } if (addedSelfToManyOwners > 0) { display(``, @@ -505,6 +500,9 @@ function createWelcomeComment(info: ExtendedPrInfo, post: (c: Comments.Comment) display(` * ${emoji(info.ciResult === "pass")} Continuous integration tests have ${expectedResults}`); const approved = emoji(info.approved); + const reviewLink = (f: FileInfo) => + `[\`${f.path.replace(/^types\/(.*\/)/, "$1")}\`](${ + urls.review(info.pr_number)}/${info.headCommitOid}#diff-${sha256(f.path)})`; if (info.hasNewPackages) { display(` * ${approved} Only ${requiredApprover} can approve changes when there are new packages added`); @@ -525,7 +523,9 @@ function createWelcomeComment(info: ExtendedPrInfo, post: (c: Comments.Comment) } else if (info.noOtherOwners) { display(` * ${approved} ${RequiredApprover} can merge changes when there are no other reviewers`); } else if (info.checkConfig) { - display(` * ${approved} ${RequiredApprover} needs to approve changes which affect module config files`); + const configFiles = flatten(info.pkgInfo.map(pkg => pkg.files.filter(({ kind }) => kind === "package-meta"))); + const links = configFiles.map(reviewLink); + display(` * ${approved} ${RequiredApprover} needs to approve changes which affect module config files (${links.join(", ")})`); } else { display(` * ${approved} Only ${requiredApprover} can approve changes [without tests](${testsLink})`); } diff --git a/src/execute-pr-actions.ts b/src/execute-pr-actions.ts index 11f4fc12b..b60db3a1d 100644 --- a/src/execute-pr-actions.ts +++ b/src/execute-pr-actions.ts @@ -4,8 +4,8 @@ import { PR_repository_pullRequest } from "./queries/schema/PR"; import { Actions, LabelNames, LabelName } from "./compute-pr-actions"; import { createMutation, client } from "./graphql-client"; import { getProjectBoardColumns, getLabels } from "./util/cachedQueries"; -import { noNullish, flatten } from "./util/util"; -import { tagsToDeleteIfNotPosted } from "./comments"; +import { authorNotBot, noNullish, flatten } from "./util/util"; +import * as comments from "./comments"; import * as comment from "./util/comment"; // https://github.com/DefinitelyTyped/DefinitelyTyped/projects/5 @@ -18,6 +18,7 @@ export async function executePrActions(actions: Actions, pr: PR_repository_pullR ...await getMutationsForProjectChanges(actions, pr), ...getMutationsForComments(actions, pr.id, botComments), ...getMutationsForCommentRemovals(actions, botComments), + ...getMutationsForExplanations(actions, pr), ...getMutationsForChangingPRState(actions, pr), ]); if (!dry) { @@ -66,7 +67,7 @@ type ParsedComment = { id: string, body: string, tag: string, status: string }; function getBotComments(pr: PR_repository_pullRequest): ParsedComment[] { return noNullish( (pr.comments.nodes ?? []) - .filter(comment => comment?.author?.login === "typescript-bot") + .filter(comment => comment && !authorNotBot(comment)) .map(c => { const { id, body } = c!, parsed = comment.parse(body); return parsed && { id, body, ...parsed }; @@ -96,27 +97,51 @@ function getMutationsForCommentRemovals(actions: Actions, botComments: ParsedCom // Remove stale CI 'your build is green' notifications if (tag.includes("ci-") && tag !== ciTagToKeep) return del(); // tags for comments that should be removed when not included in the actions - if (tagsToDeleteIfNotPosted.includes(tag) && !postedTags.includes(tag)) return del(); + if (comments.tagsToDeleteIfNotPosted.includes(tag) && !postedTags.includes(tag)) return del(); return null; }); } -function getMutationsForChangingPRState(actions: Actions, pr: PR_repository_pullRequest) { +function getMutationsForExplanations(actions: Actions, pr: PR_repository_pullRequest) { + // Explanations will be empty if we already reviewed this head + if (actions.explanations.length === 0) return []; + if (!pr.author) throw new Error("Internal Error: expected to be checked"); return [ - actions.shouldMerge - ? createMutation("mergePullRequest", { - commitHeadline: `πŸ€– Merge PR #${pr.number} ${pr.title} by @${pr.author?.login ?? "(ghost)"}`, - expectedHeadOid: pr.headRefOid, - mergeMethod: "SQUASH", + ...actions.explanations.map(({ path, startLine, endLine, body }) => endLine + ? createMutation("addPullRequestReviewThread", { pullRequestId: pr.id, + path, + startLine: startLine === endLine ? undefined : startLine, + line: endLine, + body, }) - : null, - actions.shouldClose - ? createMutation("closePullRequest", { pullRequestId: pr.id }) - : null, + : createMutation("addPullRequestReviewComment", { + pullRequestId: pr.id, + path, + body, + }) + ), + createMutation("submitPullRequestReview", { + pullRequestId: pr.id, + body: comments.explanations(pr.author.login), + event: "COMMENT", + }), ]; } +function* getMutationsForChangingPRState(actions: Actions, pr: PR_repository_pullRequest) { + if (actions.shouldMerge) { + if (!pr.author) throw new Error("Internal Error: expected to be checked"); + yield createMutation("mergePullRequest", { + commitHeadline: `πŸ€– Merge PR #${pr.number} ${pr.title} by @${pr.author.login}`, + expectedHeadOid: pr.headRefOid, + mergeMethod: "SQUASH", + pullRequestId: pr.id, + }); + } + if (actions.shouldClose) yield createMutation("closePullRequest", { pullRequestId: pr.id }); +} + async function getProjectBoardColumnIdByName(name: string): Promise { const columns = await getProjectBoardColumns(); const res = columns.find(e => e.name === name)?.id; diff --git a/src/pr-info.ts b/src/pr-info.ts index 8b0e77fe4..1f41176f8 100644 --- a/src/pr-info.ts +++ b/src/pr-info.ts @@ -55,9 +55,15 @@ type FileKind = "test" | "definition" | "markdown" | "package-meta" | "package-m export type FileInfo = { path: string, kind: FileKind, - suspect?: string // reason for a file being "package-meta" rather than "package-meta-ok" + suspect?: Explanation // reason for a file being "package-meta" rather than "package-meta-ok" }; +export interface Explanation { + readonly startLine?: number; + readonly endLine?: number; + readonly body: string; +} + export type ReviewInfo = { type: string, reviewer: string, @@ -175,6 +181,12 @@ export async function queryPRInfo(prNumber: number) { } } +interface Refs { + readonly head: string; + readonly master: "master"; + readonly latestExplanations: string; +} + // The GQL response => Useful data for us export async function deriveStateForPR( prInfo: PR_repository_pullRequest, @@ -201,9 +213,16 @@ export async function deriveStateForPR( const lastBlessing = getLastMaintainerBlessingDate(prInfo.timelineItems); const reopenedDate = getReopenedDate(prInfo.timelineItems); + const refs = { + head: prInfo.headRefOid, + master: "master", + // Exclude existing explanations from subsequent reviews + latestExplanations: max(noNullish(prInfo.reviews?.nodes).filter(review => !authorNotBot(review)), (a, b) => + Date.parse(a.submittedAt) - Date.parse(b.submittedAt))?.commit?.oid, + } as const; const pkgInfoEtc = await getPackageInfosEtc( noNullish(prInfo.files?.nodes).map(f => f.path).sort(), - prInfo.headRefOid, fetchFile, async name => await getDownloads(name, lastPushDate)); + refs, fetchFile, async name => await getDownloads(name, lastPushDate)); if (pkgInfoEtc instanceof Error) return botError(pkgInfoEtc.message); const { pkgInfo, popularityLevel } = pkgInfoEtc; @@ -279,11 +298,11 @@ function getLastMaintainerBlessingDate(timelineItems: PR_repository_pullRequest_ } async function getPackageInfosEtc( - paths: string[], headId: string, fetchFile: typeof defaultFetchFile, getDownloads: typeof getMonthlyDownloadCount + paths: string[], refs: Refs, fetchFile: typeof defaultFetchFile, getDownloads: typeof getMonthlyDownloadCount ): Promise<{pkgInfo: PackageInfo[], popularityLevel: PopularityLevel} | Error> { const infos = new Map(); for (const path of paths) { - const [pkg, fileInfo] = await categorizeFile(path, async (oid: string = headId) => fetchFile(`${oid}:${path}`)); + const [pkg, fileInfo] = await categorizeFile(path, async ref => fetchFile(`${refs[ref]}:${path}`)); if (!infos.has(pkg)) infos.set(pkg, []); infos.get(pkg)!.push(fileInfo); } @@ -294,7 +313,7 @@ async function getPackageInfosEtc( if (oldOwners instanceof Error) return oldOwners; const newOwners0 = !name ? null : !paths.includes(`types/${name}/index.d.ts`) ? oldOwners - : await getOwnersOfPackage(name, headId, fetchFile); + : await getOwnersOfPackage(name, refs.head, fetchFile); // A header error is still an add/edit whereas a missing file is // delete, hence newOwners0 here const kind = !name ? "edit" : !oldOwners ? "add" : !newOwners0 ? "delete" : "edit"; @@ -318,7 +337,9 @@ async function getPackageInfosEtc( return { pkgInfo: result, popularityLevel: downloadsToPopularityLevel(maxDownloads) }; } -async function categorizeFile(path: string, contents: (oid?: string) => Promise): Promise<[string|null, FileInfo]> { +type GetContents = (ref: keyof Refs) => Promise; + +async function categorizeFile(path: string, getContents: GetContents): Promise<[string|null, FileInfo]> { // https://regex101.com/r/eFvtrz/1 const match = /^types\/(.*?)\/.*?[^\/](?:\.(d\.ts|tsx?|md))?$/.exec(path); if (!match) return [null, { path, kind: "infrastructure" }]; @@ -329,27 +350,26 @@ async function categorizeFile(path: string, contents: (oid?: string) => Promise< case "ts": case "tsx": return [pkg, { path, kind: "test" }]; case "md": return [pkg, { path, kind: "markdown" }]; default: { - const suspect = await configSuspicious(path, contents); + const suspect = await configSuspicious(path, getContents); return [pkg, { path, kind: suspect ? "package-meta" : "package-meta-ok", suspect }]; } } } interface ConfigSuspicious { - (path: string, getContents: (oid?: string) => Promise): Promise; - [basename: string]: (text: string, oldText?: string) => string | undefined; + (path: string, getContents: GetContents): Promise; + [basename: string]: (newText: string, getContents: GetContents) => Promise; } const configSuspicious = (async (path, getContents) => { const basename = path.replace(/.*\//, ""); const checker = configSuspicious[basename]; - if (!checker) return `edited`; - const text = await getContents(); + if (!checker) return { body: `edited` }; + const newText = await getContents("head"); // Removing tslint.json, tsconfig.json, package.json and // OTHER_FILES.txt is checked by the CI. Specifics are in my commit // message. - if (text === undefined) return undefined; - const oldText = await getContents("master"); - return checker(text, oldText); + if (newText === undefined) return undefined; + return checker(newText, getContents); }); configSuspicious["OTHER_FILES.txt"] = makeChecker( [], @@ -397,26 +417,78 @@ configSuspicious["tsconfig.json"] = makeChecker( // to it, ignoring some keys. The ignored properties are in most cases checked // elsewhere (dtslint), and in some cases they are irrelevant. function makeChecker(expectedForm: any, expectedFormUrl: string, options?: { parse: (text: string) => unknown } | { ignore: (data: any) => void }) { - const diffFromExpected = (text: string) => { - let data: any; + return async (newText: string, getContents: GetContents) => { + let suggestion: any; if (options && "parse" in options) { - data = options.parse(text); + suggestion = options.parse(newText); } else { - try { data = JSON.parse(text); } catch (e) { return "couldn't parse json"; } + try { suggestion = JSON.parse(newText); } catch (e) { if (e instanceof SyntaxError) return { body: `couldn't parse json: ${e.message}` }; } + } + const newData = jsonDiff.deepClone(suggestion); + if (options && "ignore" in options) options.ignore(newData); + const towardsIt = jsonDiff.deepClone(expectedForm); + // Getting closer to the expected form relative to master isn't + // suspect + const vsMaster = await ignoreExistingDiffs("master"); + if (!vsMaster) return undefined; + if (vsMaster.done) return { body: vsMaster.suspect }; + // whereas getting closer relative to existing suggestions means + // no new suggestions + if (!await ignoreExistingDiffs("latestExplanations")) return { body: vsMaster.suspect }; + jsonDiff.applyPatch(suggestion, jsonDiff.compare(newData, towardsIt)); + return makeSuggestion(); + + // Apply any preexisting diffs to towardsIt + async function ignoreExistingDiffs(ref: keyof Refs) { + const theExpectedForm = `[the expected form](${expectedFormUrl})`; + const diffFromExpected = (data: any) => jsonDiff.compare(towardsIt, data); + const newDiff = diffFromExpected(newData); + if (newDiff.length === 0) return undefined; + const oldText = await getContents(ref); + if (!oldText) return { suspect: `not ${theExpectedForm}` }; + let oldData; + if (options && "parse" in options) { + oldData = options.parse(oldText); + } else { + try { oldData = JSON.parse(oldText); } catch (e) { if (e instanceof SyntaxError) return { done: true, suspect: `couldn't parse json: ${e.message}` }; } + } + if (options && "ignore" in options) options.ignore(oldData); + const oldDiff = diffFromExpected(oldData); + const notRemove = jsonDiff.compare(oldDiff, newDiff).filter(({ op }) => op !== "remove"); + if (notRemove.length === 0) return undefined; + jsonDiff.applyPatch(newDiff, notRemove.map(({ path }) => ({ op: "remove", path }))); + jsonDiff.applyPatch(towardsIt, newDiff.filter(({ op }: { op?: typeof newDiff[number]["op"] }) => op)); + return { suspect: `not ${theExpectedForm} and not moving towards it` }; + } + + // Suggest the different lines to the author + function makeSuggestion() { + const text = JSON.stringify(suggestion, undefined, 4); + const suggestionLines = Object.keys(suggestion).length === 1 + ? [text.replace(/\n */g, " ") + "\n"] + : (text + "\n").split(/^/m); + // "^" will match inside LineTerminatorSequence so + // "\r\n".split(/^/m) is two lines. Sigh. + // https://tc39.es/ecma262/#_ref_7303:~:text=the%20character%20Input%5Be%20%2D%201%5D%20is%20one%20of%20LineTerminator + const lines = newText.replace(/\r\n/g, "\n").split(/^/m); + // When suggestionLines is empty, that suggests removing all + // of the different lines + let startLine = 1; + while (suggestionLines[0]?.trim() === lines[startLine - 1]?.trim()) { + suggestionLines.shift(); + startLine++; + } + let endLine = lines.length; + while (suggestionLines[suggestionLines.length - 1]?.trim() === lines[endLine - 1]?.trim()) { + suggestionLines.pop(); + endLine--; + } + return { + startLine, + endLine, + body: vsMaster!.suspect + "\n```suggestion\n" + suggestionLines.join("") + "```", + }; } - if (options && "ignore" in options) options.ignore(data); - try { return jsonDiff.compare(expectedForm, data); } catch (e) { return "couldn't diff json"; } - }; - return (contents: string, oldText?: string) => { - const theExpectedForm = `[the expected form](${expectedFormUrl})`; - const newDiff = diffFromExpected(contents); - if (typeof newDiff === "string") return newDiff; - if (newDiff.length === 0) return undefined; - if (!oldText) return `not ${theExpectedForm}`; - const oldDiff = diffFromExpected(oldText); - if (typeof oldDiff === "string") return oldDiff; - if (jsonDiff.compare(oldDiff, newDiff).every(({ op }) => op === "remove")) return undefined; - return `not ${theExpectedForm} and not moving towards it`; }; } @@ -426,7 +498,7 @@ function latestComment(comments: PR_repository_pullRequest_comments_nodes[]) { function getMergeOfferDate(comments: PR_repository_pullRequest_comments_nodes[], headOid: string) { const offer = latestComment(comments.filter(c => - sameUser("typescript-bot", c.author?.login || "-") + !authorNotBot(c) && comment.parse(c.body)?.tag === "merge-offer" && c.body.includes(`(at ${abbrOid(headOid)})`))); return offer && new Date(offer.createdAt);