Skip to content

Commit

Permalink
Merge pull request #664 from mikepenz/feature/658
Browse files Browse the repository at this point in the history
Add count of categorized and uncategorized items to output
  • Loading branch information
mikepenz authored Feb 1, 2022
2 parents 8151a3f + c1f978e commit a6d07f6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,17 @@ ${{steps.build_changelog.outputs.changelog}}

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.pull_requests` | Defines a `,` joined array with all PR IDs associated with the generated changelog. |
| **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.pull_requests` | Defines a `,` joined array with all PR IDs associated with the generated changelog. |
| `outputs.categorized_prs` | Count of PRs which were successfully categorized as part of the action. |
| `outputs.uncategorized_prs` | Count of PRs which were not categorized as part of the action. |


## Full Sample 🖥️
Expand Down
2 changes: 2 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export function buildChangelog(
}
}
core.info(`✒️ Wrote ${categorizedPrs.length} categorized pull requests down`)
core.setOutput('categorized_prs', categorizedPrs.length)

let changelogUncategorized = ''
for (const pr of uncategorizedPrs) {
Expand All @@ -173,6 +174,7 @@ export function buildChangelog(
core.info(
`✒️ Wrote ${uncategorizedPrs.length} non categorized pull requests down`
)
core.setOutput('uncategorized_prs', uncategorizedPrs.length)

let changelogIgnored = ''
for (const pr of ignoredPrs) {
Expand Down

0 comments on commit a6d07f6

Please sign in to comment.