From 743cf3d76ea784dd6f45bca25cd3801ab3c5c5e3 Mon Sep 17 00:00:00 2001 From: BEAdi <72088126+BEAdi@users.noreply.github.com> Date: Sun, 28 Jul 2024 12:58:23 +0300 Subject: [PATCH 01/12] add single quotes --- .github/workflows/update-demisto-sdk-version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-demisto-sdk-version.yml b/.github/workflows/update-demisto-sdk-version.yml index ffe2a13fb434..f99790abf1a7 100644 --- a/.github/workflows/update-demisto-sdk-version.yml +++ b/.github/workflows/update-demisto-sdk-version.yml @@ -65,10 +65,10 @@ jobs: git push origin ${{ inputs.release_version }} if ${{ inputs.is_draft == true }}; then echo "creating draft release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "${{ inputs.release_changes }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "'${{ inputs.release_changes }}'" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft else echo "creating release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "${{ inputs.release_changes }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "'${{ inputs.release_changes }}'" --reviewer ${{ inputs.reviewer }} -l "docs-approved" fi env: GH_TOKEN: ${{ secrets.CONTENTBOT_GH_ADMIN_TOKEN }} From e1dd1aef1773ca7dd46266b7f4b3e883283c8e4e Mon Sep 17 00:00:00 2001 From: BEAdi <72088126+BEAdi@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:21:03 +0300 Subject: [PATCH 02/12] add single quotes --- .github/workflows/update-demisto-sdk-version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-demisto-sdk-version.yml b/.github/workflows/update-demisto-sdk-version.yml index f99790abf1a7..c43b7f9672a0 100644 --- a/.github/workflows/update-demisto-sdk-version.yml +++ b/.github/workflows/update-demisto-sdk-version.yml @@ -65,10 +65,10 @@ jobs: git push origin ${{ inputs.release_version }} if ${{ inputs.is_draft == true }}; then echo "creating draft release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "'${{ inputs.release_changes }}'" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body ${{ format('\'{0}\'', inputs.release_changes) }} --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft else echo "creating release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "'${{ inputs.release_changes }}'" --reviewer ${{ inputs.reviewer }} -l "docs-approved" + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body ${{ format('\'{0}\'', inputs.release_changes) }} --reviewer ${{ inputs.reviewer }} -l "docs-approved" fi env: GH_TOKEN: ${{ secrets.CONTENTBOT_GH_ADMIN_TOKEN }} From 1cfc745134268608fdf7feb1128819fb44b2ee88 Mon Sep 17 00:00:00 2001 From: BEAdi <72088126+BEAdi@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:23:11 +0300 Subject: [PATCH 03/12] add single quotes --- .github/workflows/update-demisto-sdk-version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-demisto-sdk-version.yml b/.github/workflows/update-demisto-sdk-version.yml index c43b7f9672a0..f3cd7c07f22e 100644 --- a/.github/workflows/update-demisto-sdk-version.yml +++ b/.github/workflows/update-demisto-sdk-version.yml @@ -65,10 +65,10 @@ jobs: git push origin ${{ inputs.release_version }} if ${{ inputs.is_draft == true }}; then echo "creating draft release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body ${{ format('\'{0}\'', inputs.release_changes) }} --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body ${{ format("'{0}'", inputs.release_changes) }} --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft else echo "creating release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body ${{ format('\'{0}\'', inputs.release_changes) }} --reviewer ${{ inputs.reviewer }} -l "docs-approved" + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body ${{ format("'{0}'", inputs.release_changes) }} --reviewer ${{ inputs.reviewer }} -l "docs-approved" fi env: GH_TOKEN: ${{ secrets.CONTENTBOT_GH_ADMIN_TOKEN }} From 42b461352a97cc14fe453570ee6c8271c97a572a Mon Sep 17 00:00:00 2001 From: BEAdi <72088126+BEAdi@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:47:44 +0300 Subject: [PATCH 04/12] add single quotes --- .github/workflows/update-demisto-sdk-version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-demisto-sdk-version.yml b/.github/workflows/update-demisto-sdk-version.yml index f3cd7c07f22e..35c8cf27e362 100644 --- a/.github/workflows/update-demisto-sdk-version.yml +++ b/.github/workflows/update-demisto-sdk-version.yml @@ -65,10 +65,10 @@ jobs: git push origin ${{ inputs.release_version }} if ${{ inputs.is_draft == true }}; then echo "creating draft release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body ${{ format("'{0}'", inputs.release_changes) }} --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body '${{ inputs.release_changes }}' --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft else echo "creating release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body ${{ format("'{0}'", inputs.release_changes) }} --reviewer ${{ inputs.reviewer }} -l "docs-approved" + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "${{ inputs.release_changes }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" fi env: GH_TOKEN: ${{ secrets.CONTENTBOT_GH_ADMIN_TOKEN }} From 4735d400426f84f8d6e0e07e10fe684737aef763 Mon Sep 17 00:00:00 2001 From: BEAdi <72088126+BEAdi@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:44:22 +0300 Subject: [PATCH 05/12] new arg --- .github/workflows/update-demisto-sdk-version.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/update-demisto-sdk-version.yml b/.github/workflows/update-demisto-sdk-version.yml index 35c8cf27e362..996e1e61bfcb 100644 --- a/.github/workflows/update-demisto-sdk-version.yml +++ b/.github/workflows/update-demisto-sdk-version.yml @@ -48,24 +48,13 @@ jobs: git config --global user.email "bot@demisto.com" git config --global user.name "Content Bot" git checkout -b ${{ inputs.release_version }} - - - name: Update dependencies - continue-on-error: true - run: | - poetry add --group dev demisto-sdk@${{inputs.release_version}} - poetry lock --no-update - git add . - source .venv/bin/activate - demisto-sdk pre-commit --mode=ci - git add . - name: Create pull request run: | - git commit -m "poetry files" -a - git push origin ${{ inputs.release_version }} + BODY="'${{ inputs.release_changes }}'" if ${{ inputs.is_draft == true }}; then echo "creating draft release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body '${{ inputs.release_changes }}' --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "$BODY" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft else echo "creating release pull request" gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "${{ inputs.release_changes }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" From 27fff2b4245c36cc039da24688e2b2857d284650 Mon Sep 17 00:00:00 2001 From: BEAdi <72088126+BEAdi@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:49:15 +0300 Subject: [PATCH 06/12] new arg --- .github/workflows/update-demisto-sdk-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-demisto-sdk-version.yml b/.github/workflows/update-demisto-sdk-version.yml index 996e1e61bfcb..15bd9e888f6e 100644 --- a/.github/workflows/update-demisto-sdk-version.yml +++ b/.github/workflows/update-demisto-sdk-version.yml @@ -51,7 +51,7 @@ jobs: - name: Create pull request run: | - BODY="'${{ inputs.release_changes }}'" + echo "BODY='${{ inputs.release_changes }}'" >> $GITHUB_ENV if ${{ inputs.is_draft == true }}; then echo "creating draft release pull request" gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "$BODY" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft From 6521bcf40c6fe07b871595293f4fb30dd22b5db3 Mon Sep 17 00:00:00 2001 From: BEAdi <72088126+BEAdi@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:06:36 +0300 Subject: [PATCH 07/12] new arg --- .github/workflows/update-demisto-sdk-version.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-demisto-sdk-version.yml b/.github/workflows/update-demisto-sdk-version.yml index 15bd9e888f6e..614b5c6d72df 100644 --- a/.github/workflows/update-demisto-sdk-version.yml +++ b/.github/workflows/update-demisto-sdk-version.yml @@ -51,13 +51,13 @@ jobs: - name: Create pull request run: | - echo "BODY='${{ inputs.release_changes }}'" >> $GITHUB_ENV + release_changes=$(printf '%q' "${{ inputs.release_changes }}") if ${{ inputs.is_draft == true }}; then echo "creating draft release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "$BODY" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "$release_changes" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft else echo "creating release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "${{ inputs.release_changes }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "$release_changes" --reviewer ${{ inputs.reviewer }} -l "docs-approved" fi env: GH_TOKEN: ${{ secrets.CONTENTBOT_GH_ADMIN_TOKEN }} From 871a94dd704a31467a8fa75cacc1496e54d93c94 Mon Sep 17 00:00:00 2001 From: BEAdi <72088126+BEAdi@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:14:16 +0300 Subject: [PATCH 08/12] revert removal --- .github/workflows/update-demisto-sdk-version.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/update-demisto-sdk-version.yml b/.github/workflows/update-demisto-sdk-version.yml index 614b5c6d72df..eebef867c05b 100644 --- a/.github/workflows/update-demisto-sdk-version.yml +++ b/.github/workflows/update-demisto-sdk-version.yml @@ -49,8 +49,20 @@ jobs: git config --global user.name "Content Bot" git checkout -b ${{ inputs.release_version }} + - name: Update dependencies + continue-on-error: true + run: | + poetry add --group dev demisto-sdk@${{inputs.release_version}} + poetry lock --no-update + git add . + source .venv/bin/activate + demisto-sdk pre-commit --mode=ci + git add . + - name: Create pull request run: | + git commit -m "poetry files" -a + git push origin ${{ inputs.release_version }} release_changes=$(printf '%q' "${{ inputs.release_changes }}") if ${{ inputs.is_draft == true }}; then echo "creating draft release pull request" From c8e41c32b0e5936e5ea3ba47e30ae481e823cbf8 Mon Sep 17 00:00:00 2001 From: BEAdi <72088126+BEAdi@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:33:31 +0300 Subject: [PATCH 09/12] remove body --- .github/workflows/update-demisto-sdk-version.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-demisto-sdk-version.yml b/.github/workflows/update-demisto-sdk-version.yml index eebef867c05b..b717a8538d6f 100644 --- a/.github/workflows/update-demisto-sdk-version.yml +++ b/.github/workflows/update-demisto-sdk-version.yml @@ -63,13 +63,12 @@ jobs: run: | git commit -m "poetry files" -a git push origin ${{ inputs.release_version }} - release_changes=$(printf '%q' "${{ inputs.release_changes }}") if ${{ inputs.is_draft == true }}; then echo "creating draft release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "$release_changes" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft + gh pr create -B master -H ${{ inputs.release_version }} --title "TEST FIX FOR demisto-sdk-release ${{ inputs.release_version }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft else echo "creating release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "$release_changes" --reviewer ${{ inputs.reviewer }} -l "docs-approved" + gh pr create -B master -H ${{ inputs.release_version }} --title "TEST FIX FOR demisto-sdk-release ${{ inputs.release_version }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" fi env: GH_TOKEN: ${{ secrets.CONTENTBOT_GH_ADMIN_TOKEN }} From ef4d8f63227b18937a17adf7824147518fed87c6 Mon Sep 17 00:00:00 2001 From: BEAdi <72088126+BEAdi@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:39:52 +0300 Subject: [PATCH 10/12] remove release_changes --- .github/workflows/update-demisto-sdk-version.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update-demisto-sdk-version.yml b/.github/workflows/update-demisto-sdk-version.yml index b717a8538d6f..3185c61bacd5 100644 --- a/.github/workflows/update-demisto-sdk-version.yml +++ b/.github/workflows/update-demisto-sdk-version.yml @@ -10,10 +10,6 @@ on: description: The SDK release version required: true type: string - release_changes: - description: The SDK release changes - required: true - type: string is_draft: description: Is draft pull request required: false @@ -65,10 +61,10 @@ jobs: git push origin ${{ inputs.release_version }} if ${{ inputs.is_draft == true }}; then echo "creating draft release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "TEST FIX FOR demisto-sdk-release ${{ inputs.release_version }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft else echo "creating release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "TEST FIX FOR demisto-sdk-release ${{ inputs.release_version }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" fi env: GH_TOKEN: ${{ secrets.CONTENTBOT_GH_ADMIN_TOKEN }} From b86ad1208424d8846376b032cc1ddde7043a4800 Mon Sep 17 00:00:00 2001 From: BEAdi <72088126+BEAdi@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:45:50 +0300 Subject: [PATCH 11/12] add body --- .github/workflows/update-demisto-sdk-version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-demisto-sdk-version.yml b/.github/workflows/update-demisto-sdk-version.yml index 3185c61bacd5..0db6d5cdb040 100644 --- a/.github/workflows/update-demisto-sdk-version.yml +++ b/.github/workflows/update-demisto-sdk-version.yml @@ -61,10 +61,10 @@ jobs: git push origin ${{ inputs.release_version }} if ${{ inputs.is_draft == true }}; then echo "creating draft release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "initial body, will be replaced" --reviewer ${{ inputs.reviewer }} -l "docs-approved" --draft else echo "creating release pull request" - gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --reviewer ${{ inputs.reviewer }} -l "docs-approved" + gh pr create -B master -H ${{ inputs.release_version }} --title "demisto-sdk-release ${{ inputs.release_version }}" --body "initial body, will be replaced" --reviewer ${{ inputs.reviewer }} -l "docs-approved" fi env: GH_TOKEN: ${{ secrets.CONTENTBOT_GH_ADMIN_TOKEN }} From e8540c8d75a94df7c0f07b44b304fd93a53a5be8 Mon Sep 17 00:00:00 2001 From: Content Bot Date: Tue, 30 Jul 2024 11:08:38 +0000 Subject: [PATCH 12/12] poetry files --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index d5f9fac70823..a715503f70e7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -806,13 +806,13 @@ reference = "pypi-public" [[package]] name = "demisto-sdk" -version = "1.31.4" +version = "1.31.0" description = "\"A Python library for the Demisto SDK\"" optional = false python-versions = ">=3.8,<3.12" files = [ - {file = "demisto_sdk-1.31.4-py3-none-any.whl", hash = "sha256:14de23c28f21c8045bb4db1688d5bcf14db32d4c04cb3d410c9211c65857fed9"}, - {file = "demisto_sdk-1.31.4.tar.gz", hash = "sha256:6b4917afdb8663674515bb88c1d4aca3e3a4ac132a44bb3c6a8238d5df285d0b"}, + {file = "demisto_sdk-1.31.0-py3-none-any.whl", hash = "sha256:1c34a978d5279ed3079cf6cb9541bfe6fc2d23756886d4dc76b40f2a970be177"}, + {file = "demisto_sdk-1.31.0.tar.gz", hash = "sha256:e9496943e66fa59fe7c703a34d9d73933c2e37b0b095093e61438ad53c5659cd"}, ] [package.dependencies] @@ -5440,4 +5440,4 @@ reference = "pypi-public" [metadata] lock-version = "2.0" python-versions = "^3.8,<3.11" -content-hash = "8c0cf675a6cc6c49eb6c7e5efb0babbeebf7f21bb6669b7a47d2c15dfb231160" +content-hash = "6da77cd302314d3f23b8d242114a0e33fba60120abf697bfdac8a5a5fe67a58f" diff --git a/pyproject.toml b/pyproject.toml index 5e303caa6b5a..09f9a24a8663 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ python = "^3.8,<3.11" defusedxml = "^0.7.1" [tool.poetry.group.dev.dependencies] -demisto-sdk = "1.31.4" +demisto-sdk = "1.31.0" requests = "^2.22.0" pre-commit = "^3.5.0" dateparser = "^1.1.8"