Skip to content

Add organization repository report workflow and report generation script#89

Open
mimiflynn wants to merge 16 commits into
mainfrom
workflow-github-org-report
Open

Add organization repository report workflow and report generation script#89
mimiflynn wants to merge 16 commits into
mainfrom
workflow-github-org-report

Conversation

@mimiflynn
Copy link
Copy Markdown
Member

Summary

This PR adds automated organization-level repository reporting for morganstanley via GitHub Actions.

What Changed

  • Added a new workflow: .github/workflows/org-repo-report.yml

  • Runs on:

    • manual trigger (workflow_dispatch)
    • weekly schedule (0 6 * * 1)
  • Uses GH_TOKEN to call GitHub APIs.

  • Generates report outputs:

    • reporting/org-repo-report.csv
    • reporting/org-repo-report.md
  • Commits and pushes generated report updates to branch:

    • github-org-stats
  • Added a new report generator script: reporting/generate_org_repo_report.py

  • Enumerates all repos in the morganstanley organization.

  • Captures per-repo fields:

    • repository name
    • repository created date/time
    • repository creator (best effort from org audit log)
    • most recent update date/time
    • most recent updater
  • Uses latest PushEvent actor/time when available, with fallback to latest default-branch commit metadata.

  • Handles pagination, basic retry/rate-limit behavior, and timestamp normalization to UTC.

Output Format

  • CSV for machine consumption: reporting/org-repo-report.csv
  • Markdown table for human-readable review: reporting/org-repo-report.md

Notes / Requirements

  • GH_TOKEN secret is required.
  • repo_created_by depends on org audit log access; if unavailable (for example missing admin:org), creator fields are marked unknown and the report notes the limitation.

Validation

  • Workflow YAML and Python script were validated with no reported errors.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces automated org-level repository reporting for the morganstanley GitHub organization, generating CSV/Markdown outputs and publishing them via a scheduled/manual GitHub Actions workflow.

Changes:

  • Added a GitHub Actions workflow to generate and commit/push an organization repository report to the github-org-stats branch on a weekly schedule or manual trigger.
  • Added a Python report generator that enumerates org repos and enriches them with “created by” (audit log, best-effort) and “most recent updater” (push event / commit fallback) metadata.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
reporting/generate_org_repo_report.py New Python script that queries GitHub APIs, normalizes timestamps, and writes CSV/Markdown reports.
.github/workflows/org-repo-report.yml New scheduled/manual workflow that runs the generator and commits report artifacts to a dedicated branch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread reporting/generate_org_repo_report.py Outdated
Comment thread reporting/generate_org_repo_report.py Outdated
Comment thread reporting/generate_org_repo_report.py Outdated
Comment thread reporting/generate_org_repo_report.py Outdated
Comment thread reporting/generate_org_repo_report.py
Comment thread .github/workflows/org-repo-report.yml
Comment thread .github/workflows/org-repo-report.yml
mimiflynn and others added 7 commits May 21, 2026 16:52
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…WN_VALUE for missing repository creator information
@mimiflynn
Copy link
Copy Markdown
Member Author

Please see actions for output report.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Comment thread .github/workflows/org-repo-report.yml Outdated
Comment thread .github/workflows/org-repo-report.yml
Comment thread reporting/generate_org_repo_report.py
Comment thread reporting/generate_org_repo_report.py
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.

2 participants