From fdd79a3e20ef92df6af8fd36caa75ba6cf5ca8d0 Mon Sep 17 00:00:00 2001 From: Chethan Date: Fri, 17 Nov 2023 17:28:15 +0530 Subject: [PATCH] second commit --- .github/workflows/hotfix.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/hotfix.yml b/.github/workflows/hotfix.yml index 88405dd..df6b749 100644 --- a/.github/workflows/hotfix.yml +++ b/.github/workflows/hotfix.yml @@ -15,21 +15,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get hotfix pull request body shell: bash - run: | - echo '${{ github.event.pull_request.body }}' > hotfix_pr_body.txt + env: + PR_BODY: ${{ github.event.pull_request.body }} + run: echo $PR_BODY > hotfix_pr_body.txt - name: Get a list of all original PR numbers shell: bash run: | - # Extract a list of lines with the format 'juspay/hyperswitch-cloud/pull/1200' or '#1200' using 'sed'. + # Extract a list of lines with the format 'juspay/hyperswitch/pull/1200' or '#1200' using 'sed'. # If empty, then error out and exit. - # else, use 'grep' to extract out 'juspay/hyperswitch-cloud/pull/1200' or '#1200' patterns from each line. - # Use 'sed' to remove the part of the matched strings that precedes the last "/" character (in cases like, juspay/hyperswitch-cloud/pull/1200 - 1200) + # else, use 'grep' to extract out 'juspay/hyperswitch/pull/1200' or '#1200' patterns from each line. + # Use 'sed' to remove the part of the matched strings that precedes the last "/" character (in cases like, juspay/hyperswitch/pull/1200 - 1200) # and sed again to remove any "#" characters from the extracted numeric part (in cases like #1200 - 1200), ultimately getting PR/issue number. # Finally, remove (if any) duplicates from the list @@ -58,7 +59,7 @@ jobs: PR_STATES=() for pr_number in ${PR_NUMBERS}; do - is_pull_request="$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" "/repos/juspay/hyperswitch-cloud/issues/${pr_number}" | jq '.pull_request')" + is_pull_request="abc" if [[ "$is_pull_request" == null ]]; then continue @@ -132,7 +133,7 @@ jobs: done if [[ $original_pr_points_to_main -eq 0 ]]; then - echo "::error::None of the Original PR's baseRef is 'main'" + echo "::error::None of the Original PR's baseRef is 'master'" fi