Exemple #1
0
        public IActionResult WebhookReceived(int projectId, [FromBody] GitHookRequest request)
        {
            var handler = new GitHubWebHookHandler();

            handler.Handle(request);

            return(new OkResult());
        }
        public void Test1()
        {
            // Arrange
            var json    = System.IO.File.ReadAllText("BranchCreatedWebHookRequest.json");
            var request = Newtonsoft.Json.JsonConvert.DeserializeObject <GitHookRequest>(json);
            var handler = new GitHubWebHookHandler();

            // Act
            var result = handler.Handle(request);

            // Assert
            Assert.True(result.Succeded);
        }
Exemple #3
0
        public async Task <IActionResult> GenerateJWTToken(WebHookEvent webHookEvent)
        {
            await _gitHubWebHookHandler.Handle(webHookEvent);

            return(Ok());
        }