From 592e9479abb82ba45a712c071c30f08c16d39d0e Mon Sep 17 00:00:00 2001
From: Bella Luz Quintero <bquintero@flexion.us>
Date: Wed, 9 Oct 2024 13:45:07 -0600
Subject: [PATCH 01/24] added initial setup for openai pr agent

Co-authored-by: saquino0827 <saquino@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
---
 .github/workflows/pr_agent.yml | 24 ++++++++++++++++++++++++
 .pr_agent.toml                 |  4 ++++
 2 files changed, 28 insertions(+)
 create mode 100644 .github/workflows/pr_agent.yml
 create mode 100644 .pr_agent.toml

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
new file mode 100644
index 000000000..b8b385660
--- /dev/null
+++ b/.github/workflows/pr_agent.yml
@@ -0,0 +1,24 @@
+on:
+  pull_request:
+    types: [opened, reopened, ready_for_review]
+  issue_comment:
+jobs:
+  pr_agent_job:
+    if: ${{ github.event.sender.type != 'Bot' }}
+    runs-on: ubuntu-latest
+    permissions:
+      issues: write
+      pull-requests: write
+      contents: write
+    name: Run pr agent on every pull request, respond to user comments
+    steps:
+      - name: PR Agent action step
+        id: pragent
+        uses: Codium-ai/pr-agent@main
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          OPENAI.KEY: ${{ secrets.AZURE_OPENAI_KEY }}
+          OPENAI.API_TYPE: "azure"
+          OPENAI.API_VERSION: "2023-05-15"  # Check Azure documentation for the current API version
+          OPENAI.API_BASE: ${{ secrets.AZURE_OPENAI_BASE_URL }} # The base URL for your Azure OpenAI resource. e.g. "https://<your resource name>.openai.azure.com"
+          OPENAI.DEPLOYMENT_ID: ${{ secrets.AZURE_OPENAI_DEPLOYMENT_ID }}  # The deployment name you chose when you deployed the engine
\ No newline at end of file
diff --git a/.pr_agent.toml b/.pr_agent.toml
new file mode 100644
index 000000000..8d65c89aa
--- /dev/null
+++ b/.pr_agent.toml
@@ -0,0 +1,4 @@
+[config]
+model="gpt-4" # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
+model_turbo="gpt-4" # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
+fallback_models=["gpt-4"] # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
\ No newline at end of file

From 8ec836441bc0800b9fa59c38acf4028e1a4a4a06 Mon Sep 17 00:00:00 2001
From: Bella Luz Quintero <bquintero@flexion.us>
Date: Wed, 9 Oct 2024 16:50:04 -0600
Subject: [PATCH 02/24] remove .toml file and renamed env

---
 .github/workflows/pr_agent.yml | 2 +-
 .pr_agent.toml                 | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)
 delete mode 100644 .pr_agent.toml

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index b8b385660..fc17b6a8d 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -17,7 +17,7 @@ jobs:
         uses: Codium-ai/pr-agent@main
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          OPENAI.KEY: ${{ secrets.AZURE_OPENAI_KEY }}
+          OPENAI_KEY: ${{ secrets.AZURE_OPENAI_KEY }}
           OPENAI.API_TYPE: "azure"
           OPENAI.API_VERSION: "2023-05-15"  # Check Azure documentation for the current API version
           OPENAI.API_BASE: ${{ secrets.AZURE_OPENAI_BASE_URL }} # The base URL for your Azure OpenAI resource. e.g. "https://<your resource name>.openai.azure.com"
diff --git a/.pr_agent.toml b/.pr_agent.toml
deleted file mode 100644
index 8d65c89aa..000000000
--- a/.pr_agent.toml
+++ /dev/null
@@ -1,4 +0,0 @@
-[config]
-model="gpt-4" # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
-model_turbo="gpt-4" # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
-fallback_models=["gpt-4"] # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
\ No newline at end of file

From 6c083ebac737d09be42d70adf4580b0ddb531d26 Mon Sep 17 00:00:00 2001
From: Bella Luz Quintero <bquintero@flexion.us>
Date: Wed, 9 Oct 2024 16:56:13 -0600
Subject: [PATCH 03/24] readd .toml file

---
 .pr_agent.toml | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 .pr_agent.toml

diff --git a/.pr_agent.toml b/.pr_agent.toml
new file mode 100644
index 000000000..8d65c89aa
--- /dev/null
+++ b/.pr_agent.toml
@@ -0,0 +1,4 @@
+[config]
+model="gpt-4" # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
+model_turbo="gpt-4" # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
+fallback_models=["gpt-4"] # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
\ No newline at end of file

From e71443db172d5c93c0d9652541542fbc365edb2d Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 09:19:04 -0500
Subject: [PATCH 04/24] Add some env variables to pr_agent

---
 .github/workflows/pr_agent.yml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index fc17b6a8d..88901fc53 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -21,4 +21,8 @@ jobs:
           OPENAI.API_TYPE: "azure"
           OPENAI.API_VERSION: "2023-05-15"  # Check Azure documentation for the current API version
           OPENAI.API_BASE: ${{ secrets.AZURE_OPENAI_BASE_URL }} # The base URL for your Azure OpenAI resource. e.g. "https://<your resource name>.openai.azure.com"
-          OPENAI.DEPLOYMENT_ID: ${{ secrets.AZURE_OPENAI_DEPLOYMENT_ID }}  # The deployment name you chose when you deployed the engine
\ No newline at end of file
+          OPENAI.DEPLOYMENT_ID: ${{ secrets.AZURE_OPENAI_DEPLOYMENT_ID }}  # The deployment name you chose when you deployed the engine
+          AZURE_API_VERSION: "2023-05-15"
+          GITHUB_ACTION_CONFIG_AUTO_REVIEW: "true"
+          GITHUB_ACTION_CONFIG_AUTO_DESCRIBE: "true"
+          GITHUB_ACTION_CONFIG_AUTO_IMPROVE: "true"

From b6a1359de0fa21ba684da30d3106a9fab6211007 Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 09:29:19 -0500
Subject: [PATCH 05/24] change pr trigger on all PR updates

---
 .github/workflows/pr_agent.yml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index 88901fc53..6438841e0 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -1,6 +1,5 @@
 on:
   pull_request:
-    types: [opened, reopened, ready_for_review]
   issue_comment:
 jobs:
   pr_agent_job:

From 595737d721e8e71c0bd64e7290c6370dcd6de47e Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 09:57:01 -0500
Subject: [PATCH 06/24] Adding every configuration combination possible

Co-authored-by: Sylvie <sschuresko@flexion.us>
Co-authored-by: pluckyswan <96704946+pluckyswan@users.noreply.github.com>
Co-authored-by: halprin <halprin@users.noreply.github.com>
---
 .github/workflows/pr_agent.yml | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index 6438841e0..5cbbfa9de 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -15,13 +15,20 @@ jobs:
         id: pragent
         uses: Codium-ai/pr-agent@main
         env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           OPENAI_KEY: ${{ secrets.AZURE_OPENAI_KEY }}
-          OPENAI.API_TYPE: "azure"
-          OPENAI.API_VERSION: "2023-05-15"  # Check Azure documentation for the current API version
-          OPENAI.API_BASE: ${{ secrets.AZURE_OPENAI_BASE_URL }} # The base URL for your Azure OpenAI resource. e.g. "https://<your resource name>.openai.azure.com"
-          OPENAI.DEPLOYMENT_ID: ${{ secrets.AZURE_OPENAI_DEPLOYMENT_ID }}  # The deployment name you chose when you deployed the engine
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          OPENAI.API_TYPE: 'azure'
+          OPENAI_API_TYPE: 'azure'
+          OPENAI_API_VERSION: "2023-05-15"
+          OPENAI.API_VERSION: "2023-05-15"
+          OPENAI.API_BASE: 'https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com'
+          OPENAI_API_BASE: 'https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com'
+          OPENAI.DEPLOYMENT_ID: ${{ vars.AZURE_DEPLOYMENT_ID }}
+          OPENAI_DEPLOYMENT_ID: ${{ vars.AZURE_DEPLOYMENT_ID }}
+          AZURE_API_TYPE: 'azure'
+          AZURE_API_KEY: ${{ secrets.AZURE_OPENAI_KEY }}
           AZURE_API_VERSION: "2023-05-15"
+          AZURE_API_BASE: 'https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com'
           GITHUB_ACTION_CONFIG_AUTO_REVIEW: "true"
           GITHUB_ACTION_CONFIG_AUTO_DESCRIBE: "true"
           GITHUB_ACTION_CONFIG_AUTO_IMPROVE: "true"

From 1ce9caa49a1389fe582ec232759a3ec99f848126 Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 10:23:50 -0500
Subject: [PATCH 07/24] Update API version

---
 .github/workflows/pr_agent.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index 5cbbfa9de..3ebf8fbd2 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -19,15 +19,15 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           OPENAI.API_TYPE: 'azure'
           OPENAI_API_TYPE: 'azure'
-          OPENAI_API_VERSION: "2023-05-15"
-          OPENAI.API_VERSION: "2023-05-15"
+          OPENAI_API_VERSION: "2023-03-15"
+          OPENAI.API_VERSION: "2023-03-15"
           OPENAI.API_BASE: 'https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com'
           OPENAI_API_BASE: 'https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com'
           OPENAI.DEPLOYMENT_ID: ${{ vars.AZURE_DEPLOYMENT_ID }}
           OPENAI_DEPLOYMENT_ID: ${{ vars.AZURE_DEPLOYMENT_ID }}
           AZURE_API_TYPE: 'azure'
           AZURE_API_KEY: ${{ secrets.AZURE_OPENAI_KEY }}
-          AZURE_API_VERSION: "2023-05-15"
+          AZURE_API_VERSION: "2023-03-15"
           AZURE_API_BASE: 'https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com'
           GITHUB_ACTION_CONFIG_AUTO_REVIEW: "true"
           GITHUB_ACTION_CONFIG_AUTO_DESCRIBE: "true"

From a8b1b54edd3ab257dd588068d3cee11b98913e8e Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 11:29:10 -0500
Subject: [PATCH 08/24] Update PR agent name for testing purposes

---
 .github/workflows/pr_agent.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index 3ebf8fbd2..f02646c47 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -1,3 +1,5 @@
+name: Perry the PR Agent Platypus
+
 on:
   pull_request:
   issue_comment:

From 68f03945eaa4f251d09e0ea053bce3e3e1c03e42 Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 13:07:31 -0500
Subject: [PATCH 09/24] Update github actions in configurations

---
 .github/workflows/pr_agent.yml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index f02646c47..b1f5d7b59 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -31,6 +31,7 @@ jobs:
           AZURE_API_KEY: ${{ secrets.AZURE_OPENAI_KEY }}
           AZURE_API_VERSION: "2023-03-15"
           AZURE_API_BASE: 'https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com'
-          GITHUB_ACTION_CONFIG_AUTO_REVIEW: "true"
-          GITHUB_ACTION_CONFIG_AUTO_DESCRIBE: "true"
-          GITHUB_ACTION_CONFIG_AUTO_IMPROVE: "true"
+          GITHUB_ACTION_CONFIG.AUTO_REVIEW: "true" # enable\disable auto review
+          GITHUB_ACTION_CONFIG.AUTO_DESCRIBE: "true" # enable\disable auto describe
+          GITHUB_ACTION_CONFIG.AUTO_IMPROVE: "true" # enable\disable auto improve
+          GITHUB_ACTION_CONFIG.PR_ACTIONS: [ "opened", "reopened", "ready_for_review", "review_requested" ]

From a6ddf8e61cd25094b5c127360f11df4084b61cf5 Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 13:19:23 -0500
Subject: [PATCH 10/24] Testing next set of configurations

---
 .github/workflows/pr_agent.yml | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index b1f5d7b59..1183894b6 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -17,20 +17,13 @@ jobs:
         id: pragent
         uses: Codium-ai/pr-agent@main
         env:
-          OPENAI_KEY: ${{ secrets.AZURE_OPENAI_KEY }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          OPENAI.API_TYPE: 'azure'
-          OPENAI_API_TYPE: 'azure'
-          OPENAI_API_VERSION: "2023-03-15"
+          OPENAI.KEY: ${{ secrets.AZURE_OPENAI_KEY }}
+          OPENAI.API_TYPE: "azure"
           OPENAI.API_VERSION: "2023-03-15"
-          OPENAI.API_BASE: 'https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com'
-          OPENAI_API_BASE: 'https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com'
+          OPENAI.API_BASE: "https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com"
           OPENAI.DEPLOYMENT_ID: ${{ vars.AZURE_DEPLOYMENT_ID }}
-          OPENAI_DEPLOYMENT_ID: ${{ vars.AZURE_DEPLOYMENT_ID }}
-          AZURE_API_TYPE: 'azure'
-          AZURE_API_KEY: ${{ secrets.AZURE_OPENAI_KEY }}
           AZURE_API_VERSION: "2023-03-15"
-          AZURE_API_BASE: 'https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com'
           GITHUB_ACTION_CONFIG.AUTO_REVIEW: "true" # enable\disable auto review
           GITHUB_ACTION_CONFIG.AUTO_DESCRIBE: "true" # enable\disable auto describe
           GITHUB_ACTION_CONFIG.AUTO_IMPROVE: "true" # enable\disable auto improve

From 48906b1401fbc767e37e0a73c12de89db63a0ec1 Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 13:23:03 -0500
Subject: [PATCH 11/24] Remove suggested invalid configurations

---
 .github/workflows/pr_agent.yml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index 1183894b6..63609a587 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -27,4 +27,3 @@ jobs:
           GITHUB_ACTION_CONFIG.AUTO_REVIEW: "true" # enable\disable auto review
           GITHUB_ACTION_CONFIG.AUTO_DESCRIBE: "true" # enable\disable auto describe
           GITHUB_ACTION_CONFIG.AUTO_IMPROVE: "true" # enable\disable auto improve
-          GITHUB_ACTION_CONFIG.PR_ACTIONS: [ "opened", "reopened", "ready_for_review", "review_requested" ]

From f425351470cac979f4db27a4ba82435395b8c420 Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 13:36:01 -0500
Subject: [PATCH 12/24] Update env variables to match our github secrets

---
 .github/workflows/pr_agent.yml | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index 63609a587..f32b30071 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -18,12 +18,11 @@ jobs:
         uses: Codium-ai/pr-agent@main
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          OPENAI.KEY: ${{ secrets.AZURE_OPENAI_KEY }}
-          OPENAI.API_TYPE: "azure"
-          OPENAI.API_VERSION: "2023-03-15"
-          OPENAI.API_BASE: "https://${{ vars.AZURE_DEPLOYMENT_ID }}.openai.azure.com"
-          OPENAI.DEPLOYMENT_ID: ${{ vars.AZURE_DEPLOYMENT_ID }}
-          AZURE_API_VERSION: "2023-03-15"
-          GITHUB_ACTION_CONFIG.AUTO_REVIEW: "true" # enable\disable auto review
-          GITHUB_ACTION_CONFIG.AUTO_DESCRIBE: "true" # enable\disable auto describe
-          GITHUB_ACTION_CONFIG.AUTO_IMPROVE: "true" # enable\disable auto improve
+          github_action_config.auto_review: "true"
+          github_action_config.auto_describe: "true"
+          github_action_config.auto_improve: "true"
+          OPENAI_KEY: ${{ secrets.AZURE_OPENAI_KEY }}
+          OPENAI.API_TYPE: 'azure'
+          OPENAI.API_BASE: ${{ secrets.AZURE_OPENAI_BASE_URL }}
+          OPENAI.DEPLOYMENT_ID: ${{ secrets.AZURE_OPENAI_DEPLOYMENT_ID }}
+          OPENAI.API_VERSION: '2023-03-15'

From 0547def916dcce13636dd9317d34cd274ded8666 Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 13:47:43 -0500
Subject: [PATCH 13/24] Remove github settings from workflow and add to the
 .toml file

---
 .github/workflows/pr_agent.yml | 3 ---
 .pr_agent.toml                 | 8 +++++++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index f32b30071..ac44c33ea 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -18,9 +18,6 @@ jobs:
         uses: Codium-ai/pr-agent@main
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          github_action_config.auto_review: "true"
-          github_action_config.auto_describe: "true"
-          github_action_config.auto_improve: "true"
           OPENAI_KEY: ${{ secrets.AZURE_OPENAI_KEY }}
           OPENAI.API_TYPE: 'azure'
           OPENAI.API_BASE: ${{ secrets.AZURE_OPENAI_BASE_URL }}
diff --git a/.pr_agent.toml b/.pr_agent.toml
index 8d65c89aa..11fb5cc63 100644
--- a/.pr_agent.toml
+++ b/.pr_agent.toml
@@ -1,4 +1,10 @@
 [config]
 model="gpt-4" # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
 model_turbo="gpt-4" # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
-fallback_models=["gpt-4"] # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
\ No newline at end of file
+fallback_models=["gpt-4"] # the OpenAI model you've deployed on Azure (e.g. gpt-3.5-turbo)
+
+[github_action_config]
+auto_review = true
+auto_describe = true
+auto_improve = true
+pr_actions = ["opened", "reopened", "ready_for_review", "review_requested"]

From 416ffe1566e5e563e820bf098779e182aa765092 Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 14:08:32 -0500
Subject: [PATCH 14/24] update settings

---
 .github/workflows/pr_agent.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index ac44c33ea..77a3c617f 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -22,4 +22,5 @@ jobs:
           OPENAI.API_TYPE: 'azure'
           OPENAI.API_BASE: ${{ secrets.AZURE_OPENAI_BASE_URL }}
           OPENAI.DEPLOYMENT_ID: ${{ secrets.AZURE_OPENAI_DEPLOYMENT_ID }}
-          OPENAI.API_VERSION: '2023-03-15'
+          OPENAI_API_VERSION: '2023-03-15' # was OPENAI.API_VERSION but changed to see if this fixes gpt-4 issue
+          AZURE_API_VERSION: '2023-03-15' # added to see if this fixes gpt-4 issue

From 21e31f99ce01204727cb47b2d8de9b7f54252016 Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 14:13:25 -0500
Subject: [PATCH 15/24] Add review settings to toml file

---
 .pr_agent.toml | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/.pr_agent.toml b/.pr_agent.toml
index 11fb5cc63..8c5192da8 100644
--- a/.pr_agent.toml
+++ b/.pr_agent.toml
@@ -8,3 +8,32 @@ auto_review = true
 auto_describe = true
 auto_improve = true
 pr_actions = ["opened", "reopened", "ready_for_review", "review_requested"]
+
+[pr_reviewer] # /review #
+# enable/disable features
+require_score_review=false
+require_tests_review=true
+require_estimate_effort_to_review=true
+require_can_be_split_review=false
+require_security_review=true
+require_ticket_analysis_review=true
+# general options
+num_code_suggestions=0
+inline_code_comments = false
+ask_and_reflect=false
+#automatic_review=true
+persistent_comment=true
+extra_instructions = ""
+final_update_message = true
+# review labels
+enable_review_labels_security=true
+enable_review_labels_effort=true
+# specific configurations for incremental review (/review -i)
+require_all_thresholds_for_incremental_review=false
+minimal_commits_for_incremental_review=0
+minimal_minutes_for_incremental_review=0
+enable_intro_text=true
+enable_help_text=false # Determines whether to include help text in the PR review. Enabled by default.
+# auto approval
+enable_auto_approval=false
+maximal_review_effort=5

From 98813f4c912ac648fc916608409ca6c96ac596dc Mon Sep 17 00:00:00 2001
From: saquino0827 <saquino@flexion.us>
Date: Thu, 10 Oct 2024 14:26:07 -0500
Subject: [PATCH 16/24] Add preview to the azure version

---
 .github/workflows/pr_agent.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index 77a3c617f..4000fefc0 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -23,4 +23,4 @@ jobs:
           OPENAI.API_BASE: ${{ secrets.AZURE_OPENAI_BASE_URL }}
           OPENAI.DEPLOYMENT_ID: ${{ secrets.AZURE_OPENAI_DEPLOYMENT_ID }}
           OPENAI_API_VERSION: '2023-03-15' # was OPENAI.API_VERSION but changed to see if this fixes gpt-4 issue
-          AZURE_API_VERSION: '2023-03-15' # added to see if this fixes gpt-4 issue
+          AZURE_API_VERSION: '2023-03-15-preview' # added to see if this fixes gpt-4 issue

From add342d2b1bd9e5b6eaf4f819a45b1bf4cd6929a Mon Sep 17 00:00:00 2001
From: Bella Luz Quintero <bquintero@flexion.us>
Date: Thu, 10 Oct 2024 14:56:50 -0600
Subject: [PATCH 17/24] add inline code comments and update comments

---
 .github/workflows/pr_agent.yml | 4 ++--
 .pr_agent.toml                 | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index 4000fefc0..01e8d6e65 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -22,5 +22,5 @@ jobs:
           OPENAI.API_TYPE: 'azure'
           OPENAI.API_BASE: ${{ secrets.AZURE_OPENAI_BASE_URL }}
           OPENAI.DEPLOYMENT_ID: ${{ secrets.AZURE_OPENAI_DEPLOYMENT_ID }}
-          OPENAI_API_VERSION: '2023-03-15' # was OPENAI.API_VERSION but changed to see if this fixes gpt-4 issue
-          AZURE_API_VERSION: '2023-03-15-preview' # added to see if this fixes gpt-4 issue
+          OPENAI_API_VERSION: '2023-03-15'
+          AZURE_API_VERSION: '2023-03-15-preview' # Specific version required to address compatibility issues with GPT-4 deployment on Azure.
diff --git a/.pr_agent.toml b/.pr_agent.toml
index 8c5192da8..81e7be7e6 100644
--- a/.pr_agent.toml
+++ b/.pr_agent.toml
@@ -19,7 +19,7 @@ require_security_review=true
 require_ticket_analysis_review=true
 # general options
 num_code_suggestions=0
-inline_code_comments = false
+inline_code_comments = true
 ask_and_reflect=false
 #automatic_review=true
 persistent_comment=true

From 4f5f36a1ce6a17e02abd1a74990a0d5d2054fe37 Mon Sep 17 00:00:00 2001
From: Bella Luz Quintero <bquintero@flexion.us>
Date: Mon, 14 Oct 2024 13:35:24 -0600
Subject: [PATCH 18/24] added comments for existing configuration and turned
 off labeling and describe

---
 .pr_agent.toml | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/.pr_agent.toml b/.pr_agent.toml
index 81e7be7e6..f77e4382b 100644
--- a/.pr_agent.toml
+++ b/.pr_agent.toml
@@ -5,29 +5,29 @@ fallback_models=["gpt-4"] # the OpenAI model you've deployed on Azure (e.g. gpt-
 
 [github_action_config]
 auto_review = true
-auto_describe = true
+auto_describe = false
 auto_improve = true
 pr_actions = ["opened", "reopened", "ready_for_review", "review_requested"]
 
 [pr_reviewer] # /review #
 # enable/disable features
-require_score_review=false
-require_tests_review=true
-require_estimate_effort_to_review=true
-require_can_be_split_review=false
-require_security_review=true
-require_ticket_analysis_review=true
+require_score_review=false # If set to true, the tool will add a section that scores the PR. Default is false.
+require_tests_review=true #If set to true, the tool will add a section that checks if the PR contains tests. Default is true.
+require_estimate_effort_to_review=true # If set to true, the tool will add a section that estimates the effort needed to review the PR. Default is true.
+require_can_be_split_review=false # If set to true, the tool will add a section that checks if the PR contains several themes, and can be split into smaller PRs. Default is false.
+require_security_review=true # If set to true, the tool will add a section that checks if the PR contains a possible security or vulnerability issue. Default is true.
+require_ticket_analysis_review=true # If set to true, and the PR contains a GitHub ticket number, the tool will add a section that checks if the PR in fact fulfilled the ticket requirements. Default is true.
 # general options
-num_code_suggestions=0
-inline_code_comments = true
+num_code_suggestions=3 # Number of code suggestions provided by the 'review' tool. Default is 0, meaning no code suggestions will be provided by the `review` tool.
+inline_code_comments = true # If set to true, the tool will publish the code suggestions as comments on the code diff. Default is false. Note that you need to set `num_code_suggestions`>0 to get code suggestions
 ask_and_reflect=false
 #automatic_review=true
-persistent_comment=true
-extra_instructions = ""
-final_update_message = true
+persistent_comment=true # If set to true, the review comment will be persistent, meaning that every new review request will edit the previous one. Default is true.
+extra_instructions = "" # Optional extra instructions to the tool. For example: "focus on the changes in the file X. Ignore change in ...".
+final_update_message = true # If set to true, it will add a comment message [`PR Description updated to latest commit...`](https://github.com/Codium-ai/pr-agent/pull/499#issuecomment-1837412176) after finishing calling `/describe`. Default is false.
 # review labels
-enable_review_labels_security=true
-enable_review_labels_effort=true
+enable_review_labels_security=false # If set to true, the tool will publish a 'possible security issue' label if it detects a security issue. Default is true.
+enable_review_labels_effort=false # If set to true, the tool will publish a 'Review effort [1-5]: x' label. Default is true.
 # specific configurations for incremental review (/review -i)
 require_all_thresholds_for_incremental_review=false
 minimal_commits_for_incremental_review=0
@@ -35,5 +35,5 @@ minimal_minutes_for_incremental_review=0
 enable_intro_text=true
 enable_help_text=false # Determines whether to include help text in the PR review. Enabled by default.
 # auto approval
-enable_auto_approval=false
-maximal_review_effort=5
+enable_auto_approval=false # If set to true, the tool will approve the PR when invoked with the 'auto_approve' command. Default is false. This flag can be changed only from a configuration file.
+maximal_review_effort=5 # Maximal effort level for auto-approval. If the PR's estimated review effort is above this threshold, the auto-approval will not run. Default is 5.

From b885e9bff81e89ab5cd8da8c9fed4525b899c0e8 Mon Sep 17 00:00:00 2001
From: Sylvie <sschuresko@flexion.us>
Date: Tue, 15 Oct 2024 13:32:07 -0500
Subject: [PATCH 19/24] specify type for `issue_comment`

Co-Authored-By: Samuel Aquino <saquino@flexion.us>
Co-Authored-By: Bella L. Quintero <96704946+pluckyswan@users.noreply.github.com>
Co-Authored-By: halprin <halprin@users.noreply.github.com>
---
 .github/workflows/pr_agent.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index 01e8d6e65..eed7d3bf9 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -3,6 +3,7 @@ name: Perry the PR Agent Platypus
 on:
   pull_request:
   issue_comment:
+    types: [created]
 jobs:
   pr_agent_job:
     if: ${{ github.event.sender.type != 'Bot' }}

From 8f181537d3ba36d3f31191384122389f08527e5f Mon Sep 17 00:00:00 2001
From: Sylvie <sschuresko@flexion.us>
Date: Tue, 15 Oct 2024 13:45:43 -0500
Subject: [PATCH 20/24] add additional trigger since `issue_comment` only works
 if workflow is on main branch

Co-Authored-By: Samuel Aquino <saquino@flexion.us>
Co-Authored-By: Bella L. Quintero <96704946+pluckyswan@users.noreply.github.com>
Co-Authored-By: halprin <halprin@users.noreply.github.com>
---
 .github/workflows/pr_agent.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml
index eed7d3bf9..be0bbeaa4 100644
--- a/.github/workflows/pr_agent.yml
+++ b/.github/workflows/pr_agent.yml
@@ -2,6 +2,8 @@ name: Perry the PR Agent Platypus
 
 on:
   pull_request:
+  pull_request_review_comment:
+    types: [created]
   issue_comment:
     types: [created]
 jobs:

From 4448436eb8d056afbacdbdc499c354f27e306a7c Mon Sep 17 00:00:00 2001
From: Sylvie <sschuresko@flexion.us>
Date: Tue, 15 Oct 2024 13:53:45 -0500
Subject: [PATCH 21/24] let's see if we can stop labeling so much

Co-Authored-By: Samuel Aquino <saquino@flexion.us>
Co-Authored-By: Bella L. Quintero <96704946+pluckyswan@users.noreply.github.com>
Co-Authored-By: halprin <halprin@users.noreply.github.com>
---
 .pr_agent.toml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.pr_agent.toml b/.pr_agent.toml
index f77e4382b..2b32a0534 100644
--- a/.pr_agent.toml
+++ b/.pr_agent.toml
@@ -37,3 +37,6 @@ enable_help_text=false # Determines whether to include help text in the PR revie
 # auto approval
 enable_auto_approval=false # If set to true, the tool will approve the PR when invoked with the 'auto_approve' command. Default is false. This flag can be changed only from a configuration file.
 maximal_review_effort=5 # Maximal effort level for auto-approval. If the PR's estimated review effort is above this threshold, the auto-approval will not run. Default is 5.
+
+[pr_description] # /describe #
+publish_labels=false

From b80ee660ace682099c03b7873329a93b6497ce78 Mon Sep 17 00:00:00 2001
From: Sylvie <sschuresko@flexion.us>
Date: Tue, 15 Oct 2024 14:52:42 -0500
Subject: [PATCH 22/24] remove settings that are default; add a link to example
 settings

Co-Authored-By: Samuel Aquino <saquino@flexion.us>
Co-Authored-By: halprin <halprin@users.noreply.github.com>
---
 .pr_agent.toml | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/.pr_agent.toml b/.pr_agent.toml
index 2b32a0534..2fae5f935 100644
--- a/.pr_agent.toml
+++ b/.pr_agent.toml
@@ -9,20 +9,15 @@ auto_describe = false
 auto_improve = true
 pr_actions = ["opened", "reopened", "ready_for_review", "review_requested"]
 
+# See https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml for all possible config options
+
 [pr_reviewer] # /review #
 # enable/disable features
-require_score_review=false # If set to true, the tool will add a section that scores the PR. Default is false.
-require_tests_review=true #If set to true, the tool will add a section that checks if the PR contains tests. Default is true.
-require_estimate_effort_to_review=true # If set to true, the tool will add a section that estimates the effort needed to review the PR. Default is true.
-require_can_be_split_review=false # If set to true, the tool will add a section that checks if the PR contains several themes, and can be split into smaller PRs. Default is false.
-require_security_review=true # If set to true, the tool will add a section that checks if the PR contains a possible security or vulnerability issue. Default is true.
-require_ticket_analysis_review=true # If set to true, and the PR contains a GitHub ticket number, the tool will add a section that checks if the PR in fact fulfilled the ticket requirements. Default is true.
 # general options
 num_code_suggestions=3 # Number of code suggestions provided by the 'review' tool. Default is 0, meaning no code suggestions will be provided by the `review` tool.
 inline_code_comments = true # If set to true, the tool will publish the code suggestions as comments on the code diff. Default is false. Note that you need to set `num_code_suggestions`>0 to get code suggestions
 ask_and_reflect=false
 #automatic_review=true
-persistent_comment=true # If set to true, the review comment will be persistent, meaning that every new review request will edit the previous one. Default is true.
 extra_instructions = "" # Optional extra instructions to the tool. For example: "focus on the changes in the file X. Ignore change in ...".
 final_update_message = true # If set to true, it will add a comment message [`PR Description updated to latest commit...`](https://github.com/Codium-ai/pr-agent/pull/499#issuecomment-1837412176) after finishing calling `/describe`. Default is false.
 # review labels
@@ -36,7 +31,6 @@ enable_intro_text=true
 enable_help_text=false # Determines whether to include help text in the PR review. Enabled by default.
 # auto approval
 enable_auto_approval=false # If set to true, the tool will approve the PR when invoked with the 'auto_approve' command. Default is false. This flag can be changed only from a configuration file.
-maximal_review_effort=5 # Maximal effort level for auto-approval. If the PR's estimated review effort is above this threshold, the auto-approval will not run. Default is 5.
 
 [pr_description] # /describe #
 publish_labels=false

From c0e5dba89f7a4b0db458e604533c524c0b57128f Mon Sep 17 00:00:00 2001
From: Sylvie <sschuresko@flexion.us>
Date: Tue, 15 Oct 2024 15:35:45 -0500
Subject: [PATCH 23/24] adjust some more settings

Co-Authored-By: Samuel Aquino <saquino@flexion.us>
---
 .pr_agent.toml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.pr_agent.toml b/.pr_agent.toml
index 2fae5f935..0f833901d 100644
--- a/.pr_agent.toml
+++ b/.pr_agent.toml
@@ -17,6 +17,7 @@ pr_actions = ["opened", "reopened", "ready_for_review", "review_requested"]
 num_code_suggestions=3 # Number of code suggestions provided by the 'review' tool. Default is 0, meaning no code suggestions will be provided by the `review` tool.
 inline_code_comments = true # If set to true, the tool will publish the code suggestions as comments on the code diff. Default is false. Note that you need to set `num_code_suggestions`>0 to get code suggestions
 ask_and_reflect=false
+persistent_comment=false
 #automatic_review=true
 extra_instructions = "" # Optional extra instructions to the tool. For example: "focus on the changes in the file X. Ignore change in ...".
 final_update_message = true # If set to true, it will add a comment message [`PR Description updated to latest commit...`](https://github.com/Codium-ai/pr-agent/pull/499#issuecomment-1837412176) after finishing calling `/describe`. Default is false.
@@ -34,3 +35,6 @@ enable_auto_approval=false # If set to true, the tool will approve the PR when i
 
 [pr_description] # /describe #
 publish_labels=false
+# describe as comment
+publish_description_as_comment=true
+publish_description_as_comment_persistent=false

From 94d1509bd1033923a4c6a1e7bc1af541ca1d90b7 Mon Sep 17 00:00:00 2001
From: Sylvie <sschuresko@flexion.us>
Date: Tue, 15 Oct 2024 15:37:10 -0500
Subject: [PATCH 24/24] one more

Co-Authored-By: Samuel Aquino <saquino@flexion.us>
---
 .pr_agent.toml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.pr_agent.toml b/.pr_agent.toml
index 0f833901d..e405e76d3 100644
--- a/.pr_agent.toml
+++ b/.pr_agent.toml
@@ -38,3 +38,6 @@ publish_labels=false
 # describe as comment
 publish_description_as_comment=true
 publish_description_as_comment_persistent=false
+
+[pr_code_suggestions] # /improve #
+persistent_comment=false