File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,6 +105,29 @@ report.outcomes.each do |o|
105105end
106106report . warnings . each { |w | warn " ! #{ w } " }
107107
108+ if ( summary_path = ENV [ "GITHUB_STEP_SUMMARY" ] )
109+ File . open ( summary_path , "a" ) do |f |
110+ f . puts "### Update summary"
111+ f . puts ""
112+ f . puts "Dry run: #{ options [ :dry_run ] } "
113+ f . puts ""
114+ if plan . warnings . any?
115+ f . puts "**Plan warnings:**"
116+ f . puts ""
117+ plan . warnings . each { |w | f . puts "- #{ w } " }
118+ f . puts ""
119+ end
120+ f . puts "Reconciler ignored #{ reconciled . ignored . size } foreign PR(s)."
121+ f . puts ""
122+ f . puts "| Branch | PR | Action | Status | Detail |"
123+ f . puts "| --- | --- | --- | --- | --- |"
124+ report . outcomes . each do |o |
125+ f . puts "| #{ o . branch || "?" } | #{ o . pr_number ? "##{ o . pr_number } " : "" } | #{ o . type } | #{ o . status } | #{ o . detail } |"
126+ end
127+ report . warnings . each { |w | f . puts "> [!WARNING]" ; f . puts "> #{ w } " }
128+ end
129+ end
130+
108131# Exit non-zero only if any non-skipped outcome failed; in dry run all are
109132# skipped, which is a successful run.
110133exit ( report . outcomes . any? ( &:failed? ) ? 1 : 0 )
You can’t perform that action at this time.
0 commit comments