Hello,
I am trying to create a Discord plugin as a task plugin. It should send a message to discord webhook with data about all previous stages and Material changes that triggered the pipeline.
I have 90% of it done, but I am missing how can I get the previous stages info from plugin. I tried to query requestBody, but it has only environment variables and config for Discord webhook. I uploaded the body contents I am getting.
Basically, I need this Json. Any idea how to get it?
{
"PipelineChange":
[
{
"Index": 111,
"Author": "John",
"Changed_Files":[
"Assets/Code/Test.cs",
"Assets/Code/Foo.cs"
]
},
{
"Index": 112,
"Author": "Jane",
"Changed_Files":[
"Assets/Code/Bar.cs"
]
}
],
"Previous_Stages":[
{
"Name": "Build Windows",
"State": "Passed"
},
{
"Name": "Build Mac",
"State": "Failed"
}
]
}