You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Example 4 - Configuring PR-based release notes
589
+
590
+
The workflow can automatically generate GitHub release names and notes from your pull request content.
591
+
Three parameters control this behavior:
592
+
593
+
| Parameter | Description |
594
+
|-----------|-------------|
595
+
| `UsePRTitleAsReleaseName` | Use the PR title as the GitHub release name instead of the version string |
596
+
| `UsePRBodyAsReleaseNotes` | Use the PR body as the release notes content |
597
+
| `UsePRTitleAsNotesHeading` | Prepend PR title as H1 heading with PR number link before the body |
598
+
599
+
These parameters follow specific precedence rules when building release notes:
600
+
601
+
1. **Heading + Body** (`UsePRTitleAsNotesHeading: true` + `UsePRBodyAsReleaseNotes: true`): Creates formatted notes with the PR title as an H1 heading followed by the PR body. The output format is `# PR Title (#123)\n\nPR body content`. Both the PR title and body must be present.
602
+
603
+
1. **Body only** (`UsePRBodyAsReleaseNotes: true`): Uses the PR body as-is for release notes. Takes effect when heading option is disabled or PR title is missing.
604
+
605
+
1. **Fallback**: When neither option is enabled or required PR content is missing, GitHub's auto-generated release notes are used via `--generate-notes`.
606
+
607
+
#### Default configuration (recommended)
608
+
609
+
The defaults provide rich release notes with the PR title as a heading:
610
+
611
+
```yaml
612
+
Publish:
613
+
Module:
614
+
UsePRTitleAsReleaseName: false
615
+
UsePRBodyAsReleaseNotes: true
616
+
UsePRTitleAsNotesHeading: true
617
+
```
618
+
619
+
This produces release notes like:
620
+
621
+
```markdown
622
+
# 🚀 Add new authentication feature (#42)
623
+
624
+
This PR adds OAuth2 support with the following changes:
625
+
- Added `Connect-OAuth2` function
626
+
- Updated documentation
627
+
```
628
+
629
+
#### Version-only release names
630
+
631
+
If you prefer version numbers as release names but still want PR-based notes:
632
+
633
+
```yaml
634
+
Publish:
635
+
Module:
636
+
UsePRTitleAsReleaseName: false
637
+
UsePRBodyAsReleaseNotes: true
638
+
UsePRTitleAsNotesHeading: false
639
+
```
640
+
641
+
#### Auto-generated notes
642
+
643
+
To use GitHub's auto-generated release notes instead of PR content:
644
+
645
+
```yaml
646
+
Publish:
647
+
Module:
648
+
UsePRTitleAsReleaseName: false
649
+
UsePRBodyAsReleaseNotes: false
650
+
UsePRTitleAsNotesHeading: false
651
+
```
652
+
584
653
## Skipping Individual Framework Tests
585
654
586
655
The PSModule framework tests run automatically as part of the `Test-Module` and `Test-SourceCode` jobs. While you can skip entire test categories using the configuration settings (e.g., `Test.PSModule.Skip`), you can also skip individual framework tests on a per-file basis when needed.
0 commit comments