Skip to content

Authoring Module Reference

The authoring module controls how commit author information is handled.

Preserve original author when possible:

authoring.pass_thru(
default = "Bot <bot@example.com>", # Fallback author
)

Replace all authors:

authoring.overwrite(
"Bot <bot@example.com>", # Author for all commits
)

Allow specific authors, default for others:

authoring.allowed(
default = "Bot <bot@example.com>", # Fallback author
allowlist = [ # Preserved authors
"alice@example.com",
"bob@example.com",
],
)

Authors use Git standard format:

Name <email@example.com>
authoring = authoring.pass_thru(
default = "Open Source Bot <oss@company.com>",
)
authoring = authoring.overwrite(
"Sync Bot <sync@company.com>",
)
authoring = authoring.allowed(
default = "External <external@company.com>",
allowlist = [
"*@company.com",
],
)

The allowlist parameter supports glob-style patterns:

PatternMatches
alice@example.comExact email match
*@company.comAny email at company.com
*@*.company.comAny subdomain email

When using authoring.allowed and an author isn’t in the allowlist:

  1. Commit is attributed to the default author
  2. Original author is preserved in the commit message body (configurable)
  3. The transformation continues normally

If the source commit has a malformed author (missing email, empty name), Copybara uses the default author.

Git distinguishes between author (who wrote the code) and committer (who applied it). Copybara’s authoring module affects the author field. The committer is typically the user/bot running Copybara.

Use CaseAuthoring Mode
Open source export (preserve contributors)pass_thru
Automated sync (bot attribution)overwrite
Internal → External (allow known devs)allowed
Mirror (exact copy)pass_thru