From 3c1de0c5fe7a1ed543c459147b6771ef2d10706e Mon Sep 17 00:00:00 2001 From: Flying-Pegasus Date: Mon, 9 Dec 2024 10:56:49 +0530 Subject: [PATCH 1/3] Update README.md Provided a clear description of where to add the repo name in the constant.js file. --- README.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9cdc0853..c7c3ee5f 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,36 @@ from .env file, Otherwise app will not work locally. ## Installing the bot on a repository -You'll need to identify a target repository and install the bot by clicking the **Install** button on the settings page of your app, e.g `https://github.com/settings/apps/my-oppiabot-testing-app/installations`. In the `.env` file put your github account name in `WHITELISTED_ACCOUNTS` and also add your repository (name in small caps) in the `constants.js` file locally. +1. Identify a target repository and install the bot by clicking the Install button on the settings page of your app, e.g., **`https://github.com/settings/apps/my-oppiabot-testing-app/installations`** +2. Update the **`.env` file**: + - Add your GitHub account name to `WHITELISTED_ACCOUNTS`. +3. Add the repository name in the **`constant.js` file**: + - Open the **`constant.js`** file in the bot's source code. + - Navigate to the `checksWhitelist` object. + - Add a new entry with your repository name (in lowercase) as the key. The value should define the checks and events specific to your repository. + + **Example:** + If your repository name is `my-repo`, the `checksWhitelist` object will look like this: + ```javascript + const checksWhitelist = { + // Existing entries... + 'my-repo': { + [openEvent]: [claCheck], + [reopenEvent]: [], + [openEventGithubActions]: [claCheckGithubAction], + [reopenEventGithubActions]: [claCheckGithubAction], + [synchronizeEvent]: [mergeConflictCheck], + [closeEvent]: [allMergeConflictCheck], + [editEvent]: [], + [issuesLabelEvent]: [], + [issuesAssignedEvent]: [], + [pushEvent]: [], + [pullRequestReviewEvent]: [pullRequestReviewCheck], + [issueCommentCreatedEvent]: [respondToReviewCheck], + }, + }; + +4.Save the changes to **`constant.js`**. ## Running the bot locally From 6c435eabdf5fde76a71cea8615642ce9fe04418c Mon Sep 17 00:00:00 2001 From: Flying-Pegasus Date: Mon, 9 Dec 2024 13:45:42 +0530 Subject: [PATCH 2/3] Updated README.md as per maintainer's feedback corrected constant.js to constants.js --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c7c3ee5f..a78ad90c 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,8 @@ from .env file, Otherwise app will not work locally. 1. Identify a target repository and install the bot by clicking the Install button on the settings page of your app, e.g., **`https://github.com/settings/apps/my-oppiabot-testing-app/installations`** 2. Update the **`.env` file**: - Add your GitHub account name to `WHITELISTED_ACCOUNTS`. -3. Add the repository name in the **`constant.js` file**: - - Open the **`constant.js`** file in the bot's source code. +3. Add the repository name in the **`constants.js` file**: + - Open the **`constants.js`** file in the bot's source code. - Navigate to the `checksWhitelist` object. - Add a new entry with your repository name (in lowercase) as the key. The value should define the checks and events specific to your repository. @@ -108,7 +108,7 @@ from .env file, Otherwise app will not work locally. }, }; -4.Save the changes to **`constant.js`**. +4.Save the changes to **`constants.js`**. ## Running the bot locally From 69067c7f75d55ecbcbb9682735d0767296f4ceea Mon Sep 17 00:00:00 2001 From: Flying-Pegasus Date: Tue, 10 Dec 2024 17:15:43 +0530 Subject: [PATCH 3/3] Updated README.md as per maintainer's feedback Solved the changes raised by the maintainer --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a78ad90c..117084eb 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ from .env file, Otherwise app will not work locally. ## Installing the bot on a repository + 1. Identify a target repository and install the bot by clicking the Install button on the settings page of your app, e.g., **`https://github.com/settings/apps/my-oppiabot-testing-app/installations`** 2. Update the **`.env` file**: - Add your GitHub account name to `WHITELISTED_ACCOUNTS`. @@ -107,8 +108,9 @@ from .env file, Otherwise app will not work locally. [issueCommentCreatedEvent]: [respondToReviewCheck], }, }; + ``` -4.Save the changes to **`constants.js`**. +4. Save the changes to **`constants.js`**. ## Running the bot locally