feat: Add GitHub Releases API support#9
Merged
ralflang merged 1 commit intoFRAMEWORK_6_0from Feb 26, 2026
Merged
Conversation
Add comprehensive support for GitHub Releases API with the following features:
- Create releases for existing tags
- Get release by tag name
- Update existing releases
- Upload assets to releases
New value objects:
- GithubRelease: represents a GitHub release with all metadata
- GithubReleaseAsset: represents uploaded release assets
New DTOs:
- CreateReleaseParams: parameters for creating a release (tagName, name, body, draft, prerelease, targetCommitish)
- UpdateReleaseParams: parameters for updating a release (all fields optional)
New request factories:
- CreateReleaseRequestFactory: POST /repos/{owner}/{repo}/releases
- GetReleaseByTagRequestFactory: GET /repos/{owner}/{repo}/releases/tags/{tag}
- UpdateReleaseRequestFactory: PATCH /repos/{owner}/{repo}/releases/{id}
- UploadReleaseAssetRequestFactory: POST to upload_url with file content
Added 4 methods to GithubApiClient:
- createRelease(): create a new release
- getReleaseByTag(): retrieve release by tag name
- updateRelease(): update release metadata
- uploadReleaseAsset(): upload binary assets to a release
Dependencies:
- Added PSR-7 (psr/http-message)
- Added PSR-17 (psr/http-factory)
- Added PSR-18 (psr/http-client)
Tests:
- 58 new unit tests covering all release functionality
- Tests for DTOs, value objects, request factories, and client methods
- Tests for error cases (404, 422, missing StreamFactory)
- All tests passing (143 total tests, 478 assertions)
The implementation follows established patterns from the codebase:
- Request Factory pattern for API endpoints
- Value Objects with fromApiResponse() static factories
- DTOs with toArray() for request payloads
- StreamFactory requirement for write operations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add comprehensive support for the GitHub Releases API, enabling creation, retrieval, updates, and asset uploads for releases.
Features
API Methods (4 new)
Value Objects
DTOs
Request Factories
Implementation Details
fromApiResponse()static factoriestoArray()for request payloadsDependencies Added
psr/http-client^1.0 (PSR-18)psr/http-factory^1.0 (PSR-17)psr/http-message^2.0 (PSR-7)Testing
Test Coverage
Test Categories
Example Usage
Checklist