public Task UpdateAsync(IssueResults results, CancellationToken token)
        {
            var options = new UpdateOptions
            {
                BypassDocumentValidation = false
            };

            var updated = Builders <IssueResults> .Update
                          .Set(t => t.State, results.State)
                          .Set(t => t.Issues, results.Issues);

            return(_collection.UpdateOneAsync(t => t.Id == results.Id, updated, options, token));
        }
        public async Task <IssueResults> CreateAsync(CancellationToken token)
        {
            var options = new InsertOneOptions
            {
                BypassDocumentValidation = false
            };

            var results = new IssueResults
            {
                Id     = Guid.NewGuid(),
                State  = IssueResultState.Created,
                Issues = Array.Empty <Issue>()
            };

            await _collection.InsertOneAsync(results, options, token);

            return(results);
        }