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
8 changes: 7 additions & 1 deletion .github/scripts/pull-request-dashboard/test_rollout.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ def test_repo_workflow_loads_code_from_its_own_commit(self) -> None:
self.assertIn("code_ref:", body)
self.assertEqual(body.count("inputs.code_ref"), 0)
self.assertEqual(body.count("actions/checkout@"), 2)
self.assertEqual(body.count("path: live-config"), 2)
self.assertEqual(body.count("ref: ${{ github.sha }}"), 2)
self.assertNotIn("path: live-config", body)
self.assertNotIn("sparse-checkout:", body)
self.assertIn(
"DASHBOARD_CONFIG: .github/scripts/pull-request-dashboard/repositories.json",
body,
)
self.assertEqual(body.count("uses: $/.github/scripts/pull-request-dashboard"), 2)
self.assertEqual(
body.count("${{ steps.dashboard-code.outputs.path }}/.cache/classifications"),
Expand Down
20 changes: 7 additions & 13 deletions .github/workflows/pull-request-dashboard-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ permissions:
contents: read

env:
DASHBOARD_CONFIG: live-config/.github/scripts/pull-request-dashboard/repositories.json
DASHBOARD_CONFIG: .github/scripts/pull-request-dashboard/repositories.json
DASHBOARD_STATE_BRANCH_PREFIX: otelbot/pull-request-dashboard-state

jobs:
Expand All @@ -45,19 +45,16 @@ jobs:
outputs:
initial_backfill_complete: ${{ steps.dashboard-update.outputs.initial_backfill_complete }}
steps:
# `$` resolves this same-repository action from the reusable workflow's exact commit.
- name: Load dashboard code
id: dashboard-code
uses: $/.github/scripts/pull-request-dashboard

# Repository configuration is deliberately read from the triggering
# commit: opting a repository in, or changing its settings, takes effect
# immediately on every rollout ref.
# The checkout supplies current repository configuration and the Git
# context used to manage dashboard state worktrees.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.sha }}
path: live-config
sparse-checkout: .github/scripts/pull-request-dashboard/repositories.json
sparse-checkout-cone-mode: false
persist-credentials: false

- name: Load repository configuration
Expand Down Expand Up @@ -234,19 +231,16 @@ jobs:
env:
PUBLISHER_LOCK_OWNER: ${{ github.run_id }}-${{ github.run_attempt }}-publish
steps:
# `$` resolves this same-repository action from the reusable workflow's exact commit.
- name: Load dashboard code
id: dashboard-code
uses: $/.github/scripts/pull-request-dashboard

# Repository configuration is deliberately read from the triggering
# commit: opting a repository in, or changing its settings, takes effect
# immediately on every rollout ref.
# The checkout supplies current repository configuration and the Git
# context used to manage dashboard state worktrees.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.sha }}
path: live-config
sparse-checkout: .github/scripts/pull-request-dashboard/repositories.json
sparse-checkout-cone-mode: false
persist-credentials: false

- name: Load repository configuration
Expand Down