Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 12, 2026

Adds a workflow that triggers when issues with the docs-from-code label are created in this repo (from dotnet/aspire). The workflow assigns the issue to GitHub Copilot Agent to draft a PR and tags the original PR author as SME for review.

Workflow behavior

  • Trigger: issues.labeled event with docs-from-code label
  • SME extraction: Parses issue body for author patterns (PR Author:, Author:, SME:, etc.) or fetches from linked dotnet/aspire PR URL
  • Actions:
    • Assigns issue to copilot user
    • Comments with SME mention for review notification

SME detection patterns

const authorPatterns = [
  /PR\s*Author:\s*@?([\w-]+)/i,
  /Author:\s*@?([\w-]+)/i,
  /SME:\s*@?([\w-]+)/i,
  /Original\s*PR\s*by\s*@?([\w-]+)/i,
  /Created\s*by\s*@([\w-]+)/i
];

Falls back to GitHub API call if a github.com/dotnet/aspire/pull/{number} URL is found but no author pattern matches.

Original prompt

I need a new workflow that triggers when issues with the docs-from-code label are created. It should use the GitHub Colipot CLI to draft a PR based on the given description and we need to tag (or at mention the original SME from the originating PR). In other words, in the dotnet/aspire repo, there's a workflow today that will create issues in this (microsoft/aspire.dev) repo, it will have the appropriate label, that issue is based on a PR in the dotnet/aspire repo, whoever the author of that PR is will also need to be tagged/mentioned here for review.


💡 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.

Copilot AI and others added 3 commits January 12, 2026 16:04
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot AI changed the title [WIP] Add workflow to trigger on docs-from-code issues Add docs-from-code workflow to process labeled issues with Copilot Jan 12, 2026
Copilot AI requested a review from IEvangelist January 12, 2026 16:10
@sebastienros
Copy link
Contributor

This is not using the copilot cli, only assigning to the copilot, is that intentional?

@IEvangelist
Copy link
Member

This is not using the copilot cli, only assigning to the copilot, is that intentional?

I'm honestly not even sure if this works...but, I suppose why do extra work if this does? Ideally the issue will have all the details anyway, so then it's really just assigning Copilot to it, right? What would you expect the difference to be with the CLI approach?

Co-authored-by: Sébastien Ros <sebastienros@gmail.com>
@sebastienros
Copy link
Contributor

I will probably work, just want to see an actual workflow using the cli before I try myself for other reasons ;)

@IEvangelist
Copy link
Member

I will probably work, just want to see an actual workflow using the cli before I try myself for other reasons ;)

@captainsafia workflow is currently using the CLI: https://github.com/dotnet/aspire/blob/main/.github/workflows/pr-docs-hook.yml

@IEvangelist IEvangelist marked this pull request as ready for review January 13, 2026 02:50
Copilot AI review requested due to automatic review settings January 13, 2026 02:50
Copy link
Contributor

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 adds an automated workflow to handle documentation generation from code changes. When issues are labeled with docs-from-code (typically created from PRs in the dotnet/aspire repository), the workflow automatically assigns them to GitHub Copilot and notifies the original PR author for review.

Changes:

  • New GitHub Actions workflow that triggers on issue labeling events
  • SME (Subject Matter Expert) extraction from issue body using multiple regex patterns
  • Fallback mechanism to fetch PR author from dotnet/aspire repository via GitHub API
  • Automated assignment to Copilot agent with notification comment mentioning the SME

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

@IEvangelist IEvangelist enabled auto-merge (squash) January 13, 2026 02:56
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.

3 participants