From 824b172ecc85b43d76108b301d2eaa2d0247889b Mon Sep 17 00:00:00 2001 From: Nitin Reddy Date: Tue, 28 Jan 2025 22:05:21 +0530 Subject: [PATCH 1/3] Updated the PULL-REQUEST-TEMPLATE.md file,this helps the contributor to notify the server admin if the changes commited by the contributor needs their check --- .github/PULL_REQUEST_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c8d6f874..f4bcf918 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,3 +14,4 @@ - [ ] I have successfully deployed my own instance of Oppiabot. - You can find instructions for doing this [here](https://github.com/oppia/oppiabot/wiki/Deploying-your-own-instance-of-the-oppiabot). - [ ] I have manually tested all the changes made in this PR following the [manual tests matrix](https://github.com/oppia/oppiabot/wiki/Manual-Tests-Matrix). +- [ ] When making a pull request,if you have made some changes in that requires server admin's eye,notify them using team tag @oppia/server-admins-team and not individually From 8cd4105a840443151c1092ef44b2b6af03f47cfb Mon Sep 17 00:00:00 2001 From: Nitin Reddy Date: Tue, 28 Jan 2025 22:13:59 +0530 Subject: [PATCH 2/3] Updated the PULL-REQUEST-TEMPLATE.md file,this helps the contributor to notify the server admin if the changes commited by the contributor needs their check --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f4bcf918..45e31e19 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,4 +14,4 @@ - [ ] I have successfully deployed my own instance of Oppiabot. - You can find instructions for doing this [here](https://github.com/oppia/oppiabot/wiki/Deploying-your-own-instance-of-the-oppiabot). - [ ] I have manually tested all the changes made in this PR following the [manual tests matrix](https://github.com/oppia/oppiabot/wiki/Manual-Tests-Matrix). -- [ ] When making a pull request,if you have made some changes in that requires server admin's eye,notify them using team tag @oppia/server-admins-team and not individually +- [ ] while making a pull request,if you have made some changes that requires server admin's check,then in the PR description,instead of notifying it to the server admin individually,notify the server admin by using the team tag @oppia/server-admins-team, From a94bc754fe9c435154f62ee447d9f1cdad0500ed Mon Sep 17 00:00:00 2001 From: Nitin Reddy Date: Tue, 28 Jan 2025 22:51:45 +0530 Subject: [PATCH 3/3] Updated the checkPullRequestTemplate.js and PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- lib/checkPullRequestTemplate.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 45e31e19..41f1dd00 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,4 +14,4 @@ - [ ] I have successfully deployed my own instance of Oppiabot. - You can find instructions for doing this [here](https://github.com/oppia/oppiabot/wiki/Deploying-your-own-instance-of-the-oppiabot). - [ ] I have manually tested all the changes made in this PR following the [manual tests matrix](https://github.com/oppia/oppiabot/wiki/Manual-Tests-Matrix). -- [ ] while making a pull request,if you have made some changes that requires server admin's check,then in the PR description,instead of notifying it to the server admin individually,notify the server admin by using the team tag @oppia/server-admins-team, +- [ ] while making a pull request,if you have made some changes that requires server admin's check,instead of connecting directly with the server admin,add [SERVER ADMIN CHECK] in your PR description,this will automatically notify the server admins. diff --git a/lib/checkPullRequestTemplate.js b/lib/checkPullRequestTemplate.js index df9ab75b..25e38c45 100644 --- a/lib/checkPullRequestTemplate.js +++ b/lib/checkPullRequestTemplate.js @@ -283,6 +283,11 @@ const generateComment = (pullRequest) => { count += 1; } + const requiresAdminCheck = pullRequest.body.includes('[SERVER ADMIN CHECK]') + if(requiresAdminCheck){ + commentBody += `\n@oppiabot/server-admins-team Please review this PR as it requires server admin check` + } + // If there is no reason to produce the message do not return anything. if (count === 1) { return;