@@ -15,6 +15,7 @@ public sealed class MinimalPermissionsPluginReportApiResult
1515 public required IEnumerable < string > MinimalPermissions { get ; init ; }
1616 public required IEnumerable < string > Requests { get ; init ; }
1717 public required IEnumerable < string > TokenPermissions { get ; init ; }
18+ public string ? SchemeName { get ; init ; }
1819}
1920
2021public sealed class MinimalPermissionsPluginReport : IMarkdownReport , IPlainTextReport
@@ -26,7 +27,7 @@ public sealed class MinimalPermissionsPluginReport : IMarkdownReport, IPlainText
2627 public string ? ToMarkdown ( )
2728 {
2829 var sb = new StringBuilder ( ) ;
29- _ = sb . AppendLine ( $ "# Minimal permissions report") ;
30+ _ = sb . AppendLine ( "# Minimal permissions report" ) ;
3031
3132 foreach ( var apiResult in Results )
3233 {
@@ -36,9 +37,18 @@ public sealed class MinimalPermissionsPluginReport : IMarkdownReport, IPlainText
3637 . AppendLine ( "### Requests" )
3738 . AppendLine ( )
3839 . AppendJoin ( Environment . NewLine , apiResult . Requests . Select ( r => $ "- { r } ") )
39- . AppendLine ( )
40+ . AppendLine ( ) ;
4041
41- . AppendLine ( )
42+ if ( ! string . IsNullOrWhiteSpace ( apiResult . SchemeName ) )
43+ {
44+ _ = sb . AppendLine ( )
45+ . AppendLine ( "### Scheme definition name" )
46+ . AppendLine ( )
47+ . AppendLine ( CultureInfo . InvariantCulture , $ "- { apiResult . SchemeName } ")
48+ . AppendLine ( ) ;
49+ }
50+
51+ _ = sb . AppendLine ( )
4252 . AppendLine ( "### Minimal permissions" )
4353 . AppendLine ( )
4454 . AppendJoin ( Environment . NewLine , apiResult . MinimalPermissions . Select ( p => $ "- { p } ") )
@@ -65,7 +75,7 @@ public sealed class MinimalPermissionsPluginReport : IMarkdownReport, IPlainText
6575 {
6676 var sb = new StringBuilder ( ) ;
6777
68- _ = sb . AppendLine ( $ "Minimal permissions report") ;
78+ _ = sb . AppendLine ( "Minimal permissions report" ) ;
6979
7080 foreach ( var apiResult in Results )
7181 {
@@ -75,8 +85,18 @@ public sealed class MinimalPermissionsPluginReport : IMarkdownReport, IPlainText
7585 . AppendLine ( "Requests:" )
7686 . AppendLine ( )
7787 . AppendJoin ( Environment . NewLine , apiResult . Requests . Select ( r => $ "- { r } ") )
78- . AppendLine ( )
79- . AppendLine ( )
88+ . AppendLine ( ) ;
89+
90+ if ( ! string . IsNullOrWhiteSpace ( apiResult . SchemeName ) )
91+ {
92+ _ = sb . AppendLine ( )
93+ . AppendLine ( "Scheme definition name:" )
94+ . AppendLine ( )
95+ . AppendLine ( CultureInfo . InvariantCulture , $ "- { apiResult . SchemeName } ")
96+ . AppendLine ( ) ;
97+ }
98+
99+ _ = sb . AppendLine ( )
80100 . AppendLine ( "Minimal permissions:" )
81101 . AppendLine ( )
82102 . AppendJoin ( Environment . NewLine , apiResult . MinimalPermissions . Select ( p => $ "- { p } ") ) ;
0 commit comments