Refactor notification support (#2363)

* Add teams notifications

* .

* Fix compilation isues

* Checkpoint

* Added Ado

* Fix some TODOs

* Teams messages work! 🎉

* fmt

* Bug fix container url generator

* Some small ado changes

* 🧹

* PR comments

* Fix packages

* Get more detailed restore information to debug errors

* Maybe fixes this issue?

* Undo CI change
This commit is contained in:
Teo Voinea
2022-09-14 11:07:52 -04:00
committed by GitHub
parent f375ee719e
commit ca7b6be43b
21 changed files with 1382 additions and 330 deletions

View File

@ -29,6 +29,8 @@ public interface IContainers {
public Async.Task<Uri> AddContainerSasUrl(Uri uri, TimeSpan? duration = null);
public Async.Task<Dictionary<Container, IDictionary<string, string>>> GetContainers(StorageType corpus);
public string AuthDownloadUrl(Container container, string filename);
}
public class Containers : IContainers {
@ -215,4 +217,14 @@ public class Containers : IContainers {
return new(data.SelectMany(x => x));
}
public string AuthDownloadUrl(Container container, string filename) {
var instance = _config.OneFuzzInstance;
var queryString = System.Web.HttpUtility.ParseQueryString(string.Empty);
queryString.Add("container", container.String);
queryString.Add("filename", filename);
return $"{instance}/api/download?{queryString}";
}
}