Skip to content

UW-Madison-DSI/.github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.github

This is the organization profile repository for UW-Madison DSI. It controls what visitors see on the org landing page.

Structure

.github/
  scripts/
    render-banner.mjs              # Fetches org stats + renders banner via Playwright
    update-readme.mjs              # Fetches most-active repos via GitHub GraphQL API
  workflows/
    refresh-banner.yml             # Nightly banner refresh (06:00 UTC)
    update-active-repos.yml        # Weekly active repos table (Mondays at noon UTC)
profile/
  README.md                        # Rendered on the org landing page
  template.html                    # HTML source for the banner design
  banner.png                       # Generated by the banner workflow
package.json                       # Node deps for the banner renderer

Workflows

Banner Refresh (refresh-banner.yml)

Runs nightly at 06:00 UTC and on pushes to template/script files. It:

  1. Queries the GitHub REST API for public, non-archived, non-fork repo count and unique contributor count.
  2. Injects the live numbers into profile/template.html.
  3. Screenshots the HTML at 1280x320 using headless Chromium (Playwright).
  4. Commits profile/banner.png if the image changed.

Uses the built-in GITHUB_TOKEN, so no extra secrets are needed.

To customize the banner design, edit profile/template.html. The next workflow run will pick it up.

Active Repos Table (update-active-repos.yml)

Runs weekly on Mondays at noon UTC. It queries the org's public repos via the GraphQL API, ranks them by commit count over the last 30 days, and inserts the top 6 between the <!-- ACTIVE_REPOS:START --> / <!-- ACTIVE_REPOS:END --> marker comments in profile/README.md.

Requires a repository secret:

Secret Description
ORG_READ_TOKEN A GitHub PAT with read:org and repo scopes

Setup

  1. Actions permissions: Settings > Actions > General > Workflow permissions: Read and write.
  2. Active repos secret: Add the ORG_READ_TOKEN secret in Settings > Secrets and variables > Actions.
  3. First run: Trigger both workflows manually from the Actions tab to populate the banner and active repos table.

Editing the Org Profile

Edit profile/README.md to change what appears on the org landing page. Two auto-managed sections to be aware of:

  • The banner.png image is regenerated nightly by the banner workflow.
  • The active repos section between the marker comments is refreshed weekly.

Make content changes outside those regions.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages