chore: add DefaultHeadersMiddleware and release-please automation - #10
Open
grdsdev wants to merge 2 commits into
Open
chore: add DefaultHeadersMiddleware and release-please automation#10grdsdev wants to merge 2 commits into
grdsdev wants to merge 2 commits into
Conversation
…cept-Language headers - Add DefaultHeadersMiddleware that automatically injects default HTTP headers (User-Agent, Accept-Encoding, Accept-Language) into outgoing requests - Add Version.swift exposing the library version string (0.4.0) - Update Client.init to use DefaultHeadersMiddleware by default when no middlewares are provided (middlewares parameter now optional) - Update test to assert default middleware is applied on init
- Add release-please-config.json (simple release type, extra-files for Version.swift) - Add .release-please-manifest.json seeded at v0.4.0 - Add .github/workflows/release-please.yml workflow - Annotate Version.swift with x-release-please markers for automatic version bumping
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
DefaultHeadersMiddleware
DefaultHeadersMiddlewarethat automatically injectsUser-Agent,Accept-Encoding, andAccept-Languageheaders into every outgoing request (only when not already set by the caller)Version.swiftexposing the library version string, used in theUser-AgentheaderClient.initsomiddlewaresis now optional (nilby default), falling back to[DefaultHeadersMiddleware()]when not providedRelease Please automation
release-please-config.json—simplerelease type withVersion.swiftregistered as an extra file to keep in sync.release-please-manifest.jsonseeded atv0.4.0.github/workflows/release-please.yml— runs on every push tomain, opens/updates a Release PR and creates GitHub Releases + git tags on mergeVersion.swiftwithx-release-pleasemarkers so the version string is bumped automatically