Skip to content

feat: add pr-batch-report skill#92

Open
juandspy wants to merge 2 commits into
masterfrom
skill-pr-batch-report
Open

feat: add pr-batch-report skill#92
juandspy wants to merge 2 commits into
masterfrom
skill-pr-batch-report

Conversation

@juandspy
Copy link
Copy Markdown
Contributor

Description

This skill lets you quickly view in your terminal the diffs and summary of a list of PRs.

It's purely generated by Cursor.

Type of change

  • New feature (non-breaking change which adds functionality)

Testing steps

I tried it locally and this is the result:

Details

PR batch report

PR Title Description (excerpt) CI +/− / Σ Files Paths (from diff)
ccx-notification-service#1101 Remove old bots auto-merge workflow ## Summary - Removes the old bots-automerge.yml workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of perso… passing +0 / −34 (34) 1 .github/workflows/bots-automerge.yml
ccx-notification-writer#803 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −34 (34) 1 .github/workflows/bots-automerge.yml
data-pipeline#59 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −46 (46) 1 .github/workflows/bots-automerge.yml
insights-ccx-messaging#708 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −34 (34) 1 .github/workflows/bots-automerge.yaml
insights-content-template-renderer#280 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −34 (34) 1 .github/workflows/bots-automerge.yml
insights-operator-gathering-conditions-service#637 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −34 (34) 1 .github/workflows/bots-automerge.yml
insights-operator-utils#840 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −37 (37) 1 .github/workflows/dependabot-automerge.yml
insights-results-aggregator#2450 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −34 (34) 1 .github/workflows/bots-reviews.yaml
insights-results-aggregator-exporter#580 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −34 (34) 1 .github/workflows/bots-automerge.yml
insights-results-aggregator-mock#535 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −34 (34) 1 .github/workflows/bots-automerge.yml
insights-results-smart-proxy#1704 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −34 (34) 1 .github/workflows/bots-automerge.yml
obsint-mocks#201 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −32 (32) 1 .github/workflows/bots-automerge.yml
parquet-factory#57 Remove old bots auto-merge workflow ## Summary - Removes the old bots auto-merge workflow file - This workflow is superseded by the new bots-auto-merge.yaml workflow synced from processing-tools - The new workflow uses the obsint-processing GitHub app instead of personal a… passing +0 / −45 (45) 1 .github/workflows/bots-automerge.yml

CI notes

Unified diffs (gh pr diff)

https://github.com/RedHatInsights/ccx-notification-service/pull/1101 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-automerge.yml b/.github/workflows/bots-automerge.yml
deleted file mode 100644
index f7798358..00000000
--- a/.github/workflows/bots-automerge.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Set as automatically merge all the pull requests created by dependabot[bot], red-hat-konflux[bot], InsightsDroid.
-name: Bots auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check the pull request author.
-    if: |
-      github.event.pull_request.user.login == 'dependabot[bot]' ||
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]' ||
-      github.event.pull_request.user.login == 'InsightsDroid'
-    steps:
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for PR
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
https://github.com/RedHatInsights/ccx-notification-writer/pull/803 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-automerge.yml b/.github/workflows/bots-automerge.yml
deleted file mode 100644
index f7798358..00000000
--- a/.github/workflows/bots-automerge.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Set as automatically merge all the pull requests created by dependabot[bot], red-hat-konflux[bot], InsightsDroid.
-name: Bots auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check the pull request author.
-    if: |
-      github.event.pull_request.user.login == 'dependabot[bot]' ||
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]' ||
-      github.event.pull_request.user.login == 'InsightsDroid'
-    steps:
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for PR
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
https://github.com/RedHatInsights/data-pipeline/pull/59 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-automerge.yml b/.github/workflows/bots-automerge.yml
deleted file mode 100644
index 28e7f62..0000000
--- a/.github/workflows/bots-automerge.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-# Set as automatically merge all the pull requests created by bots
-name: Bots auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check if the pull request is from Konflux bot with mintmaker branch and not from a fork
-    # Only auto-merge branches matching konflux/mintmaker/main/* (aligns with branch protection rules)
-    if: |
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]' &&
-      startsWith(github.event.pull_request.head.ref, 'konflux/mintmaker/main/') &&
-      github.event.pull_request.head.repo.full_name == github.repository
-    steps:
-      - name: Validate branch name pattern
-        run: |
-          # Only allow konflux/mintmaker/main/* where * contains no slashes
-          # This prevents branches like konflux/mintmaker/main/python-deps/mydeps
-          if ! echo "$BRANCH_NAME" | grep -qE '^konflux/mintmaker/main/[a-zA-Z0-9._-]+$'; then
-            echo "Branch $BRANCH_NAME doesn't match allowed pattern konflux/mintmaker/main/* (no additional slashes allowed)."
-            exit 1
-          fi
-        env:
-          BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
-
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for PR
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
https://github.com/RedHatInsights/insights-ccx-messaging/pull/708 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-automerge.yaml b/.github/workflows/bots-automerge.yaml
deleted file mode 100644
index f7798358..00000000
--- a/.github/workflows/bots-automerge.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Set as automatically merge all the pull requests created by dependabot[bot], red-hat-konflux[bot], InsightsDroid.
-name: Bots auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check the pull request author.
-    if: |
-      github.event.pull_request.user.login == 'dependabot[bot]' ||
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]' ||
-      github.event.pull_request.user.login == 'InsightsDroid'
-    steps:
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for PR
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
https://github.com/RedHatInsights/insights-content-template-renderer/pull/280 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-automerge.yml b/.github/workflows/bots-automerge.yml
deleted file mode 100644
index f779835..0000000
--- a/.github/workflows/bots-automerge.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Set as automatically merge all the pull requests created by dependabot[bot], red-hat-konflux[bot], InsightsDroid.
-name: Bots auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check the pull request author.
-    if: |
-      github.event.pull_request.user.login == 'dependabot[bot]' ||
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]' ||
-      github.event.pull_request.user.login == 'InsightsDroid'
-    steps:
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for PR
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
https://github.com/RedHatInsights/insights-operator-gathering-conditions-service/pull/637 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-automerge.yml b/.github/workflows/bots-automerge.yml
deleted file mode 100644
index f7798358..00000000
--- a/.github/workflows/bots-automerge.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Set as automatically merge all the pull requests created by dependabot[bot], red-hat-konflux[bot], InsightsDroid.
-name: Bots auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check the pull request author.
-    if: |
-      github.event.pull_request.user.login == 'dependabot[bot]' ||
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]' ||
-      github.event.pull_request.user.login == 'InsightsDroid'
-    steps:
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for PR
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
https://github.com/RedHatInsights/insights-operator-utils/pull/840 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml
deleted file mode 100644
index 2e2b3b9..0000000
--- a/.github/workflows/dependabot-automerge.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-# Set as automatically merge all the pull requests created by dependabot[bot]
-name: Dependabot auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  dependabot:
-    runs-on: ubuntu-latest
-    if: github.actor == 'dependabot[bot]'
-    steps:
-      - name: Dependabot metadata
-        id: metadata
-        uses: dependabot/fetch-metadata@v2
-        with:
-          github-token: "${{ secrets.GITHUB_TOKEN }}"
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-            PR_URL: ${{github.event.pull_request.html_url}}
-            GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for Dependabot PRs
-        # We can filter depending on the semver major, minor, or patch updates,
-        # but let's not do it for now
-        # if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
https://github.com/RedHatInsights/insights-results-aggregator/pull/2450 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-reviews.yaml b/.github/workflows/bots-reviews.yaml
deleted file mode 100644
index 6b87e08e..00000000
--- a/.github/workflows/bots-reviews.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Set as automatically merge all the pull requests created by dependabot[bot], red-hat-konflux[bot], InsightsDroid.
-name: Auto-review version bumps
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check the pull request author.
-    if: |
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]'
-    steps:
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-
-      # - name: Enable auto-merge for PR
-      #   run: gh pr merge --auto --merge "$PR_URL"
-      #   env:
-      #     PR_URL: ${{github.event.pull_request.html_url}}
-      #     GH_TOKEN: ${{ github.token }}
https://github.com/RedHatInsights/insights-results-aggregator-exporter/pull/580 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-automerge.yml b/.github/workflows/bots-automerge.yml
deleted file mode 100644
index f779835..0000000
--- a/.github/workflows/bots-automerge.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Set as automatically merge all the pull requests created by dependabot[bot], red-hat-konflux[bot], InsightsDroid.
-name: Bots auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check the pull request author.
-    if: |
-      github.event.pull_request.user.login == 'dependabot[bot]' ||
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]' ||
-      github.event.pull_request.user.login == 'InsightsDroid'
-    steps:
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for PR
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
https://github.com/RedHatInsights/insights-results-aggregator-mock/pull/535 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-automerge.yml b/.github/workflows/bots-automerge.yml
deleted file mode 100644
index f7798358..00000000
--- a/.github/workflows/bots-automerge.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Set as automatically merge all the pull requests created by dependabot[bot], red-hat-konflux[bot], InsightsDroid.
-name: Bots auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check the pull request author.
-    if: |
-      github.event.pull_request.user.login == 'dependabot[bot]' ||
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]' ||
-      github.event.pull_request.user.login == 'InsightsDroid'
-    steps:
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for PR
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
https://github.com/RedHatInsights/insights-results-smart-proxy/pull/1704 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-automerge.yml b/.github/workflows/bots-automerge.yml
deleted file mode 100644
index f7798358..00000000
--- a/.github/workflows/bots-automerge.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Set as automatically merge all the pull requests created by dependabot[bot], red-hat-konflux[bot], InsightsDroid.
-name: Bots auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check the pull request author.
-    if: |
-      github.event.pull_request.user.login == 'dependabot[bot]' ||
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]' ||
-      github.event.pull_request.user.login == 'InsightsDroid'
-    steps:
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for PR
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
https://github.com/RedHatInsights/obsint-mocks/pull/201 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-automerge.yml b/.github/workflows/bots-automerge.yml
deleted file mode 100644
index a707652..0000000
--- a/.github/workflows/bots-automerge.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-# Set as automatically merge all the pull requests created by red-hat-konflux[bot].
-name: Bots auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check the pull request author.
-    if: |
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]'
-    steps:
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for PR
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
https://github.com/RedHatInsights/parquet-factory/pull/57 — Remove old bots auto-merge workflow
diff --git a/.github/workflows/bots-automerge.yml b/.github/workflows/bots-automerge.yml
deleted file mode 100644
index 3b8c2df..0000000
--- a/.github/workflows/bots-automerge.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-# Set as automatically merge all the pull requests created by bots
-name: Bots auto-merge
-on: pull_request
-
-# This section adds write permissions to the secrets.GITHUB_TOKEN. Default is just read
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  bot-automerge:
-    runs-on: ubuntu-latest
-    # Check if the pull request is from Konflux bot with mintmaker branch and not from a fork
-    if: |
-      github.event.pull_request.user.login == 'red-hat-konflux[bot]' &&
-      startsWith(github.event.pull_request.head.ref, 'konflux/mintmaker/main/') &&
-      github.event.pull_request.head.repo.full_name == github.repository
-    steps:
-      - name: Validate branch name pattern
-        run: |
-          # Only allow konflux/mintmaker/main/* where * contains no slashes
-          # This prevents branches like konflux/mintmaker/main/python-deps/mydeps
-          if ! echo "$BRANCH_NAME" | grep -qE '^konflux/mintmaker/main/[a-zA-Z0-9._-]+$'; then
-            echo "Branch $BRANCH_NAME doesn't match allowed pattern konflux/mintmaker/main/* (no additional slashes allowed)."
-            exit 1
-          fi
-        env:
-          BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
-
-      # NOTE: PR approval does not work on PRs from forks
-      - name: Github Actions bot approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}
-      - name: InsightsDroid approves the PR
-        run: gh pr review --approve "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{secrets.INSIGHTSDROID_TOKEN}}
-      - name: Enable auto-merge for PR
-        run: gh pr merge --auto --merge "$PR_URL"
-        env:
-          PR_URL: ${{github.event.pull_request.html_url}}
-          GH_TOKEN: ${{ github.token }}

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Summary by CodeRabbit

Release Notes

  • New Features
    • New batch PR reporting tool for aggregating multiple GitHub PR information
    • Flexible input options: command-line URLs, file-based lists, or standard input
    • Reports include PR metadata, CI status summary, and code statistics
    • Multiple output formats: Markdown (with configurable diff display) and JSON
    • Parallel processing support for faster report generation

Walkthrough

Added a new skill for batch reporting of GitHub Pull Requests. The skill consists of documentation describing functionality and a Python script that fetches PR metadata and diffs, aggregates results, and outputs formatted reports via multiple formats and input methods.

Changes

Cohort / File(s) Summary
Documentation
skills/pr-batch-report/SKILL.md
New skill definition documenting the pr-batch-report workflow, input methods (URLs, file, stdin), configuration options (format, diff modes, parallelism), and CI status classification semantics.
Implementation
skills/pr-batch-report/scripts/pr_batch_report.py
New Python script implementing concurrent PR data/diff fetching via gh CLI, per-PR aggregation, diff parsing for path extraction, and dual-format output (Markdown with configurable diff rendering, JSON).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Script as pr_batch_report.py
    participant GH as gh CLI
    participant API as GitHub API
    participant Output

    User->>Script: PR URLs (args/file/stdin)
    Script->>Script: Normalize & deduplicate URLs
    Note over Script: Parallel processing (--jobs)
    loop For each PR
        Script->>GH: gh pr view --json (URL, title, body, state, checks)
        GH->>API: Fetch PR metadata
        API-->>GH: PR data + statusCheckRollup
        GH-->>Script: JSON response
        Script->>Script: Classify CI status (pending/failing/passing)
        alt --no-diff not set
            Script->>GH: gh pr diff
            GH->>API: Fetch unified diff
            API-->>GH: Diff output
            GH-->>Script: Diff text
            Script->>Script: Parse diff headers for paths
        end
        Script->>Script: Aggregate into Row (metadata + diff + stats)
    end
    Script->>Output: Format & render (--format markdown|json)
    Output-->>User: Formatted report
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add pr-batch-report skill' clearly and concisely describes the main change: adding a new skill for batch PR reporting.
Description check ✅ Passed The description is directly related to the changeset, explaining the skill's purpose, testing results with actual output, and categorizing it as a new feature.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch skill-pr-batch-report

Comment @coderabbitai help to get the list of available commands and usage tips.

JiriPapousek
JiriPapousek previously approved these changes Apr 21, 2026
@juandspy juandspy marked this pull request as ready for review April 22, 2026 14:25
@juandspy juandspy requested a review from a team as a code owner April 22, 2026 14:25
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/pr-batch-report/scripts/pr_batch_report.py`:
- Around line 54-64: The current logic reads from stdin whenever urls is empty,
which causes stdin to be consumed even if args.file was explicitly provided;
update the flow in the block using args.file, urls, normalize_pr_url and
sys.stdin.isatty() so that stdin is only read when no --file was provided (i.e.,
args.file is falsy) and stdin is not a TTY; ensure that when args.file is set we
do not enter the stdin-reading loop even if the file produced zero URLs.
- Around line 75-97: The _gh_json and _gh_diff functions call subprocess.run
without timeouts which can hang; add a timeout argument (e.g., timeout=30) to
both subprocess.run invocations and catch subprocess.TimeoutExpired around each
call: for _gh_json return a dict like {"url": url, "error": "gh pr view timed
out"} (or include timeout seconds) and for _gh_diff return a string indicating
the diff command timed out, ensuring you keep the existing behavior for
non-timeout failures and still use r.stdout/r.stderr when available and preserve
GH_JSON_FIELDS and the function signatures.
- Around line 117-123: The StatusContext branch currently only flags "FAILURE"
and "PENDING" but ignores "ERROR" and "EXPECTED", causing them to be treated as
passing; update the conditional in the tn == "StatusContext" block (the code
that sets ctx, state and appends to failing or pending lists) so that state
values "ERROR" and "EXPECTED" are treated as non-passing (e.g., include them
with "FAILURE" in the failing.append branch) and keep "PENDING" in the
pending.append branch; adjust the checks on the state variable used in that
block (ctx, state, failing, pending) accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 71e57b04-02df-4854-b9ce-c1f3614c5cbc

📥 Commits

Reviewing files that changed from the base of the PR and between 627aeb9 and fc4dece.

📒 Files selected for processing (2)
  • skills/pr-batch-report/SKILL.md
  • skills/pr-batch-report/scripts/pr_batch_report.py

Comment on lines +54 to +64
if args.file:
with open(args.file, encoding="utf-8") as f:
for line in f:
n = normalize_pr_url(line)
if n:
urls.append(n)
if not urls and not sys.stdin.isatty():
for line in sys.stdin:
n = normalize_pr_url(line)
if n:
urls.append(n)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Honor --file precedence before falling back to stdin.

Line 60 still reads stdin whenever the accumulated list is empty, even if --file was explicitly supplied. An empty or comment-only file will therefore silently consume piped input and report on the wrong PR set.

Suggested fix
-    if not urls and not sys.stdin.isatty():
+    if not urls and not args.file and not sys.stdin.isatty():
         for line in sys.stdin:
             n = normalize_pr_url(line)
             if n:
                 urls.append(n)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/pr-batch-report/scripts/pr_batch_report.py` around lines 54 - 64, The
current logic reads from stdin whenever urls is empty, which causes stdin to be
consumed even if args.file was explicitly provided; update the flow in the block
using args.file, urls, normalize_pr_url and sys.stdin.isatty() so that stdin is
only read when no --file was provided (i.e., args.file is falsy) and stdin is
not a TTY; ensure that when args.file is set we do not enter the stdin-reading
loop even if the file produced zero URLs.

Comment on lines +75 to +97
def _gh_json(url: str) -> dict[str, Any]:
r = subprocess.run(
["gh", "pr", "view", url, "--json", GH_JSON_FIELDS],
capture_output=True,
text=True,
check=False,
)
if r.returncode != 0:
err = (r.stderr or r.stdout or "").strip()
return {"url": url, "error": err or f"gh exit {r.returncode}"}
return json.loads(r.stdout)


def _gh_diff(url: str) -> str:
r = subprocess.run(
["gh", "pr", "diff", url],
capture_output=True,
text=True,
check=False,
)
if r.returncode != 0:
return f"(gh pr diff failed: {(r.stderr or '').strip()})"
return r.stdout
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add timeouts around the gh subprocesses.

Both gh pr view and gh pr diff can hang on network stalls or auth/environment issues. In that case the worker future never completes and the whole batch report blocks instead of returning a per-PR error.

Suggested fix
 def _gh_json(url: str) -> dict[str, Any]:
-    r = subprocess.run(
-        ["gh", "pr", "view", url, "--json", GH_JSON_FIELDS],
-        capture_output=True,
-        text=True,
-        check=False,
-    )
+    try:
+        r = subprocess.run(
+            ["gh", "pr", "view", url, "--json", GH_JSON_FIELDS],
+            capture_output=True,
+            text=True,
+            check=False,
+            timeout=60,
+        )
+    except subprocess.TimeoutExpired:
+        return {"url": url, "error": "gh pr view timed out"}
     if r.returncode != 0:
         err = (r.stderr or r.stdout or "").strip()
         return {"url": url, "error": err or f"gh exit {r.returncode}"}
     return json.loads(r.stdout)
 
 
 def _gh_diff(url: str) -> str:
-    r = subprocess.run(
-        ["gh", "pr", "diff", url],
-        capture_output=True,
-        text=True,
-        check=False,
-    )
+    try:
+        r = subprocess.run(
+            ["gh", "pr", "diff", url],
+            capture_output=True,
+            text=True,
+            check=False,
+            timeout=60,
+        )
+    except subprocess.TimeoutExpired:
+        return "(gh pr diff timed out)"
     if r.returncode != 0:
         return f"(gh pr diff failed: {(r.stderr or '').strip()})"
     return r.stdout
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
def _gh_json(url: str) -> dict[str, Any]:
r = subprocess.run(
["gh", "pr", "view", url, "--json", GH_JSON_FIELDS],
capture_output=True,
text=True,
check=False,
)
if r.returncode != 0:
err = (r.stderr or r.stdout or "").strip()
return {"url": url, "error": err or f"gh exit {r.returncode}"}
return json.loads(r.stdout)
def _gh_diff(url: str) -> str:
r = subprocess.run(
["gh", "pr", "diff", url],
capture_output=True,
text=True,
check=False,
)
if r.returncode != 0:
return f"(gh pr diff failed: {(r.stderr or '').strip()})"
return r.stdout
def _gh_json(url: str) -> dict[str, Any]:
try:
r = subprocess.run(
["gh", "pr", "view", url, "--json", GH_JSON_FIELDS],
capture_output=True,
text=True,
check=False,
timeout=60,
)
except subprocess.TimeoutExpired:
return {"url": url, "error": "gh pr view timed out"}
if r.returncode != 0:
err = (r.stderr or r.stdout or "").strip()
return {"url": url, "error": err or f"gh exit {r.returncode}"}
return json.loads(r.stdout)
def _gh_diff(url: str) -> str:
try:
r = subprocess.run(
["gh", "pr", "diff", url],
capture_output=True,
text=True,
check=False,
timeout=60,
)
except subprocess.TimeoutExpired:
return "(gh pr diff timed out)"
if r.returncode != 0:
return f"(gh pr diff failed: {(r.stderr or '').strip()})"
return r.stdout
🧰 Tools
🪛 Ruff (0.15.10)

[error] 76-76: subprocess call: check for execution of untrusted input

(S603)


[error] 77-77: Starting a process with a partial executable path

(S607)


[error] 89-89: subprocess call: check for execution of untrusted input

(S603)


[error] 90-90: Starting a process with a partial executable path

(S607)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/pr-batch-report/scripts/pr_batch_report.py` around lines 75 - 97, The
_gh_json and _gh_diff functions call subprocess.run without timeouts which can
hang; add a timeout argument (e.g., timeout=30) to both subprocess.run
invocations and catch subprocess.TimeoutExpired around each call: for _gh_json
return a dict like {"url": url, "error": "gh pr view timed out"} (or include
timeout seconds) and for _gh_diff return a string indicating the diff command
timed out, ensuring you keep the existing behavior for non-timeout failures and
still use r.stdout/r.stderr when available and preserve GH_JSON_FIELDS and the
function signatures.

Comment on lines +117 to +123
elif tn == "StatusContext":
ctx = c.get("context") or "status"
state = (c.get("state") or "").upper()
if state == "FAILURE":
failing.append(f"{ctx} ({state})")
elif state == "PENDING":
pending.append(f"{ctx} ({state})")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

What are the possible values of GitHub GraphQL StatusState/StatusContext.stateinstatusCheckRollup, and what do ERRORandEXPECTED mean for PR check status?

💡 Result:

The possible values of GitHub GraphQL StatusState (used for StatusContext.state in statusCheckRollup) are ERROR, EXPECTED, FAILURE, PENDING, and SUCCESS. ERROR means "Status is errored." EXPECTED means "Status is expected." These states apply to legacy commit statuses (StatusContext objects) aggregated in statusCheckRollup for PRs. statusCheckRollup.contexts can be StatusContext or CheckRun; StatusContext.state uses StatusState, while CheckRun uses CheckState (e.g., FAILURE, NEUTRAL, PENDING, SUCCESS).

Citations:


StatusContext states ERROR and EXPECTED are currently misreported as passing.

GitHub's StatusState enum includes ERROR and EXPECTED values, but the current code only checks for FAILURE (line 120) and PENDING (line 122). When a status context has state ERROR or EXPECTED, it falls through to the passing category, under-reporting broken or incomplete checks.

Suggested fix
         elif tn == "StatusContext":
             ctx = c.get("context") or "status"
             state = (c.get("state") or "").upper()
-            if state == "FAILURE":
+            if state in {"FAILURE", "ERROR"}:
                 failing.append(f"{ctx} ({state})")
-            elif state == "PENDING":
+            elif state in {"PENDING", "EXPECTED"}:
                 pending.append(f"{ctx} ({state})")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
elif tn == "StatusContext":
ctx = c.get("context") or "status"
state = (c.get("state") or "").upper()
if state == "FAILURE":
failing.append(f"{ctx} ({state})")
elif state == "PENDING":
pending.append(f"{ctx} ({state})")
elif tn == "StatusContext":
ctx = c.get("context") or "status"
state = (c.get("state") or "").upper()
if state in {"FAILURE", "ERROR"}:
failing.append(f"{ctx} ({state})")
elif state in {"PENDING", "EXPECTED"}:
pending.append(f"{ctx} ({state})")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/pr-batch-report/scripts/pr_batch_report.py` around lines 117 - 123,
The StatusContext branch currently only flags "FAILURE" and "PENDING" but
ignores "ERROR" and "EXPECTED", causing them to be treated as passing; update
the conditional in the tn == "StatusContext" block (the code that sets ctx,
state and appends to failing or pending lists) so that state values "ERROR" and
"EXPECTED" are treated as non-passing (e.g., include them with "FAILURE" in the
failing.append branch) and keep "PENDING" in the pending.append branch; adjust
the checks on the state variable used in that block (ctx, state, failing,
pending) accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants