Skip to content

Commit c1a002d

Browse files
deyaaeldeenCopilot
andauthored
hero-scenarios: switch to hero-scenarios.md and support fork PRs (#42268)
* Switch hero-scenarios from README.md to hero-scenarios.md Update workflow definition and guidelines to generate hero-scenarios.md instead of README.md, since most service README files contain only AutoRest configuration and are not suitable for hero scenarios. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Switch hero-scenarios trigger to label_command Use the label_command trigger instead of manual pull_request+labeled filtering. This auto-removes the label after firing (re-triggerable) and adds workflow_dispatch for manual testing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * hero-scenarios: switch to pull_request_target for fork PR support - Replace label_command with pull_request_target + forks to support PRs from forks while maintaining the same label-driven UX - Add on.steps label removal in pre_activation job - Add explicit workflow_dispatch trigger for manual runs - Recompile with gh-aw v0.68.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * address review: upgrade to actions/github-script@v9 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Deyaa Eldeen <deyaaeldeen@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b7c7ac1 commit c1a002d

4 files changed

Lines changed: 136 additions & 57 deletions

File tree

.github/aw/actions-lock.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@
1010
"version": "v7",
1111
"sha": "f28e40c7f34bde8b3046d885e986cb6290c5673b"
1212
},
13+
"actions/github-script@v8": {
14+
"repo": "actions/github-script",
15+
"version": "v8",
16+
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
17+
},
18+
"actions/github-script@v9": {
19+
"repo": "actions/github-script",
20+
"version": "v9",
21+
"sha": "373c709c69115d41ff229c7e5df9f8788daa9553"
22+
},
1323
"actions/github-script@v9.0.0": {
1424
"repo": "actions/github-script",
1525
"version": "v9.0.0",

.github/prompts/hero-scenarios-guidelines.md

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,19 @@
1414
4. If no specification surface was changed, post a single message saying
1515
no hero scenarios are applicable and stop.
1616

17-
## Step 1 — Check for Existing README
17+
## Step 1 — Check for Existing Hero Scenarios
1818

19-
Check whether the service already has a `README.md` with hero scenarios.
19+
Check whether the service already has a `hero-scenarios.md` file.
2020
Look in the top-level service directory (e.g.,
21-
`specification/loadtestservice/README.md`) and in each spec subdirectory
22-
(e.g., `resource-manager/Microsoft.LoadTestService/loadtesting/readme.md`,
23-
`data-plane/loadtesting/readme.md`).
24-
25-
- **If no README with hero scenarios exists** (or all READMEs only
26-
contain AutoRest configuration), you will generate a full suggested
27-
`README.md` in Step 3.
28-
- **If a README already exists** with substantive service documentation,
29-
read it and note the existing hero scenarios. In Step 3, you will only
30-
suggest new scenarios that cover API surface introduced by this PR and
31-
not already covered.
21+
`specification/loadtestservice/hero-scenarios.md`) and in each spec subdirectory
22+
(e.g., `resource-manager/Microsoft.LoadTestService/loadtesting/hero-scenarios.md`,
23+
`data-plane/loadtesting/hero-scenarios.md`).
24+
25+
- **If no `hero-scenarios.md` exists**, you will generate a full suggested
26+
`hero-scenarios.md` in Step 3.
27+
- **If a `hero-scenarios.md` already exists**, read it and note the existing
28+
hero scenarios. In Step 3, you will only suggest new scenarios that cover
29+
API surface introduced by this PR and not already covered.
3230

3331
## Step 2 — Analyze the API Surface
3432

@@ -250,27 +248,27 @@ For each scenario, include:
250248

251249
## Step 4 — Post the Suggestion
252250

253-
**If no README exists**, use `add-comment` to post a PR comment with a
254-
full suggested README:
251+
**If no `hero-scenarios.md` exists**, use `add-comment` to post a PR comment
252+
with a full suggested file:
255253

256254
```
257-
## 📖 Suggested README.md
255+
## 📖 Suggested hero-scenarios.md
258256
259-
> **Path:** `specification/{service}/{specDir}/README.md`
257+
> **Path:** `specification/{service}/{specDir}/hero-scenarios.md`
260258
>
261-
> This service directory has no README documenting the service and its
262-
> hero scenarios. Consider adding one:
259+
> This service directory has no `hero-scenarios.md` documenting hero
260+
> scenarios. Consider adding one:
263261
264-
<the README content as raw markdown — do NOT wrap it in a code fence>
262+
<the hero-scenarios.md content as raw markdown — do NOT wrap it in a code fence>
265263
```
266264

267-
The README should include:
265+
The file should include:
268266
1. **Service name and one-paragraph description** — what the service
269267
does, who it is for, and what problem it solves.
270268
2. **Hero scenarios** — the scenarios generated in Step 3.
271269

272-
**If a README already exists**, post an inline code suggestion on the
273-
README file using `create-pull-request-review-comment`. Place the
270+
**If a `hero-scenarios.md` already exists**, post an inline code suggestion on
271+
the file using `create-pull-request-review-comment`. Place the
274272
comment at the end of the file and use a GitHub suggestion block so the
275273
author can apply it with one click:
276274

@@ -283,6 +281,6 @@ author can apply it with one click:
283281
Then submit the review using `submit-pull-request-review` with event
284282
`COMMENT` and a one-sentence body summarizing what was suggested.
285283

286-
If the existing README already covers all the API surface in this PR,
287-
submit a `COMMENT` review with a one-sentence body confirming no new
288-
scenarios are needed.
284+
If the existing `hero-scenarios.md` already covers all the API surface in
285+
this PR, submit a `COMMENT` review with a one-sentence body confirming no
286+
new scenarios are needed.

0 commit comments

Comments
 (0)