Expand description
§monochange_github
monochange_github turns monochange release manifests into GitHub automation requests.
Reach for this crate when you want to preview or publish GitHub releases and release pull requests using the same structured release data that powers changelog files and release manifests.
§Why use it?
- derive GitHub release payloads and release-PR bodies from
monochange’s structured release manifest - keep GitHub automation aligned with changelog rendering and release targets
- reuse one publishing path for dry-run previews and real repository updates
§Best for
- building GitHub release automation on top of
mc release - previewing would-be GitHub releases and release PRs in CI before publishing
- converting grouped or package release targets into repository automation payloads
§Public entry points
build_release_requests(config, manifest)converts a release manifest into GitHub release requestspublish_release_requests(requests)publishes requests through the GitHub API viaoctocrabbuild_release_pull_request_request(config, manifest)converts a release manifest into a GitHub release-PR requestpublish_release_pull_request(root, request, tracked_paths)creates or updates a release PR throughgitand the GitHub API
§Example
use monochange_core::ProviderBotSettings;
use monochange_core::ProviderMergeRequestSettings;
use monochange_core::ProviderReleaseSettings;
use monochange_core::SourceConfiguration;
use monochange_core::SourceProvider;
use monochange_core::ReleaseManifest;
use monochange_core::ReleaseManifestPlan;
use monochange_core::ReleaseManifestTarget;
use monochange_core::ReleaseOwnerKind;
use monochange_core::VersionFormat;
use monochange_github::build_release_requests;
let manifest = ReleaseManifest {
command: "release".to_string(),
dry_run: true,
version: Some("1.2.0".to_string()),
group_version: Some("1.2.0".to_string()),
release_targets: vec![ReleaseManifestTarget {
id: "sdk".to_string(),
kind: ReleaseOwnerKind::Group,
version: "1.2.0".to_string(),
tag: true,
release: true,
version_format: VersionFormat::Primary,
tag_name: "v1.2.0".to_string(),
members: vec!["core".to_string(), "app".to_string()],
rendered_title: "1.2.0 (2026-04-06)".to_string(),
rendered_changelog_title: "[1.2.0](https://example.com) (2026-04-06)".to_string(),
}],
released_packages: vec!["workflow-core".to_string(), "workflow-app".to_string()],
changed_files: Vec::new(),
changesets: Vec::new(),
changelogs: Vec::new(),
deleted_changesets: Vec::new(),
plan: ReleaseManifestPlan {
workspace_root: std::path::PathBuf::from("."),
decisions: Vec::new(),
groups: Vec::new(),
warnings: Vec::new(),
unresolved_items: Vec::new(),
compatibility_evidence: Vec::new(),
},
};
let github = SourceConfiguration {
provider: SourceProvider::GitHub,
owner: "ifiokjr".to_string(),
repo: "monochange".to_string(),
host: None,
api_url: None,
releases: ProviderReleaseSettings::default(),
pull_requests: ProviderMergeRequestSettings::default(),
bot: ProviderBotSettings::default(),
};
let requests = build_release_requests(&github, &manifest);
assert_eq!(requests.len(), 1);
assert_eq!(requests[0].tag_name, "v1.2.0");
assert_eq!(requests[0].repository, "ifiokjr/monochange");Structs§
- GitHub
Hosted Source Adapter - Hosted-source adapter for GitHub repositories.
Statics§
- HOSTED_
SOURCE_ ADAPTER - Shared GitHub hosted-source adapter instance used by the workspace.
Functions§
- annotate_
changeset_ context - Apply GitHub URLs and provider metadata without making remote API calls.
- build_
release_ pull_ request_ request - Build the release pull request request for the configured GitHub repository.
- build_
release_ requests - Convert releasable targets into provider-specific GitHub release requests.
- comment_
released_ issues - Create release comments on linked GitHub issues when they have not been posted yet.
- compare_
url - URL comparing two tags on the GitHub repository.
- enrich_
changeset_ context - Enrich changeset context with remote GitHub review-request and issue data.
- github_
commit_ url - Build a web URL for a commit on the configured GitHub repository.
- github_
host - Extract the host name used for rendered GitHub links.
- github_
hosting_ capabilities - Return the hosting metadata features available from GitHub changeset context.
- github_
issue_ url - Build a web URL for an issue on the configured GitHub repository.
- github_
pull_ request_ url - Build a web URL for a pull request on the configured GitHub repository.
- github_
web_ base_ url - Return the GitHub web base URL for building browser links.
- plan_
released_ issue_ comments - Plan release comments for issues that are closed by the manifest’s review requests.
- publish_
release_ pull_ request - Commit, push, and publish the release pull request against GitHub.
- publish_
release_ requests - Publish or update all planned GitHub releases for a manifest.
- source_
capabilities - Return the hosted-source capabilities supported by the GitHub provider.
- sync_
retargeted_ releases - Sync existing GitHub releases so retargeted tags point at the new commits.
- tag_url
- URL to a specific tag on the GitHub repository.
- validate_
source_ configuration - Validate that a source configuration is compatible with the GitHub provider.
Type Aliases§
- GitHub
Issue Comment Operation - Shared issue-comment operation type for GitHub issue release comments.
- GitHub
Issue Comment Outcome - Shared issue-comment outcome type for GitHub issue release comments.
- GitHub
Issue Comment Plan - Shared issue-comment planning type for GitHub issue release comments.
- GitHub
Pull Request Operation - GitHub
Pull Request Outcome - GitHub
Pull Request Request - GitHub
Release Operation - GitHub
Release Outcome - GitHub
Release Request