forked from opensearch-project/opensearch-py
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sai Medhini Reddy Maryada <[email protected]>
- Loading branch information
Sai Medhini Reddy Maryada
authored and
Sai Medhini Reddy Maryada
committed
Jan 31, 2024
1 parent
7447a4c
commit c604e14
Showing
1 changed file
with
7 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,14 +47,11 @@ jobs: | |
base: main | ||
committer: opensearchpy-api-update-bot <[email protected]> | ||
author: opensearchpy-api-update-bot <[email protected]> | ||
- name: printed | ||
- name: Check out update branch | ||
if: ${{ steps.cpr.outputs.pull-request-number != '' }} | ||
run: | | ||
echo "Checking find pattern in CHANGELOG.md..." | ||
grep -n "Your contribution here." CHANGELOG.md || echo "Pattern not found." | ||
- name: Checkout PR | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh pr checkout ${{ steps.cpr.outputs.pull-request-number }} | ||
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 != '' }} | ||
|
@@ -65,22 +62,16 @@ jobs: | |
include: "**CHANGELOG.md" | ||
- name: Commit and Push | ||
if: ${{ steps.cpr.outputs.pull-request-number != '' }} | ||
env: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --local user.name 'opensearchpy-api-update-bot' | ||
git config --local user.email '[email protected]' | ||
git config --local --unset-all http.https://github.com/.extraheader || true | ||
AUTH=$(echo -n "x-access-token:${{ steps.github_app_token.outputs.token || secrets.GITHUB_TOKEN }}" | base64) | ||
echo "::add-mask::${AUTH}" | ||
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ${AUTH}" | ||
add_output=$(git add CHANGELOG.md) | ||
commit_output=$(git commit --amend --no-edit) | ||
cat CHANGELOG.md | ||
PUSH_OUTPUT=$(gh pr merge ${{ steps.cpr.outputs.pull-request-number }} --squash --merge --auto) | ||
echo "Git Add Output: $add_output" | ||
echo "Git Commit Output: $commit_output" | ||
echo "PUSHED_OUTPUT: $PUSH_OUTPUT" | ||
git add CHANGELOG.md | ||
git commit --amend --no-edit | ||
git push origin automated-api-update -f | ||
- name: List modified files for automated-api-update branch | ||
run: | | ||
branch_commit=$(git rev-parse automated-api-update) | ||
|