Expand description
§monochange_hosting
monochange_hosting packages the shared git and HTTP plumbing used by hosted source providers.
Reach for this crate when you are implementing GitHub, Gitea, Forgejo, or GitLab release adapters and want one place for release-body rendering, change-request branch naming, JSON requests, and git branch orchestration.
§Why use it?
- keep provider adapters focused on provider-specific payloads instead of repeated plumbing
- share one markdown rendering path for release bodies and release pull requests
- reuse one set of blocking HTTP helpers with consistent error messages
§Best for
- implementing or testing hosted source adapters
- generating release pull request bodies from prepared manifests
- staging, committing, and pushing release branches through shared wrappers
§Public entry points
release_body(source, manifest, target)resolves the outward release body for a targetrelease_pull_request_body(manifest)renders the provider change-request bodyrelease_pull_request_branch(prefix, command)normalizes the change-request branch nameget_json,post_json,patch_json, andput_jsonwrap provider API requestsgit_checkout_branch,git_stage_paths,git_commit_paths, andgit_push_branchwrap shared git operations
Functions§
- build_
http_ client - Build a blocking HTTP client for provider API calls.
- get_
json - Perform a GET request and deserialize a successful JSON response.
- get_
optional_ json - Perform a GET request that treats
404asOk(None). - git_
checkout_ branch - Check out or reset the local release branch used for provider requests.
- git_
commit_ paths - Commit the prepared release changes, tolerating a no-op commit.
- git_
push_ branch - Push the release branch to
originwith--force-with-lease. - git_
stage_ paths - Stage the provided paths before creating a release commit.
- minimal_
release_ body - Render a fallback release body when no changelog body is available.
- patch_
json - Perform a PATCH request and deserialize a successful JSON response.
- post_
json - Perform a POST request and deserialize a successful JSON response.
- push_
body_ entries - Append release-note entries to a markdown body, normalizing bullet formatting.
- put_
json - Perform a PUT request and deserialize a successful JSON response.
- release_
body - Resolve the provider release body for one outward release target.
- release_
pull_ request_ body - Render the markdown body used for provider release requests.
- release_
pull_ request_ branch - Build the provider change-request branch for a release command.