diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index ffabd5a..1fa6c19 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -2,24 +2,42 @@ name: Upload Python Package -#on: -# push: -# branches: [ main ] -# tags: -# - '*' - on: release: types: [published] + pull_request: + types: + - closed jobs: + create-github-release: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + permissions: write-all + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Extract version from prismacloud/cli/version.py + run: | + version=$(grep 'version = ' prismacloud/api/version.py | sed -E "s/version = \"([^\"]+)\"/\1/") + echo "PRISMA_CLOUD_API_VERSION=$version" >> $GITHUB_ENV + + - name: Create GitHub Release + run: | + gh release create ${{ env.PRISMA_CLOUD_API_VERSION }} --generate-notes --latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + deploy: runs-on: ubuntu-latest + needs: + - create-github-release steps: - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: '3.9' - name: Install Dependencies diff --git a/prismacloud/api/cspm/_endpoints.py b/prismacloud/api/cspm/_endpoints.py index e54789e..3d82725 100644 --- a/prismacloud/api/cspm/_endpoints.py +++ b/prismacloud/api/cspm/_endpoints.py @@ -538,6 +538,14 @@ def search_iam_read(self, search_params): next_page_token = api_response.pop('nextPageToken', None) return result + def search_iam_source_to_granter(self, search_params): + search_url = 'api/v1/permission/graph/source_to_granter' + return self.execute('POST', search_url, body_params=search_params) + + def search_iam_granter_to_dest(self, search_params): + search_url = 'api/v1/permission/graph/granter_to_dest' + return self.execute('POST', search_url, body_params=search_params) + def search_suggest_list_read(self, query_to_suggest): return self.execute('POST', 'search/suggest', body_params=query_to_suggest) diff --git a/prismacloud/api/version.py b/prismacloud/api/version.py index 2b3b745..a662198 100644 --- a/prismacloud/api/version.py +++ b/prismacloud/api/version.py @@ -1,3 +1 @@ -""" version file """ - -version = '5.2.8' +version = "5.2.9"