pr-weekly-table command#

The weekly pull request summary command is available either as a script:

pr-weekly-table xadupre my-own-accelerator

or through the package entrypoint:

python -m moa pr-weekly-table xadupre my-own-accelerator

Synopsis:

    usage: python -m moa pr-weekly-table [-h] [--token TOKEN] [--api-url API_URL]
                                         [--since SINCE] [--cache-file CACHE_FILE]
                                         [--output-file OUTPUT_FILE] [--copilot]
                                         [--model MODEL] [-v]
                                         owner repo
    
    Build a Markdown table summarizing pull requests created over the past week.
    
    positional arguments:
      owner                 GitHub repository owner
      repo                  GitHub repository name
    
    options:
      -h, --help            show this help message and exit
      --token TOKEN         GitHub personal access token
      --api-url API_URL     GitHub API base URL
      --since SINCE         Only include PRs created on/after this date (YYYY-MM-
                            DD, ISO datetime, or relative values like '-1 day' or
                            '-3d').
      --cache-file CACHE_FILE
                            Optional cache file path (default:
                            dump_pr_stats/pr_weekly_<repo>_cache.json).
      --output-file OUTPUT_FILE
                            Optional Markdown output path (default:
                            dump_pr_stats/pr_weekly_<repo>.md).
      --copilot             Include Copilot summary/help-needed columns (requires
                            --token or GITHUB_TOKEN).
      --model MODEL         AI model used for --copilot. When omitted, Copilot
                            chooses the model automatically and falls back to
                            openai/gpt-4.1 if needed. Any model available on the
                            GitHub Models API is accepted (for example:
                            openai/gpt-4o-mini, openai/gpt-4.1,
                            anthropic/claude-3.5-sonnet).
      -v, --verbose         Print progress information to stderr.

By default the command writes a Markdown table to dump_pr_stats/pr_weekly_<repo>.md for pull requests created over the last seven days with:

  • title

  • author

  • creation date

  • last update

  • link

  • whether CI needs approval to start

  • CI status (green/pending or first failing required check)

  • reviewers

Use --copilot to append Copilot summary and Help needed columns. Fetched PR rows are cached in dump_pr_stats/pr_weekly_<repo>_cache.json by default so unchanged PR entries are not fetched again. Use --verbose to print the resolved cache and output file locations.