Skip to content

Add daily PR update workflow with discussion creation#2087

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/create-daily-pr-updates-workflow
Closed

Add daily PR update workflow with discussion creation#2087
Copilot wants to merge 3 commits intomainfrom
copilot/create-daily-pr-updates-workflow

Conversation

Copy link
Contributor

Copilot AI commented Oct 21, 2025

This PR adds a new agentic workflow that provides comprehensive daily updates on all pull requests in the repository and automatically creates a GitHub Discussion with the results.

Overview

The daily-pr-update.md workflow runs daily at 8:00 AM UTC to analyze all pull request activity and generate an organized report in the "daily-news" discussion category.

Features

Automated PR Analysis

The workflow automatically collects and analyzes:

  • Open PRs - Categorized by status (approved, under review, awaiting review, draft)
  • Recently Merged PRs - PRs merged in the last 24 hours with timing metrics
  • Recently Closed PRs - PRs closed without merge in the last 24 hours
  • PRs Needing Attention - Stale PRs (7+ days), long-running PRs (14+ days), and PRs with merge conflicts

GitHub API Integration

Uses the following GitHub tools for comprehensive data collection:

  • list_pull_requests - Get all open pull requests
  • search_pull_requests - Search for PRs by date and status
  • pull_request_read - Retrieve detailed PR information
  • get_repository - Get repository metadata
  • list_commits - Analyze commit history

Discussion Creation

Automatically creates a well-formatted GitHub Discussion with:

  • Summary statistics and quick metrics
  • Categorized PR listings with relevant details
  • Recent activity highlights (last 24 hours)
  • Actionable recommendations for maintainers
  • Top contributor analysis

Execution Details

  • Schedule: Runs daily at 8:00 AM UTC via cron
  • Manual Trigger: Can be run on-demand via workflow_dispatch
  • AI Engine: Uses GitHub Copilot CLI for intelligent analysis
  • Timeout: 10 minutes
  • Permissions: Read-only for main job, discussions write handled by safe-outputs
  • Cache Memory: Enabled for persistent storage across runs

Example Output

The workflow generates discussions with this structure:

# 📊 Daily Pull Request Update - 2024-10-21

## Summary
- 📂 Open PRs: 12
- ✅ Merged Today: 3
- ❌ Closed Today: 1
- ⏳ Awaiting Review: 5
- 🔄 Under Review: 4
- ⚠️ Needs Attention: 2

## Open Pull Requests
[Categorized by status with PR numbers, titles, and authors]

## Recent Activity (Last 24 Hours)
[Merged and closed PRs with timing information]

## PRs Needing Attention ⚠️
[Stale, long-running, or conflicted PRs]

## Top Contributors (This Week)
[Activity metrics by author]

Testing

  • ✅ Workflow compiles successfully via gh aw compile
  • ✅ All unit tests pass
  • make agent-finish validation passes
  • ✅ Appears correctly in gh aw status output

This workflow helps maintainers and contributors stay informed about PR activity and ensures important pull requests don't get overlooked.

Original prompt

Create a agentic workflow that provides daily updates on all pull requests in PRS and initiates a discussion with the results.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 21, 2025 19:39
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Create agentic workflow for daily pull request updates Add daily PR update workflow with discussion creation Oct 21, 2025
Copilot AI requested a review from pelikhan October 21, 2025 19:45
@pelikhan pelikhan closed this Oct 21, 2025
@pelikhan pelikhan deleted the copilot/create-daily-pr-updates-workflow branch October 23, 2025 21:23
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