From 768494aa5b59f967adf66f2ea9445fee4f515ec8 Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 11:57:57 +0530 Subject: [PATCH 01/17] Testing the agent - Adding sample file --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 31 +++++++++++++--------- sample_python_script.py | 18 +++++++++++++ 2 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 sample_python_script.py diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index 3a155f770..1c5a7a4c0 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -7,19 +7,27 @@ jobs: pr_agent_job: if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ai-review') && ((contains(github.event.comment.body, '/review') || contains(github.event.comment.body, '/describe') || contains(github.event.comment.body, '/add_docs') || contains(github.event.comment.body, '/update_changelog')) && github.event.comment.user.login != 'nex-maximus' || (github.event_name == 'pull_request' && github.event.pull_request.user.login != 'nex-maximus')) }} runs-on: ["ubuntu-latest"] - container: - image: 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable - options: --pull always - credentials: - # Make sure to add the AWS access key and secret key to github secrets vault - username: ${{ secrets.AWS_ACCESS_KEY_ID }} - password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} steps: - - name: Smart Devops PR Agent Action + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + - name: Login to Amazon ECR Registry + run: | + aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin 011528261982.dkr.ecr.us-west-2.amazonaws.com + + - name: Pull the Docker image from ECR registry + run: docker pull 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable + + - name: Smart Devops PR Agent Action id: pragent run: | - . /genai_agent/genai_env/bin/activate && /genai_agent/get_pr_agent_details.sh - shell: bash + docker run --rm 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable sh -c " + . /genai_agent/genai_env/bin/activate && /genai_agent/get_pr_agent_details.sh + " env: GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_ACTION.AUTO_REVIEW: true @@ -32,7 +40,6 @@ jobs: PREVIEW_API_VERSION: ${{ secrets.PREVIEW_API_VERSION }} DEPLOY_NAME: ${{ secrets.DEPLOY_NAME }} PUSH_TOKEN: ${{ secrets.PUSH_TOKEN }} - # Below secrets to fetch the auth token for Intel's API gateway CLIENT_ID: ${{ secrets.CLIENT_ID }} CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} @@ -73,4 +80,4 @@ jobs: # Uncomment the line below to consider the ICP and Kernel Coding Guidelines for C Language Code # CODING_GUIDELINES.C_ICP_GUIDELINES: true - # CODING_GUIDELINES.C_KERNEL_GUIDELINES: true \ No newline at end of file + # CODING_GUIDELINES.C_KERNEL_GUIDELINES: true diff --git a/sample_python_script.py b/sample_python_script.py new file mode 100644 index 000000000..dc1b5cb97 --- /dev/null +++ b/sample_python_script.py @@ -0,0 +1,18 @@ +import math + +def calculate_area_of_circle(radius): + """Calculate the area of a circle given its radius.""" + return math.pi * (radius ** 2) + +def main(): + # Get user input + radius = float(input("Enter the radius of the circle: ")) + + # Calculate the area + area = calculate_area_of_circle(radius) + + # Print the result + print(f"The area of the circle with radius {radius} is {area:.2f}") + +if __name__ == "__main__": + main() \ No newline at end of file From 305da68cf1e96cdb64262a7d9389d118f9c638f5 Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 12:02:39 +0530 Subject: [PATCH 02/17] Testing the agent - Adding sample file --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index 1c5a7a4c0..e7a5ceef4 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -17,7 +17,7 @@ jobs: - name: Login to Amazon ECR Registry run: | - aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin 011528261982.dkr.ecr.us-west-2.amazonaws.com + aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 011528261982.dkr.ecr.us-west-2.amazonaws.com - name: Pull the Docker image from ECR registry run: docker pull 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable From 3fe3b2d2630836af836a8355e94a6cca583f3afd Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 17:29:56 +0530 Subject: [PATCH 03/17] Added shell in run step --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index e7a5ceef4..655f13151 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -28,6 +28,7 @@ jobs: docker run --rm 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable sh -c " . /genai_agent/genai_env/bin/activate && /genai_agent/get_pr_agent_details.sh " + shell: bash env: GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_ACTION.AUTO_REVIEW: true From 533b14b6d0da05b3987b60e1a87d2e6c25a0b40d Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 17:34:40 +0530 Subject: [PATCH 04/17] Added bash in run step --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index 655f13151..66ef4754e 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -25,10 +25,9 @@ jobs: - name: Smart Devops PR Agent Action id: pragent run: | - docker run --rm 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable sh -c " + docker run --rm 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable bash -c " . /genai_agent/genai_env/bin/activate && /genai_agent/get_pr_agent_details.sh " - shell: bash env: GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_ACTION.AUTO_REVIEW: true From 971dc11b623566dee44cae0c65af4c3feb6dca5a Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 17:48:41 +0530 Subject: [PATCH 05/17] Added env to docker run step --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index 66ef4754e..6ca552f2e 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -25,7 +25,7 @@ jobs: - name: Smart Devops PR Agent Action id: pragent run: | - docker run --rm 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable bash -c " + docker run --rm -e GITHUB_CONTEXT="${GITHUB_CONTEXT} 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable sh -c " . /genai_agent/genai_env/bin/activate && /genai_agent/get_pr_agent_details.sh " env: From f57e81223868439d3516ab262ae0478e1e9a368b Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 17:51:22 +0530 Subject: [PATCH 06/17] Added env to docker run step --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index 6ca552f2e..cd19eb0ce 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -25,7 +25,7 @@ jobs: - name: Smart Devops PR Agent Action id: pragent run: | - docker run --rm -e GITHUB_CONTEXT="${GITHUB_CONTEXT} 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable sh -c " + docker run --rm -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable sh -c " . /genai_agent/genai_env/bin/activate && /genai_agent/get_pr_agent_details.sh " env: From ee5b3470646a08425f7eeff5a1acd7d98b2c41b0 Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 17:54:12 +0530 Subject: [PATCH 07/17] Added env to docker run step --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index cd19eb0ce..97e690730 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -25,7 +25,7 @@ jobs: - name: Smart Devops PR Agent Action id: pragent run: | - docker run --rm -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable sh -c " + docker run --rm -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable bash -c " . /genai_agent/genai_env/bin/activate && /genai_agent/get_pr_agent_details.sh " env: From b0a84502423fa6bcb6b50fdfa8fe3d93ce4b1b1b Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 17:57:16 +0530 Subject: [PATCH 08/17] Added env to docker run step --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index 97e690730..6276074de 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -25,7 +25,7 @@ jobs: - name: Smart Devops PR Agent Action id: pragent run: | - docker run --rm -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable bash -c " + docker run --rm -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" -e PUSH_TOKEN="${{ secrets.PUSH_TOKEN }}" 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable bash -c " . /genai_agent/genai_env/bin/activate && /genai_agent/get_pr_agent_details.sh " env: From 9a0f659b4c1230b620d1778be99656f7ef99b3c6 Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 18:03:13 +0530 Subject: [PATCH 09/17] Added env to docker run step --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index 6276074de..1f84bf9ff 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -25,7 +25,10 @@ jobs: - name: Smart Devops PR Agent Action id: pragent run: | - docker run --rm -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" -e PUSH_TOKEN="${{ secrets.PUSH_TOKEN }}" 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable bash -c " + docker run --rm \ + -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" \ + -e PUSH_TOKEN="${{ secrets.PUSH_TOKEN }}" \ + 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable bash -c " . /genai_agent/genai_env/bin/activate && /genai_agent/get_pr_agent_details.sh " env: From 039038d03e2be944a56bb7973ad7d179767fd757 Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 18:18:43 +0530 Subject: [PATCH 10/17] Added env to docker run step --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index 1f84bf9ff..cd8a92b49 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -27,7 +27,18 @@ jobs: run: | docker run --rm \ -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" \ - -e PUSH_TOKEN="${{ secrets.PUSH_TOKEN }}" \ + -e GITHUB_ACTION.AUTO_REVIEW="${GITHUB_ACTION.AUTO_REVIEW}" \ + -e GITHUB_ACTION.AUTO_DESCRIBE="${GITHUB_ACTION.AUTO_DESCRIBE}" \ + -e GITHUB_ACTION.UPDATE_TITLE="${GITHUB_ACTION.UPDATE_TITLE}" \ + -e PR_NUMBER="${PR_NUMBER}" \ + -e API_KEY="${API_KEY}" \ + -e API_BASE="${API_BASE}" \ + -e STABLE_API_VERSION="${STABLE_API_VERSION}" \ + -e PREVIEW_API_VERSION="${PREVIEW_API_VERSION}" \ + -e DEPLOY_NAME="${DEPLOY_NAME}" \ + -e PUSH_TOKEN="${PUSH_TOKEN}" \ + -e CLIENT_ID="${CLIENT_ID}" \ + -e CLIENT_SECRET="${CLIENT_SECRET}" 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable bash -c " . /genai_agent/genai_env/bin/activate && /genai_agent/get_pr_agent_details.sh " From 356a21613ac932525d6158c61f3810a6d006ddc7 Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 18:22:11 +0530 Subject: [PATCH 11/17] Added env in run step --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index cd8a92b49..aaa43728f 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -27,9 +27,6 @@ jobs: run: | docker run --rm \ -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" \ - -e GITHUB_ACTION.AUTO_REVIEW="${GITHUB_ACTION.AUTO_REVIEW}" \ - -e GITHUB_ACTION.AUTO_DESCRIBE="${GITHUB_ACTION.AUTO_DESCRIBE}" \ - -e GITHUB_ACTION.UPDATE_TITLE="${GITHUB_ACTION.UPDATE_TITLE}" \ -e PR_NUMBER="${PR_NUMBER}" \ -e API_KEY="${API_KEY}" \ -e API_BASE="${API_BASE}" \ From 555a77dffe2181b69380f159415d281ee73c5ba3 Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Thu, 21 Nov 2024 18:25:48 +0530 Subject: [PATCH 12/17] Added env to docker run step --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index aaa43728f..97c2c3c43 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -35,7 +35,7 @@ jobs: -e DEPLOY_NAME="${DEPLOY_NAME}" \ -e PUSH_TOKEN="${PUSH_TOKEN}" \ -e CLIENT_ID="${CLIENT_ID}" \ - -e CLIENT_SECRET="${CLIENT_SECRET}" + -e CLIENT_SECRET="${CLIENT_SECRET}" \ 011528261982.dkr.ecr.us-west-2.amazonaws.com/smartdevops:genai-stable bash -c " . /genai_agent/genai_env/bin/activate && /genai_agent/get_pr_agent_details.sh " From 30ebe17a7c978f6cda6b01335b8ce40a30e51d88 Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Fri, 22 Nov 2024 08:48:04 +0530 Subject: [PATCH 13/17] Adding env variables in docker run command --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index 97c2c3c43..bb9222bd7 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -27,6 +27,9 @@ jobs: run: | docker run --rm \ -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" \ + -e GITHUB_ACTION.AUTO_REVIEW="${GITHUB_ACTION.AUTO_REVIEW}" \ + -e GITHUB_ACTION.AUTO_DESCRIBE="${GITHUB_ACTION.AUTO_DESCRIBE}" \ + -e GITHUB_ACTION.UPDATE_TITLE="${GITHUB_ACTION.UPDATE_TITLE}" \ -e PR_NUMBER="${PR_NUMBER}" \ -e API_KEY="${API_KEY}" \ -e API_BASE="${API_BASE}" \ From ae7cd81b17ee585614c40943fceeac962bf145a1 Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Fri, 22 Nov 2024 08:59:58 +0530 Subject: [PATCH 14/17] Adding env variables in docker run command --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index bb9222bd7..872d7a022 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -25,11 +25,9 @@ jobs: - name: Smart Devops PR Agent Action id: pragent run: | - docker run --rm \ + env 'GITHUB_ACTION.AUTO_REVIEW=${GITHUB_ACTION_AUTO_REVIEW}' docker run --rm \ -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" \ -e GITHUB_ACTION.AUTO_REVIEW="${GITHUB_ACTION.AUTO_REVIEW}" \ - -e GITHUB_ACTION.AUTO_DESCRIBE="${GITHUB_ACTION.AUTO_DESCRIBE}" \ - -e GITHUB_ACTION.UPDATE_TITLE="${GITHUB_ACTION.UPDATE_TITLE}" \ -e PR_NUMBER="${PR_NUMBER}" \ -e API_KEY="${API_KEY}" \ -e API_BASE="${API_BASE}" \ @@ -44,7 +42,7 @@ jobs: " env: GITHUB_CONTEXT: ${{ toJson(github) }} - GITHUB_ACTION.AUTO_REVIEW: true + GITHUB_ACTION_AUTO_REVIEW: true GITHUB_ACTION.AUTO_DESCRIBE: true GITHUB_ACTION.UPDATE_TITLE: false PR_NUMBER: ${{ github.event.number }} From 5e08d8ff83fd78eab1fcd3cb045612e933e9455e Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Fri, 22 Nov 2024 09:04:21 +0530 Subject: [PATCH 15/17] Adding env variables in docker run command --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index 872d7a022..d090b129c 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -25,9 +25,10 @@ jobs: - name: Smart Devops PR Agent Action id: pragent run: | - env 'GITHUB_ACTION.AUTO_REVIEW=${GITHUB_ACTION_AUTO_REVIEW}' docker run --rm \ + export GITHUB_ACTION_AUTO_REVIEW="${GITHUB_ACTION_AUTO_REVIEW}" + docker run --rm \ -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" \ - -e GITHUB_ACTION.AUTO_REVIEW="${GITHUB_ACTION.AUTO_REVIEW}" \ + -e GITHUB_ACTION.AUTO_REVIEW="${GITHUB_ACTION_AUTO_REVIEW}" \ -e PR_NUMBER="${PR_NUMBER}" \ -e API_KEY="${API_KEY}" \ -e API_BASE="${API_BASE}" \ From fe9a164f5f7fe3381094b3237e44900c8be8231e Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Fri, 22 Nov 2024 09:13:56 +0530 Subject: [PATCH 16/17] Adding env variables in docker run command --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index d090b129c..db1f23191 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -26,9 +26,13 @@ jobs: id: pragent run: | export GITHUB_ACTION_AUTO_REVIEW="${GITHUB_ACTION_AUTO_REVIEW}" + export GITHUB_ACTION_AUTO_DESCRIBE="${GITHUB_ACTION_AUTO_DESCRIBE}" + export GITHUB_ACTION_UPDATE_TITLE="${GITHUB_ACTION_UPDATE_TITLE}" docker run --rm \ -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" \ -e GITHUB_ACTION.AUTO_REVIEW="${GITHUB_ACTION_AUTO_REVIEW}" \ + -e GITHUB_ACTION.AUTO_DESCRIBE="${GITHUB_ACTION_AUTO_DESCRIBE}" \ + -e GITHUB_ACTION.UPDATE_TITLE="${GITHUB_ACTION_UPDATE_TITLE}" \ -e PR_NUMBER="${PR_NUMBER}" \ -e API_KEY="${API_KEY}" \ -e API_BASE="${API_BASE}" \ @@ -44,8 +48,8 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_ACTION_AUTO_REVIEW: true - GITHUB_ACTION.AUTO_DESCRIBE: true - GITHUB_ACTION.UPDATE_TITLE: false + GITHUB_ACTION_AUTO_DESCRIBE: true + GITHUB_ACTION_UPDATE_TITLE: false PR_NUMBER: ${{ github.event.number }} API_KEY: ${{ secrets.API_KEY }} API_BASE: ${{ secrets.API_BASE }} From 4fba344472f2a097d7b7e754179ce83a4d3918a9 Mon Sep 17 00:00:00 2001 From: "Joshi, Vishakha" Date: Fri, 22 Nov 2024 09:22:42 +0530 Subject: [PATCH 17/17] Adding env variables in docker run command --- .github/workflows/DEVELOPER_ASSISTANT.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index db1f23191..f5eab5872 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -25,9 +25,9 @@ jobs: - name: Smart Devops PR Agent Action id: pragent run: | - export GITHUB_ACTION_AUTO_REVIEW="${GITHUB_ACTION_AUTO_REVIEW}" - export GITHUB_ACTION_AUTO_DESCRIBE="${GITHUB_ACTION_AUTO_DESCRIBE}" - export GITHUB_ACTION_UPDATE_TITLE="${GITHUB_ACTION_UPDATE_TITLE}" + export GITHUB_ACTION_AUTO_REVIEW="${GITHUB_ACTION.AUTO_REVIEW}" + export GITHUB_ACTION_AUTO_DESCRIBE="${GITHUB_ACTION.AUTO_DESCRIBE}" + export GITHUB_ACTION_UPDATE_TITLE="${GITHUB_ACTION.UPDATE_TITLE}" docker run --rm \ -e GITHUB_CONTEXT="${GITHUB_CONTEXT}" \ -e GITHUB_ACTION.AUTO_REVIEW="${GITHUB_ACTION_AUTO_REVIEW}" \ @@ -47,9 +47,9 @@ jobs: " env: GITHUB_CONTEXT: ${{ toJson(github) }} - GITHUB_ACTION_AUTO_REVIEW: true - GITHUB_ACTION_AUTO_DESCRIBE: true - GITHUB_ACTION_UPDATE_TITLE: false + GITHUB_ACTION.AUTO_REVIEW: true + GITHUB_ACTION.AUTO_DESCRIBE: true + GITHUB_ACTION.UPDATE_TITLE: false PR_NUMBER: ${{ github.event.number }} API_KEY: ${{ secrets.API_KEY }} API_BASE: ${{ secrets.API_BASE }}