Skip to content

Commit 8949380

Browse files
authored
Feature/157 feature add codescene code coverage gates for pull requests (#159)
* #157 fix: add CodeScene PR coverage gates - add a reusable check-coverage action for cs-coverage check - run CodeScene coverage gates on pull requests in Tests.yml - keep the existing develop/manual CodeScene analysis flow - document the new PR gate behavior in the contributor docs and changelog * #157 feat: Validate repository changelog with Test-KeepAChangelogFile * feat(#157): update PR description generation requirements - Add mandatory steps for reading prompt and template files - Specify output structure and folder creation for PR descriptions
1 parent 0f36cea commit 8949380

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

.github/prompts/pr-description.prompt.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,22 @@ Analyze the provided input and:
2828

2929
Be pragmatic: if information is missing, make reasonable assumptions but call them out briefly.
3030

31-
---
31+
Before generating the PR description, you MUST:
3232

33-
## Output format
33+
- Read this prompt file from `.github/prompts/pr-description.prompt.md` directly, even if hidden folders were not
34+
surfaced by an earlier search.
35+
- Read `.github/pull_request_template.md` directly and treat it as authoritative.
36+
- Resolve all relative paths from the repository root.
37+
- Treat `./pr-descriptions/` as a repository-root-relative output folder.
38+
- Never assume `.github/` content is missing just because a previous listing or glob search did not show hidden folders.
3439

35-
You MUST return the PR description using this exact structure:
40+
---
3641

37-
### Pull Request Template
42+
## Output format
3843

39-
.github/pull_request_template.md
44+
You MUST return the PR description using this exact structure, you will find the template in
45+
`.github/pull_request_template.md`:
46+
You MUST fill in all sections, and you MUST NOT modify the template structure.
47+
You MUST create a *.md file in the `./pr-descriptions/` folder with the same name as the PR title, and write the
48+
generated description there.
49+
If the folder does not exist yet, you MUST create it under the repository root before writing the file.

.github/workflows/Tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ jobs:
3333
- name: Run NovaModuleTools CI test and coverage workflow
3434
run: ./scripts/build/ci/Invoke-NovaModuleToolsCI.ps1 -OutputDirectory ./artifacts
3535

36+
- name: Validate repository changelog with Test-KeepAChangelogFile
37+
run: |
38+
$result = Test-KeepAChangelogFile -Path ./CHANGELOG.md
39+
if (-not $result.IsValid) {
40+
throw ($result.Errors -join [Environment]::NewLine)
41+
}
42+
3643
- name: Upload CI artifacts
3744
if: always()
3845
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)