Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/pull-request-dashboard/RATIONALE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ the implementation understandable and operationally cheap.
- Non-PR dashboard runs are backfills, not repository-wide refreshes. They are
capped so one run cannot exhaust the dashboard GitHub App's hourly API quota.
- Each backfill lists open PRs, prunes cached PRs that are no longer open
non-draft, then refreshes at most 100 open non-draft PRs.
non-draft, then refreshes at most 50 open non-draft PRs.
- Selected PRs are processed one at a time through the same single-PR merge path
as targeted refreshes. Each accepted PR update pushes structured state before
the next selected PR is processed.
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/pull-request-dashboard/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
# --- CLI defaults ----------------------------------------------------------
DEFAULT_MODEL = "gpt-5.4-mini"
POSITIVE_ACK_REACTIONS = {"THUMBS_UP", "HOORAY", "HEART", "ROCKET"}
DEFAULT_BACKFILL_MAX_PRS = 100
DEFAULT_BACKFILL_MAX_PRS = 50

# ---------------------------------------------------------------- model helpers

Expand Down
30 changes: 1 addition & 29 deletions .github/workflows/pull-request-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,31 +121,8 @@ jobs:
echo "repository=$(jq -r '.[0].name' <<< "$matrix")" >> "$GITHUB_OUTPUT"
echo "$matrix" | jq .

# Webhook-driven runs (trigger_event is a real GitHub event like
# pull_request_review_comment, not schedule/workflow_dispatch) skip
# large_repo targets. Webhook volume on large repos exhausts the App's
# hourly API quota; scheduled backfills and manual dispatches still
# process them.
- name: Check webhook large-repo skip
id: webhook-large-repo-skip
if: steps.trigger.outputs.event != 'schedule' && steps.trigger.outputs.event != 'workflow_dispatch'
env:
TARGET_REPOSITORY: ${{ steps.targets.outputs.repository }}
TRIGGER_EVENT: ${{ steps.trigger.outputs.event }}
run: |
set -euo pipefail
is_large=$(jq -r --arg repo "$TARGET_REPOSITORY" '
[ .[] | select(.name == $repo) | .large_repo // false ][0] // false
' "$DASHBOARD_CONFIG")
if [[ "$is_large" == "true" ]]; then
echo "Skipping webhook-driven run for large_repo target ($TARGET_REPOSITORY, event=$TRIGGER_EVENT)."
echo "skip=true" >> "$GITHUB_OUTPUT"
fi

- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
if: >-
steps.trigger.outputs.pr_number != '' &&
steps.webhook-large-repo-skip.outputs.skip != 'true'
if: steps.trigger.outputs.pr_number != ''
id: dashboard-token
with:
client-id: ${{ vars.PR_DASHBOARD_CLIENT_ID }}
Expand All @@ -159,14 +136,9 @@ jobs:
env:
GH_TOKEN: ${{ steps.dashboard-token.outputs.token }}
TRIGGER_PR_NUMBER: ${{ steps.trigger.outputs.pr_number }}
WEBHOOK_LARGE_REPO_SKIP: ${{ steps.webhook-large-repo-skip.outputs.skip }}
REPO: open-telemetry/${{ steps.targets.outputs.repository }}
run: |
set -euo pipefail
if [[ "${WEBHOOK_LARGE_REPO_SKIP:-}" == "true" ]]; then
echo "met=false" >> "$GITHUB_OUTPUT"
exit 0
fi
if [[ -z "$TRIGGER_PR_NUMBER" ]]; then
echo "met=true" >> "$GITHUB_OUTPUT"
exit 0
Expand Down
2 changes: 1 addition & 1 deletion pull-request-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Fields:
| `required_approvals` | yes | Number of approvals required for an open PR to be marked ready to merge. |
| `slack_channel` | no | Slack channel for notifications. Omit to skip Slack processing for this repository. |
| `slack_user_mapping` | no | Map of GitHub login to Slack user ID for at-mentions. |
| `large_repo` | no | If `true`, apply rendering presets that keep the dashboard body under GitHub's 65,536-character issue-body limit: cap each section (each *Waiting on …* table, the *Draft pull requests* table, and the *Diagnostics* block) at 50 rows, and omit the *Draft pull requests* section entirely. Truncated sections get a `_More X PRs not shown_` footer. Defaults to `false` (no cap, drafts shown). Enable this for very large repos with hundreds of PRs. **Also affects triggering**: webhook-driven runs are skipped for `large_repo` targets to avoid exhausting the App's hourly API quota. Hourly scheduled runs and manual `Run workflow` clicks still process them. |
| `large_repo` | no | If `true`, apply rendering presets that keep the dashboard body under GitHub's 65,536-character issue-body limit: cap each section (each *Waiting on …* table, the *Draft pull requests* table, and the *Diagnostics* block) at 50 rows, and omit the *Draft pull requests* section entirely. Truncated sections get a `_More X PRs not shown_` footer. Defaults to `false` (no cap, drafts shown). Enable this for very large repos with hundreds of PRs. |

Ask a maintainer or admin to add the repository under [Repository access](https://github.com/organizations/open-telemetry/settings/installations/133550497).

Expand Down