File tree Expand file tree Collapse file tree 1 file changed +4
-18
lines changed
make_release/release-note Expand file tree Collapse file tree 1 file changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -140,29 +140,15 @@ def add-notice [type: string, message: string]: record -> record {
140
140
141
141
# Print all of the notices associated with a PR
142
142
def display-notices []: table -> nothing {
143
- # Create row with PR info for each notice
144
- | each {|pr |
145
- get notices | each {|e |
146
- $pr | insert type $e.type | insert message $e.message
147
- }
148
- }
149
- | flatten
150
- | group-by -- to-table type
151
- | sort-by - r type
152
- | each {|e | $e.items | display-notice-type $e.type }
153
- | ignore
154
- }
155
-
156
- # Print notices of a certain type
157
- def display-notice-type [type : string ]: table -> nothing {
158
143
let prs = $in
159
144
let colors = {error : (ansi red ), warning : (ansi yellow )}
160
- let color = $colors | get $type
161
145
162
146
$prs
163
- | group-by message -- to-table
164
- | sort-by message
147
+ | flatten - a notices
148
+ | group-by -- to-table type message
149
+ | sort-by - r type
165
150
| each {|e |
151
+ let color = $colors | get $e.type
166
152
print $" ($color )PRs with ($e.message ):"
167
153
$e.items | each { format-pr | print $" - ($in )" }
168
154
print " "
You can’t perform that action at this time.
0 commit comments