diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 40f9901..1767b09 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -16,8 +16,14 @@ jobs: - 18 - 20 runs-on: ubuntu-latest + if: github.repository == 'opensearch-project/automation-app' steps: - uses: actions/checkout@v4 + if: github.event_name == 'push' + - uses: actions/checkout@v4 + if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Set up node-${{ matrix.node-version }} uses: actions/setup-node@v4 with: @@ -35,6 +41,7 @@ jobs: - name: Run junit run: npm run junit - name: Upload results to Codecov + if: ${{ !cancelled() }} uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/package-lock.json b/package-lock.json index 7fbb43d..ac6eab1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "opensearch-automation-app", - "version": "0.1.14", + "version": "0.1.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "opensearch-automation-app", - "version": "0.1.14", + "version": "0.1.15", "dependencies": { "@aws-sdk/client-cloudwatch": "^3.664.0", "@aws-sdk/client-opensearch": "^3.658.1", diff --git a/package.json b/package.json index 7d4060f..d822f68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opensearch-automation-app", - "version": "0.1.14", + "version": "0.1.15", "description": "An Automation App that handles all your GitHub Repository Activities", "author": "Peter Zhu", "homepage": "https://github.com/opensearch-project/automation-app", @@ -68,4 +68,4 @@ "engines": { "node": ">= 18" } -} \ No newline at end of file +} diff --git a/src/utility/opensearch/opensearch-client.ts b/src/utility/opensearch/opensearch-client.ts index d7a1fd6..d2c2dfe 100644 --- a/src/utility/opensearch/opensearch-client.ts +++ b/src/utility/opensearch/opensearch-client.ts @@ -40,12 +40,11 @@ export class OpensearchClient { const client = new OpenSearchClient({ ...AwsSigv4Signer({ region: this._region, - getCredentials: () => - Promise.resolve({ - accessKeyId: credentials.AccessKeyId!, - secretAccessKey: credentials.SecretAccessKey!, - sessionToken: credentials.SessionToken!, - }), + getCredentials: () => Promise.resolve({ + accessKeyId: credentials.AccessKeyId!, + secretAccessKey: credentials.SecretAccessKey!, + sessionToken: credentials.SessionToken!, + }), }), node: this._openSearchUrl, });