feat: expose lucky output from action#829
Merged
Merged
Conversation
Declare the `lucky` output in action.yml and emit its value via `core.setOutput` in src/index.ts so callers can branch on whether a lucky commit or PR number was detected.
🎉 Happy commit!
|
Code Metrics Report
Details | | main (048b9dd) | #829 (7ffc5b5) | +/- |
|---------------------|----------------|----------------|------|
| Coverage | 99.0% | 99.0% | 0.0% |
| Files | 5 | 5 | 0 |
| Lines | 107 | 107 | 0 |
| Covered | 106 | 106 | 0 |
- | Code to Test Ratio | 1:0.5 | 1:0.5 | -0.1 |
| Code | 1408 | 1409 | +1 |
| Test | 777 | 777 | 0 |
- | Test Execution Time | 1s | 2s | +1s |Reported by octocov |
gh-counterPR gate
Repo dashboard
Reported by gh-counter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expose the
luckyboolean as an action output so downstream workflow steps can branch on whether a lucky commit or PR number was found.action.yml: declareoutputs.luckywith descriptionsrc/index.ts: callcore.setOutput('lucky', ...)after building the messageMotivation
Previously, callers had to parse PR comments to determine if the action found a lucky commit. With this output, downstream steps can use
steps.<id>.outputs.luckydirectly.Test plan
bun run test)bun run build)bun run lint)