Merge pull request #455 from mikepenz/feature/451

Output joined list with PR IDs
This commit is contained in:
Mike Penz
2021-08-26 17:23:22 +02:00
committed by GitHub
4 changed files with 25 additions and 7 deletions
+7 -6
View File
@@ -76,12 +76,13 @@ A full set list of possible output values for this action.
| **Output** | **Description** |
|---------------------|---------------------------------------------------------------------------------------------------------------------------|
| `outputs.changelog` | The built release changelog built from the merged pull requests |
| `outputs.owner` | Specifies the owner of the repository processed |
| `outputs.repo` | Describes the repository name, which was processed |
| `outputs.fromTag` | Defines the `fromTag` which describes the lower bound to process pull requests for |
| `outputs.toTag` | Defines the `toTag` which describes the upper bound to process pull request for |
| `outputs.failed` | Defines if there was an issue with the action run, and the changelog may not have been generated correctly. [true, false] |
| `outputs.changelog` | The built release changelog built from the merged pull requests |
| `outputs.owner` | Specifies the owner of the repository processed |
| `outputs.repo` | Describes the repository name, which was processed |
| `outputs.fromTag` | Defines the `fromTag` which describes the lower bound to process pull requests for |
| `outputs.toTag` | Defines the `toTag` which describes the upper bound to process pull request for |
| `outputs.failed` | Defines if there was an issue with the action run, and the changelog may not have been generated correctly. [true, false] |
| `outputs.pull_requests` | Defines a `,` joined array with all PR IDs associated with the generated changelog. |
## Full Sample 🖥️
Generated Vendored
+6
View File
@@ -593,6 +593,12 @@ class ReleaseNotes {
if (!this.options.commitMode) {
core.startGroup(`🚀 Load pull requests`);
mergedPullRequests = yield this.getMergedPullRequests(this.octokit);
// define the included PRs within this release as output
core.setOutput('pull_requests', mergedPullRequests
.map(pr => {
return pr.number;
})
.join(','));
core.endGroup();
}
else {
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+11
View File
@@ -24,6 +24,17 @@ export class ReleaseNotes {
if (!this.options.commitMode) {
core.startGroup(`🚀 Load pull requests`)
mergedPullRequests = await this.getMergedPullRequests(this.octokit)
// define the included PRs within this release as output
core.setOutput(
'pull_requests',
mergedPullRequests
.map(pr => {
return pr.number
})
.join(',')
)
core.endGroup()
} else {
core.startGroup(`🚀 Load commit history`)