Skip to content

Commit cd29b5c

Browse files
alexvy86Copilot
andauthored
Add skill to trigger ADO pipelines in PRs (microsoft#26632)
## Description Adds an agent skill to trigger all pipelines in a PR. Useful for Copilot-generated PRs where a repo maintainer needs to manually trigger the pipelines. The comment bodies are taken from our internal docs. If we merge this, we probably want to update those docs to point to the skill so we have a single source of truth. ## Reviewer Guidance The review process is outlined on [this wiki page](https://github.com/microsoft/FluidFramework/wiki/PR-Guidelines#guidelines). --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b0a1006 commit cd29b5c

File tree

1 file changed

+42
-0
lines changed
  • .claude/skills/trigger-pipelines-for-copilot-pr

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: trigger-pipelines-for-copilot-pr
3+
description: Trigger ADO pipelines for a Copilot-created PR by posting /azp run comments. Use when the user asks to trigger CI pipelines for a specific PR.
4+
allowed-tools: Bash(gh pr comment *)
5+
context: fork
6+
model: claude-haiku-4-5-20251001
7+
argument-hint: [pr-number-or-url]
8+
---
9+
10+
Post the following two comments to the PR specified by the user ($ARGUMENTS), in the `microsoft/FluidFramework` repository on GitHub.
11+
They need to be posted separately because otherwise it gets too long and
12+
fails to trigger correctly.
13+
14+
First comment:
15+
16+
```
17+
/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-historian,server-routerlicious,Build - client packages,repo-policy-check
18+
```
19+
20+
Second comment:
21+
22+
```
23+
/azp run Build - api-markdown-documenter,Build - benchmark-tool,Build - build-common,Build - build-tools,Build - common-utils,Build - eslint-config-fluid,Build - eslint-plugin-fluid
24+
```
25+
26+
Posting those comments will trigger all our pipelines, which is necessary for PRs that are created by Copilot.
27+
28+
To post the comments first check if the GitHub CLI is available,
29+
and if so use `gh pr comment <PULL_REQUEST_NUMBER> --repo microsoft/FluidFramework --body "<COMMENT_TEXT>"`.
30+
If `gh` is not available but `$GITHUB_TOKEN` is, you can try the GitHub REST API directly, e.g.:
31+
32+
```
33+
curl -L \
34+
-X POST \
35+
-H "Accept: application/vnd.github+json" \
36+
-H "Authorization: Bearer $GITHUB_TOKEN" \
37+
-H "X-GitHub-Api-Version: 2022-11-28" \
38+
https://api.github.com/repos/microsoft/FluidFramework/issues/PULL_REQUEST_NUMBER/comments \
39+
-d '{"body":"<COMMENT_TEXT>"}'
40+
```
41+
42+
If neither is available, don't do anything and tell the user you can't complete the request and why.

0 commit comments

Comments
 (0)