From 53637ef7e805cfea9b7c26f6b44bcafdee3f8d75 Mon Sep 17 00:00:00 2001 From: saimedhi Date: Thu, 1 Feb 2024 19:00:46 -0800 Subject: [PATCH] Added an automated api update bot for opensearch-py Signed-off-by: saimedhi --- .github/workflows/update_api.yml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/update_api.yml b/.github/workflows/update_api.yml index 5e2a6810..34f99a07 100644 --- a/.github/workflows/update_api.yml +++ b/.github/workflows/update_api.yml @@ -26,6 +26,13 @@ jobs: python3.7 -m pip install nox - name: Generate API run: nox -s generate + - name: Update CHANGELOG + uses: jacobtomlinson/gha-find-replace@v3 + if: ${{ steps.cpr.outputs.pull-request-number != '' }} + with: + find: "- Your contribution here." + replace: "- Updated opensearch-py to reflect the latest OpenSearch API spec.\n- Your contribution here." + include: "**CHANGELOG.md" - name: Get current date id: date run: echo "::set-output name=date::$(date +'%Y-%m-%d')" @@ -50,22 +57,4 @@ jobs: base: main signoff: true labels: | - autocut - - name: Check out update branch - if: ${{ steps.cpr.outputs.pull-request-number != '' }} - run: | - git fetch origin automated-api-update - git checkout automated-api-update - - name: Update CHANGELOG - uses: jacobtomlinson/gha-find-replace@v3 - if: ${{ steps.cpr.outputs.pull-request-number != '' }} - with: - find: "- Your contribution here." - replace: "- Updated opensearch-py to reflect the latest OpenSearch API spec ([#${{steps.cpr.outputs.pull-request-number}}](https://github.com/opensearch-project/opensearch-py/pull/${{steps.cpr.outputs.pull-request-number}}))\n- Your contribution here." - include: "**CHANGELOG.md" - - name: Commit and Push - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: "Update changelog" - branch: automated-api-update - commit_options: '--signoff' \ No newline at end of file + autocut \ No newline at end of file