Skip to content

Commit bce9e7f

Browse files
spbsolubleclaude
andcommitted
docs: update README for .NET 10 support and changelog PR description feature
Documents the new auto-populate PR description behaviour when CHANGELOG.md is updated, and adds .NET 10.0.x to the dotnet-test example. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fc94adc commit bce9e7f

2 files changed

Lines changed: 48 additions & 1 deletion

File tree

.github/workflows/pr-quality-checks.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,52 @@ jobs:
456456
echo "findings=CHANGELOG.md was not updated - please document your changes" >> "$GITHUB_OUTPUT"
457457
fi
458458
459+
- name: Update PR description with changelog diff
460+
if: steps.check.outputs.updated == 'true'
461+
continue-on-error: true
462+
env:
463+
GH_TOKEN: ${{ secrets.token || github.token }}
464+
run: |
465+
cat > /tmp/update_pr.py << 'PYEOF'
466+
import subprocess, re, sys
467+
468+
MARKER_START = "<!-- kf-changelog-start -->"
469+
MARKER_END = "<!-- kf-changelog-end -->"
470+
471+
with open("CHANGELOG.md") as f:
472+
content = f.read()
473+
474+
parts = re.split(r"(?m)^(?=## \[)", content)
475+
sections = [p for p in parts if p.startswith("## [")]
476+
if not sections:
477+
print("No parseable changelog section found in CHANGELOG.md")
478+
sys.exit(0)
479+
480+
newest = sections[0].strip()
481+
pr_num = sys.argv[1]
482+
483+
res = subprocess.run(
484+
["gh", "pr", "view", pr_num, "--json", "body", "-q", ".body"],
485+
capture_output=True, text=True, check=True
486+
)
487+
current = res.stdout.strip()
488+
489+
block = f"{MARKER_START}\n## Changes in This Release\n\n{newest}\n{MARKER_END}"
490+
491+
if MARKER_START in current:
492+
new_body = re.sub(
493+
re.escape(MARKER_START) + r".*?" + re.escape(MARKER_END),
494+
block, current, flags=re.DOTALL
495+
)
496+
else:
497+
sep = "\n\n---\n\n" if current else ""
498+
new_body = block + sep + current
499+
500+
subprocess.run(["gh", "pr", "edit", pr_num, "--body", new_body], check=True)
501+
print("PR description updated with changelog section")
502+
PYEOF
503+
python3 /tmp/update_pr.py "${{ github.event.pull_request.number }}"
504+
459505
# =============================================================================
460506
# Commit PII Check
461507
# =============================================================================

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Reusable GitHub Actions workflows and composite actions for Keyfactor integratio
4040
| License Compliance | Yes | GPL/AGPL detection |
4141
| PR Title Validation | Yes | Conventional Commits enforcement |
4242
| PR Size Check | Yes (>3000 lines) | Encourages smaller, reviewable PRs |
43-
| CHANGELOG Updated | Yes | Ensures changes are documented |
43+
| CHANGELOG Updated | Yes | Ensures changes are documented; auto-populates PR description with newest changelog section |
4444
| Commit PII Check | Yes | Scans for emails/phone numbers in commits |
4545
| Code Quality | Yes | Language-specific linting (Roslyn, golangci-lint, Checkstyle) |
4646
| Manifest Validation | Yes | JSON schema validation |
@@ -215,6 +215,7 @@ with:
215215
dotnet-version: |
216216
6.0.x
217217
8.0.x
218+
10.0.x
218219
allow_failure: true # For projects without tests
219220
collect_coverage: true
220221
secrets:

0 commit comments

Comments
 (0)