Skip to content

app-master-286

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 21 Jan 04:42
ec69e88
Sb/GitHub workflow prototype (#35)

* Add GitHub App authentication and webhook validation infrastructure

- Add GithubAppOptions for configuration management
- Implement GitHubClientFactory with JWT-based authentication and token caching
- Add GithubWebhookSignatureValidator for secure webhook validation using HMAC-SHA256
- Add GithubHeaderNames constants for webhook headers
- Add ServiceCollectionExtensions for DI registration
- Add Octokit package dependency for GitHub API integration

* Add GitHub webhook middleware and reverse proxy routing

- Implement GithubWebhookMiddleware for webhook signature validation and correlation ID extraction
- Register GitHub services in DI container
- Add reverse proxy route for workflow webhooks with correlation ID header matching
- Configure middleware pipeline to validate webhooks before proxying to Functions app

* Implement GitHub workflow orchestration with Durable Functions

- Add WorkflowOrchestrator for managing workflow execution lifecycle with automatic retries
- Implement TriggerWorkflowActivity to dispatch GitHub workflows with correlation tracking
- Implement RerunFailedJobActivity for automatic workflow retry on failure
- Add WorkflowWebhook to receive and process GitHub webhook events
- Define GithubWorkflowEvent models matching GitHub webhook payload structure
- Add FunctionAppIdentifiers for correlation ID tracking
- Register GitHub services and add Durable Functions extension
- Add Octokit package dependency for GitHub API integration

* Add GitHub App configuration settings

- Add Github configuration section with App ID, installation ID, and webhook settings
- Configure workflow timeout and retry attempt limits
- Add development settings with example values
- Update KeyVault name reference to kv-was-dev for consistency

* docs(app): Added docs to setup github workflow

* Reference GithubHeaderNames.WorkflowCorrelationId constant in documentation (#37)

* Initial plan

* docs: Reference GithubHeaderNames.WorkflowCorrelationId constant in documentation

Co-authored-by: Sumedhbhat <55052275+Sumedhbhat@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Sumedhbhat <55052275+Sumedhbhat@users.noreply.github.com>

* Fix critical correctness bugs in GitHub workflow orchestration POC (#38)

* Initial plan

* P0 fixes: retry loop, timeout exception, RerunFailedJobs API, token expiry

Co-authored-by: christianacca <886590+christianacca@users.noreply.github.com>

* P1 fixes: token refresh buffer, robust correlation extraction, header routing security, WorkflowTimeoutHours visibility

Co-authored-by: christianacca <886590+christianacca@users.noreply.github.com>

* P2 fixes: null-check for workflow conclusion, configurable ProductHeaderValue

Co-authored-by: christianacca <886590+christianacca@users.noreply.github.com>

* Address code review feedback: fix duplicate calculation and add URL encoding

Co-authored-by: christianacca <886590+christianacca@users.noreply.github.com>

* Revert WorkflowTimeoutHours to private visibility

Co-authored-by: Sumedhbhat <55052275+Sumedhbhat@users.noreply.github.com>

* Address PR feedback: remove comments, use Octokit RerunFailedJobs, revert to HeaderPrefix routing

Co-authored-by: Sumedhbhat <55052275+Sumedhbhat@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: christianacca <886590+christianacca@users.noreply.github.com>
Co-authored-by: Sumedhbhat <55052275+Sumedhbhat@users.noreply.github.com>

* fix(app): Removed Validate on start, moved function identifiers and used inbuilt functions for signature validation

* chore(deps): Update Entity Framework Core to version 10.0.2

* feat(workflow): Add workflow status polling infrastructure

Add JSON converters for workflow enums, Octokit enum mapper utility, and new activity to query GitHub API for workflow run status. This infrastructure enables the orchestrator to poll for workflow completion when webhooks are delayed or missed.

* feat(workflow): Implement timeout handling with status polling

Update orchestrator to poll GitHub API for workflow status when webhook events time out. This ensures the system can gracefully handle cases where webhooks are delayed or don't arrive, improving reliability of the workflow monitoring.

* refactor(github): Refactor client factory to use properties

Convert private fields to properties with improved naming conventions and initialization. This improves code maintainability and follows C# best practices for encapsulation.

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: christianacca <886590+christianacca@users.noreply.github.com>