Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 4, 2025

Plan: Create Daily Copilot PR Merged Report Workflow

  • Analyze existing workflow patterns and shared imports
  • Create new workflow file .github/workflows/copilot-pr-merged-report.md
  • Configure workflow with required settings:
    • Daily schedule (3 PM UTC, weekdays only)
    • Permissions: read for issues, actions, pull-requests, contents
    • Disable GitHub tool (github: false)
    • Import shared/gh.md for GitHub CLI queries
    • Import shared/reporting.md for report formatting
    • Configure safe-outputs for creating discussions
  • Write workflow prompt:
    • Query merged PRs from last 24 hours with copilot/ branch prefix
    • Extract metrics: generated code, tests, consumed tokens
    • Generate report as discussion
  • Compile workflow with gh aw compile
  • Validate compiled lock file
  • Run unit tests (all passing)
  • Final validation complete

Summary

Created a new daily agentic workflow that analyzes Copilot pull requests merged in the last 24 hours. The workflow:

  • ✅ Runs daily at 3 PM UTC, Monday-Friday only (avoids weekends)
  • ✅ Uses the gh safe-input tool (shared/gh.md) for GitHub CLI access
  • ✅ Disables the GitHub tool as requested (github: false)
  • ✅ Has read permissions for issues, actions, pull-requests, and contents
  • ✅ Searches for merged PRs with head:copilot/ branch prefix
  • ✅ Extracts metrics: lines added/deleted, test file counts, workflow execution time
  • ✅ Creates a discussion report in the "audits" category
  • ✅ Imports shared/reporting.md for consistent report formatting
  • ✅ Successfully compiled with no errors
  • ✅ All unit tests passing
Original prompt

Create a daily agentic workflow that generates a report as a discussion that analyzes the copilot pull requests merged during the last 24 hours and generate a basic report about the amount of generated code, test, and consumed tokens.

  • uses shared/gh.md shared agentic workflow to query github data
  • permissions to read issues, actions, pull requests, contents
  • disables github (github:false)

Custom agent used: create-agentic-workflow
Design agentic workflows using GitHub Agentic Workflows (gh-aw) extension with interactive guidance on triggers, tools, and security best practices.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

tools:
github: false
bash:
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot use "edit:" and "bash: *"

@pelikhan pelikhan marked this pull request as ready for review December 4, 2025 20:30
@pelikhan pelikhan merged commit 0d53b1f into main Dec 4, 2025
39 checks passed
@pelikhan pelikhan deleted the copilot/create-daily-workflow-report branch December 4, 2025 20:31
Copilot AI requested a review from pelikhan December 4, 2025 20:31
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