Skip to content

Generate repository metrics snapshot during website release #1146

Done

Description

@hemarina

Problem

The weekly repository-metrics snapshot workflow writes a generated JSON file to a branch and opens a pull request. Azure organization policy prevents GITHUB_TOKEN from creating pull requests, so the workflow cannot complete without a separate PAT or GitHub App.

The site already treats the public, sanitized repository-metrics JSON as the live source and uses the bundled snapshot only for initial rendering and as a fallback.

Proposed change

  • Generate the validated bundled snapshot inside the release runner before the production build.
  • Include the generated snapshot only in the GitHub Pages artifact; do not commit or push it.
  • Continue deploying with the existing bundled snapshot when the live JSON is unavailable or invalid.
  • Remove the weekly source-writing pull request workflow and its contents: write / pull-requests: write requirement.

Acceptance criteria

  • The release workflow needs only repository read and existing Pages deployment permissions.
  • A successful live metrics fetch controls the release-time star values and initial "Most popular" ordering.
  • Runtime loading can still refresh stars after deployment.
  • If runtime loading fails, the release-time bundled values remain available.
  • No PAT, GitHub App token, generated branch, or automated pull request is required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions