Skip to content

Commit 6cb1b52

Browse files
Fix workflow-dispatched test runs (#258)
* fix: stabilize workflow-dispatched tests * Update wiki submodule pointer for PR #258 * docs: validate published pull request bodies --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent af15193 commit 6cb1b52

10 files changed

Lines changed: 37 additions & 10 deletions

File tree

.agents/agents/issue-implementer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ pull request.
2626
warranted.
2727
- Open or update the pull request with a clear title, summary, and verification
2828
notes.
29+
- Read the published pull-request body back from GitHub and fix literal
30+
escaped Markdown control characters, such as `\n`, before reporting the PR
31+
as ready.
2932

3033
## Use When
3134

.agents/skills/github-pull-request/references/pr-drafting.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,20 @@ Examples:
6060
- Create a draft PR when the user explicitly wants review before finalization or when you still need external confirmation.
6161
- Create a ready PR when verification is complete and the change is ready for review.
6262

63+
## Published Body Readback
64+
65+
After creating or updating the PR body, read the published body back from
66+
GitHub before reporting the PR as ready.
67+
68+
- Use `gh pr view <number> --json body --jq .body` or an equivalent
69+
connector readback.
70+
- Confirm the body does not contain escaped Markdown control characters such
71+
as literal `\n`, `\t`, or JSON-escaped list content.
72+
- If escaped control characters appear, update the body with a file or stdin
73+
payload that preserves real newlines, then read it back again.
74+
- Treat the readback as part of PR publication, especially when the body was
75+
assembled by shell command substitution, JSON output, or automation.
76+
6377
## Optional Follow-ups
6478

6579
Apply only when the repository workflow or the user asks for them:

.agents/skills/github-pull-request/references/review-checklist.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ Use this checklist before reporting completion.
1313
- README, docs, wiki, reports, or sync outputs were updated when the change touched them.
1414
- The PR title follows repository conventions.
1515
- The PR body includes a clear summary, concrete testing notes, and `Closes #123` style closing text.
16+
- The published PR body was read back from GitHub and does not contain literal
17+
escaped Markdown control characters such as `\n` where real newlines were
18+
intended.
1619
- No duplicate PR was created for the same branch.
1720
- The final user summary explains what changed, what was verified, and what remains.
1821

.github/actions/github/resolve-predictable-conflicts/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ dispatch_required_tests() {
6767
return 0
6868
fi
6969

70-
if gh workflow run tests.yml --ref "${head_ref}" -f max-outdated=-1 -f publish-required-statuses=true >/dev/null 2>&1; then
70+
if gh workflow run tests.yml --ref "${head_ref}" -f publish-required-statuses=true >/dev/null 2>&1; then
7171
append_summary " - tests dispatch requested with required status mirroring"
7272

7373
return 0

.github/wiki

Submodule wiki updated from 781af55 to 0b4c890

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ jobs:
226226
env:
227227
GH_TOKEN: ${{ github.token }}
228228
RELEASE_BRANCH: ${{ env.RELEASE_BRANCH_PREFIX }}${{ steps.version.outputs.value }}
229-
run: gh workflow run tests.yml --ref "${RELEASE_BRANCH}" -f max-outdated=-1 -f publish-required-statuses=true
229+
run: gh workflow run tests.yml --ref "${RELEASE_BRANCH}" -f publish-required-statuses=true
230230

231231
- uses: actions/checkout@v6
232232
- name: Checkout dev-tools workflow action source

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ on:
1111
max-outdated:
1212
description: Maximum number of outdated packages allowed by the dependencies command.
1313
required: false
14-
type: number
15-
default: -1
14+
type: string
15+
default: '-1'
1616
publish-required-statuses:
1717
description: Mirror required test matrix checks as commit statuses for workflow-dispatched runs.
1818
required: false
@@ -28,8 +28,8 @@ on:
2828
max-outdated:
2929
description: Maximum number of outdated packages allowed by the dependencies command.
3030
required: false
31-
type: number
32-
default: -1
31+
type: string
32+
default: '-1'
3333
publish-required-statuses:
3434
description: Mirror required test matrix checks as commit statuses for workflow-dispatched runs.
3535
required: false

.github/workflows/wiki-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
env:
117117
GH_TOKEN: ${{ github.token }}
118118
HEAD_REF: ${{ github.event.pull_request.head.ref }}
119-
run: gh workflow run tests.yml --ref "${HEAD_REF}" -f max-outdated=-1 -f publish-required-statuses=true
119+
run: gh workflow run tests.yml --ref "${HEAD_REF}" -f publish-required-statuses=true
120120

121121
- uses: ./.dev-tools-actions/.github/actions/summary/write
122122
with:

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Teach pull-request publication guidance to read the published PR body back
13+
from GitHub and fix literal escaped Markdown control characters before
14+
handing the PR off for review.
15+
- Keep workflow-dispatched test runs from failing before job creation by treating `max-outdated` as a string input and relying on the workflow default when release, wiki, or conflict automation dispatches required test status mirroring.
16+
1017
## [1.22.2] - 2026-04-24
1118

1219
### Fixed

resources/github-actions/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ on:
1212
max-outdated:
1313
description: Maximum number of outdated packages allowed by the dependencies command.
1414
required: false
15-
type: number
16-
default: -1
15+
type: string
16+
default: '-1'
1717
publish-required-statuses:
1818
description: Mirror required test matrix checks as commit statuses for workflow-dispatched runs.
1919
required: false

0 commit comments

Comments
 (0)