From fa0549cf934931dc416ff0b4f7c7e079a574f88b Mon Sep 17 00:00:00 2001 From: Philip Ellis Date: Fri, 2 Feb 2024 12:31:25 -0600 Subject: [PATCH] removed conditional run in action --- .github/workflows/build-dereferenced-spec.yml | 11 -------- postman-script/updateByFolder/index.js | 25 +++++++++++-------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-dereferenced-spec.yml b/.github/workflows/build-dereferenced-spec.yml index 7e6033a..5ec2e9a 100644 --- a/.github/workflows/build-dereferenced-spec.yml +++ b/.github/workflows/build-dereferenced-spec.yml @@ -42,10 +42,6 @@ jobs: push_v3_specs_to_postman: runs-on: ubuntu-latest - if: | - github.event.head_commit.modified.* == 'idn/sailpoint-api.v3.yaml' || - github.event.head_commit.modified.* == 'idn/v3/**' || - github.event.head_commit.added.* == 'idn/v3/**' needs: [dereference_spec] steps: - name: Checkout PR branch @@ -64,10 +60,6 @@ jobs: push_beta_specs_to_postman: runs-on: ubuntu-latest - if: | - github.event.head_commit.modified.* == 'idn/sailpoint-api.beta.yaml' || - github.event.head_commit.modified.* == 'idn/beta/**' || - github.event.head_commit.added.* == 'idn/beta/**' needs: [dereference_spec] steps: - name: Checkout PR branch @@ -87,9 +79,6 @@ jobs: push_nerm_specs_to_postman: runs-on: ubuntu-latest - if: | - github.event.head_commit.modified.* == 'nerm/**' || - github.event.head_commit.added.* == 'nerm/**' needs: [dereference_spec] steps: - name: Checkout PR branch diff --git a/postman-script/updateByFolder/index.js b/postman-script/updateByFolder/index.js index 373b4fb..9d9d9b4 100644 --- a/postman-script/updateByFolder/index.js +++ b/postman-script/updateByFolder/index.js @@ -119,16 +119,21 @@ const release = async () => { } // push changes to the forked collections - const msg = 'Merging to public collection' - console.log('\n' + msg + '...') - await new pmAPI.Collection(privateRemoteCollectionIdUid).merge(mainPublicCollectionId) - .then(() => { - console.log(msg, '-> OK\n') } - ) - .catch((error) => { - console.log(msg, '-> FAIL') - throw error("Failed to merge to public collection") - }) + if (changesMade) { + const msg = 'Merging to public collection' + console.log('\n' + msg + '...') + await new pmAPI.Collection(privateRemoteCollectionIdUid).merge(mainPublicCollectionId) + .then(() => { + console.log(msg, '-> OK\n') } + ) + .catch((error) => { + console.log(msg, '-> FAIL') + throw error("Failed to merge to public collection") + }) + } else { + console.log('No changes made') + } + }