@@ -61,6 +61,10 @@ public async Task<IActionResult> Receive()
61
61
payloadText = await reader . ReadToEndAsync ( ) . ConfigureAwait ( false ) ;
62
62
}
63
63
64
+ System . IO . File . WriteAllText ( $ "/config/payloads/{ delivery } ", $ "Signature: { signature } \n ") ;
65
+ System . IO . File . AppendAllText ( $ "/config/payloads/{ delivery } ", $ "Event: { strEvent } \n Payload:\n ") ;
66
+ System . IO . File . AppendAllText ( $ "/config/payloads/{ delivery } ", payloadText ) ;
67
+
64
68
var calcSig = Util . CalculateSignature ( payloadText , signature , _config . Secret , "sha1=" ) ;
65
69
66
70
@@ -226,56 +230,11 @@ private static MattermostMessage GetMessagePush(PushEvent payload)
226
230
retVal . Text =
227
231
$ "{ userMd } pushed { payload . commits . Count } commit{ multi } to { branchMd } on { repoMd } ";
228
232
229
-
230
-
231
233
att = new MattermostAttachment ( ) ;
232
-
233
- var tmpAdded = new MattermostField
234
- {
235
- Short = true ,
236
- Title = "Added"
237
- } ;
238
- var tmpRemoved = new MattermostField
239
- {
240
- Short = true ,
241
- Title = "Removed"
242
- } ;
243
- var tmpModified = new MattermostField
244
- {
245
- Short = true ,
246
- Title = "Modified"
247
- } ;
248
234
249
235
foreach ( var commit in payload . commits )
250
236
{
251
237
att . Text += $ "- [`{ commit . id . Substring ( 0 , 8 ) } `]({ commit . url } ) - { commit . message . Replace ( "\n " , " " ) } \n ";
252
- if ( commit . added . Any ( ) )
253
- {
254
- tmpAdded . Value +=
255
- commit . added . Aggregate ( "" , ( current , added ) => current + $ "`{ added } `\n ") ;
256
- }
257
-
258
- if ( commit . removed . Any ( ) )
259
- {
260
- tmpRemoved . Value +=
261
- commit . removed . Aggregate ( "" , ( current , removed ) => current + $ "`{ removed } `\n ") ;
262
- }
263
-
264
- if ( commit . modified . Any ( ) )
265
- {
266
- tmpModified . Value +=
267
- commit . modified . Aggregate ( "" , ( current , modified ) => current + $ "`{ modified } `\n ") ;
268
- }
269
- }
270
-
271
- if ( _config . VerboseCommitMessages )
272
- {
273
- att . Fields = new List < MattermostField >
274
- {
275
- tmpAdded ,
276
- tmpRemoved ,
277
- tmpModified
278
- } ;
279
238
}
280
239
281
240
}
0 commit comments