diff --git a/.github/workflows/auto_cherry_pick.yml b/.github/workflows/auto_cherry_pick.yml index 953d403df87..301d9181b9d 100644 --- a/.github/workflows/auto_cherry_pick.yml +++ b/.github/workflows/auto_cherry_pick.yml @@ -76,7 +76,7 @@ jobs: - name: Add Parent PR's PRT comment to Auto_Cherry_Picked PR's id: add-parent-prt-comment - if: ${{ always() && steps.cherrypick.outcome == 'success' }} + if: ${{ always() && needs.find-the-parent-prt-comment.outputs.prt_comment != '' && steps.cherrypick.outcome == 'success' }} uses: thollander/actions-comment-pull-request@v2 with: message: | @@ -98,17 +98,24 @@ jobs: }) - name: Check if cherrypick pr is created - uses: juliangruber/find-pull-request-action@v1 - id: fpr + id: search_pr if: always() - with: - branch: "cherry-pick-${{ matrix.label }}-${{ github.sha }}" - base: ${{ matrix.label }} + run: | + PR_TITLE="[${{ matrix.label }}] ${{ env.title }}" + API_URL="https://api.github.com/repos/${{ github.repository }}/pulls?state=open" + PR_SEARCH_RESULT=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$API_URL" | jq --arg title "$PR_TITLE" '.[] | select(.title == $title)') + if [ -n "$PR_SEARCH_RESULT" ]; then + echo "pr_found=true" >> $GITHUB_OUTPUT + echo "PR is Found with title $PR_TITLE" + else + echo "pr_found=false" >> $GITHUB_OUTPUT + echo "PR is not Found with title $PR_TITLE" + fi - ## Failure Logging to issues and GChat Group + ## Failure Logging to issues - name: Create Github issue on cherrypick failure id: create-issue - if: ${{ always() && steps.fpr.outputs.number != '' && steps.cherrypick.outcome != 'success' && startsWith(matrix.label, '6.') && matrix.label != github.base_ref }} + if: ${{ always() && steps.search_pr.outputs.pr_found == 'false' && steps.cherrypick.outcome != 'success' && startsWith(matrix.label, '6.') && matrix.label != github.base_ref }} uses: dacbd/create-issue-action@main with: token: ${{ secrets.CHERRYPICK_PAT }} diff --git a/README.rst b/README.rst index c3b7a27d403..9e3190004d0 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,11 @@ +========= Robottelo ========= + + + + .. image:: https://codecov.io/gh/SatelliteQE/robottelo/branch/master/graph/badge.svg :target: https://codecov.io/gh/SatelliteQE/robottelo diff --git a/requirements-optional.txt b/requirements-optional.txt index 1dcaeaa560f..16079401797 100644 --- a/requirements-optional.txt +++ b/requirements-optional.txt @@ -2,7 +2,7 @@ flake8==7.0.0 pytest-cov==4.1.0 redis==5.0.1 -pre-commit==3.6.0 +pre-commit==3.6.1 # For generating documentation. sphinx==7.2.6