Skip to content

Add GitHub Copilot agent workflows for PR verification, daily code review, and issue triage#120

Open
YunchuWang wants to merge 1 commit intomainfrom
wangbill/add-copilot-agents
Open

Add GitHub Copilot agent workflows for PR verification, daily code review, and issue triage#120
YunchuWang wants to merge 1 commit intomainfrom
wangbill/add-copilot-agents

Conversation

@YunchuWang
Copy link
Member

Summary

Adds GitHub Actions copilot agent integrations for automated PR verification, daily code review, and issue triage, modeled after the setup in durabletask-js.

What's Added

Agent Definitions (.github/agents/)

Agent File Description
PR Verification pr-verification.agent.md Finds PRs labeled pending-verification, creates standalone sample apps to verify fixes against the DTS emulator, posts verification evidence to linked issues, and updates PR labels
Daily Code Review daily-code-review.agent.md Scans the codebase daily for bugs, missing tests, and small improvements. Opens up to 1 PR per run with fixes and new tests, with deduplication against existing work
Issue Triage issue-triage.agent.md Classifies, labels, routes, and maintains GitHub issues. Detects duplicates, identifies owners, and enforces hygiene

Workflow Definitions (.github/workflows/)

Workflow File Schedule
PR Verification pr-verification.yaml Every 6 hours + manual dispatch
Daily Code Review daily-code-review.yaml Daily at 08:00 UTC + manual dispatch

Key Adaptations for Python SDK

All agents have been adapted from durabletask-js for the Python SDK context:

  • Python tooling: Uses pytest, flake8, pip install -e . instead of npm/Jest/ESLint
  • Python patterns: Detection playbooks reference Python-specific bug patterns (bare except:, from err chaining, falsy value handling, async/await patterns)
  • Python examples: Verification sample skeletons use Python syntax and SDK imports (DurableTaskSchedulerClient/DurableTaskSchedulerWorker)
  • Repository context: References correct package structure (durabletask/, durabletask-azuremanaged/, tests/)
  • Generated files: Correctly identifies Python protobuf files (*_pb2.py, *_pb2.pyi, *_pb2_grpc.py)

Security Notes

  • PR verification workflow uses schedule/workflow_dispatch triggers only (not pull_request) to avoid checkout of untrusted PR code
  • --allow-all-tools and --allow-all-paths are safe because prompts are hardcoded and PRs require human review to merge
  • Both workflows require COPILOT_GITHUB_TOKEN secret to be configured

Prerequisites

Before these workflows can run, the following need to be set up:

  1. COPILOT_GITHUB_TOKEN secret must be configured in the repository settings
  2. Labels used by the agents (pending-verification, sample-verification-added, copilot-finds) will be created automatically by the workflows

…view, and issue triage

Adds the following GitHub Actions copilot agent integrations, modeled
after the durabletask-js repository:

- PR Verification Agent: Finds PRs labeled pending-verification, creates
  standalone sample apps to verify fixes against the DTS emulator, posts
  verification evidence to linked issues, and updates PR labels.

- Daily Code Review Agent: Scans the codebase daily for bugs, missing
  tests, and small improvements. Opens up to 1 PR per run with fixes
  and new tests, with deduplication against existing work.

- Issue Triage Agent: Classifies, labels, routes, and maintains GitHub
  issues. Detects duplicates, identifies owners, and enforces hygiene.

All agents are adapted for the Python SDK stack (pytest, flake8, pip,
Python 3.10+) while following the same patterns and conventions
established in the JavaScript SDK.
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.

1 participant