Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ There are two events that can be used as triggers for this action, each with dif

## Outputs

In case the validation fails, this action will populate the `error_message` ouput.
- The outputs `type`, `scope` and `subject` are populated, except for if the `wip` option is used.
- The `error_message` output will be populated in case the validation fails.

[An output can be used in other steps](https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs), for example to comment the error message onto the pull request.

Expand Down Expand Up @@ -222,4 +223,3 @@ jobs:
```
</details>
3 changes: 3 additions & 0 deletions src/validatePrTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ module.exports = async function validatePrTitle(
parserOpts.headerCorrespondence = headerPatternCorrespondence;
}
const result = parser(prTitle, parserOpts);
core.setOutput('type', result.type);
core.setOutput('scope', result.scope);
core.setOutput('subject', result.subject);

function printAvailableTypes() {
return `Available types:\n${types
Expand Down