#[non_exhaustive]pub struct Attribution {
pub commit: Option<String>,
pub pr: Option<String>,
pub session_url: Option<bool>,
pub extra: Extra,
}Expand description
attribution: what Claude Code adds to commits and pull requests.
Customize the attribution Claude Code adds to git commits and pull requests. Commits get a
git trailer such as Co-Authored-By by
default; pull request descriptions get plain text.
Docs: attribution.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.commit: Option<String>Set the attribution text Claude Code adds to git commits, including any trailers. Set it to an empty string to hide commit attribution.
- Values: string
- Default: unset, so Claude Code adds
Co-Authored-By: <name> <noreply@anthropic.com>. The name is the model in use when the commit is made, such asClaude Sonnet 5. When a subagent makes the commit, the trailer names the subagent’s model. * When Claude Code recognizes the model as a Claude model but can’t confirm its exact version, it writesClaudealone. * When it can’t match the model ID to any Claude model, such as a third-party model served through a customANTHROPIC_BASE_URL, it writesClaude Code. - Scope: any settings file.
Docs: commit.
pr: Option<String>Set the attribution text Claude Code adds to pull request descriptions. Set it to an empty string to hide pull request attribution.
- Values: string
- Default: unset, so Claude Code adds
🤖 Generated with [Claude Code](https://claude.com/claude-code) - Scope: any settings file.
Docs: pr.
session_url: Option<bool>Choose whether Claude Code appends the claude.ai session link when it commits or opens a
pull request from a cloud or
Remote Control session. Claude Code
adds the link as a Claude-Session trailer on commits and as a link in pull request
descriptions. Set it to false to omit the link.
- Values: Boolean
true: Claude Code appends the claude.ai session link when it commits or opens a pull request from a cloud or Remote Control sessionfalse: Claude Code omits the link
- Default:
true - Scope: any settings file.
Docs: sessionUrl.
extra: ExtraKeys Claude Code accepts here that this crate doesn’t model (newer or undocumented ones), kept as written so the document round-trips.