From a04025c1148c7fd00401b3d33cb2d11877b64ad1 Mon Sep 17 00:00:00 2001 From: Rob Winch <362503+rwinch@users.noreply.github.com> Date: Fri, 2 May 2025 11:26:41 -0500 Subject: [PATCH] rm mark-duplicate-dependabot-prs.yml --- .../mark-duplicate-dependabot-prs.yml | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 .github/workflows/mark-duplicate-dependabot-prs.yml diff --git a/.github/workflows/mark-duplicate-dependabot-prs.yml b/.github/workflows/mark-duplicate-dependabot-prs.yml deleted file mode 100644 index 478e2ad814..0000000000 --- a/.github/workflows/mark-duplicate-dependabot-prs.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Mark Duplicate Dependabot PRs - -on: - pull_request: - types: [closed] - -jobs: - check_duplicate_prs: - runs-on: ubuntu-latest - if: github.event.pull_request.merged == true && github.event.pull_request.user.login == 'dependabot[bot]' - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Extract Dependency Name from PR Title - id: extract - run: | - PR_TITLE="${{ github.event.pull_request.title }}" - DEPENDENCY_NAME=$(echo "$PR_TITLE" | awk -F ' from ' '{print $1}') - echo "dependency_name=$DEPENDENCY_NAME" >> $GITHUB_OUTPUT - - - name: Find PRs - id: find_duplicates - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - PRS=$(gh pr list --search 'milestone:${{ github.event.pull_request.milestone.title }} is:merged in:title "${{ steps.extract.outputs.dependency_name }}"' --json number --jq 'map(.number) | join(",")') - echo "prs=$PRS" >> $GITHUB_OUTPUT - - - name: Label Duplicate PRs - if: steps.find_duplicates.outputs.prs != '' - env: - PRS: ${{ steps.find_duplicates.outputs.prs }} - CURRENT_PR_NUMBER: ${{ github.event.pull_request.number }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - for i in ${PRS//,/ } - do - if [ ! $i -eq "$CURRENT_PR_NUMBER" ]; then - echo "Marking PR $i as duplicate" - gh pr edit "$i" --add-label "status: duplicate" - gh pr comment "$i" --body "Duplicate of #$CURRENT_PR_NUMBER" - fi - done