-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WorkflowDispatchConfig supports multiple yaml node kinds #2123
WorkflowDispatchConfig supports multiple yaml node kinds #2123
Conversation
TBH, I don't think it's more robust, it will cause inconsistent behavior. And I don't see any reason why it should support |
I checked the yaml spec, chapter So I think this parse method is flow yaml spec, which is better than following the special restrictions of github; especially when this act will be widely used by other gitxxx. It's just my suggestion, but if you think it's better to follow github, I'll just delete the nested processing part. |
Please let me clarify, I'm not talking about the yaml specification. Of course, |
Okay, here I flow github and add support for the following types:
|
There is another change. When workflow_dispatch is not defined, return nil
Such cases pre returned non-nil |
@pangliang this pull request has failed checks 🛠 |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2123 +/- ##
==========================================
- Coverage 61.22% 60.91% -0.31%
==========================================
Files 46 53 +7
Lines 7141 8988 +1847
==========================================
+ Hits 4372 5475 +1103
- Misses 2462 3072 +610
- Partials 307 441 +134 ☔ View full report in Codecov by Sentry. |
Sorry, I accidentally clicked the 'Re-request review' icon in the 'Reviewers' list of a pull-request page |
* WorkflowDispatchConfig supports ScalarNode and SequenceNode yaml node kinds * Avoid using log.Fatal * package slices is not in golang 1.20 --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
I was working on PR go-gitea/gitea#28163 . and found that the
workflow.WorkflowDispatchConfig()
method cannot be parsed correctly when the yaml node is not a mapping type