Update docs and remove unused commented-out code
diff --git a/README.md b/README.md
index 57cf1cf..841297d 100644
--- a/README.md
+++ b/README.md
@@ -49,12 +49,12 @@
### Project Configuration
-To add the following content, please edit the project.config file in refs/meta/config:
+To add the following content, please edit the `project.config` file in `refs/meta/config`:
```
[plugin "chatgpt-code-review-gerrit-plugin"]
# Required parameters
- gptToken = {gptToken}
+ gerritUserName = {gerritUserName}
gerritAuthBaseUrl = {gerritAuthBaseUrl}
...
@@ -64,6 +64,17 @@
...
```
+#### Secure Configuration
+
+It is highly recommended to store sensitive information such as `gptToken` and `gerritPassword` in the `secure.config`
+file. Please edit the file at $gerrit_site/etc/`secure.config` and include the following details:
+
+```
+[plugin "chatgpt-code-review-gerrit-plugin"]
+ gptToken = {gptToken}
+ gerritPassword = {gerritPassword}
+```
+
### Required Parameters
- `gptToken`: OpenAI GPT token.
diff --git a/README.zh.md b/README.zh.md
index c4adea0..f0259fa 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -33,7 +33,7 @@
```
[plugin "chatgpt-code-review-gerrit-plugin"]
# 必填参数
- gptToken = {gptToken}
+ gerritUserName = {gerritUserName}
gerritAuthBaseUrl = {gerritAuthBaseUrl}
...
@@ -43,9 +43,20 @@
...
```
+#### 安全配置
+
+强烈建议将 `gptToken` 和 `gerritPassword` 这两项敏感信息配置在 `secure.config` 文件中。请在
+$gerrit_site/etc/`secure.config` 文件中进行编辑,并添加以下内容:
+
+```
+[plugin "chatgpt-code-review-gerrit-plugin"]
+ gptToken = {gptToken}
+ gerritPassword = {gerritPassword}
+```
+
### 项目配置
-编辑 refs/meta/config 的 project.config 文件,添加以下内容:
+编辑 `refs/meta/config` 的 `project.config` 文件,添加以下内容:
```
[plugin "chatgpt-code-review-gerrit-plugin"]
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/GerritClient.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/GerritClient.java
index c5d1430..5bfc5b8 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/GerritClient.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/GerritClient.java
@@ -32,7 +32,6 @@
+ UriResourceLocator.gerritPatchSetUri(fullChangeId)))
.build();
- //HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
HttpResponse<String> response = httpClientWithRetry.execute(request);
if (response.statusCode() != HTTP_OK) {
@@ -64,7 +63,6 @@
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
- //HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
HttpResponse<String> response = httpClientWithRetry.execute(request);
if (response.statusCode() != HTTP_OK) {