include-commit-authors has no effect because author metadata is dropped in parseConventionalCommits()

Open Beginner friendly
#2,761 1 comment 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
release, tooling

Research direction

Start in src/commit.ts at parseConventionalCommits(), then inspect the existing DefaultChangelogNotes tests and the full commit-to-changelog path. Preserve the fetched author metadata when creating ConventionalCommit objects and add a regression test showing that enabled author attribution reaches rendered changelog entries.

Written by the indexing model from the issue text.

Description

priority: p2 type: bug
What happened

I enabled include-commit-authors: true in a manifest-based setup, but generated changelog entries still do not include (@username) or author name.

This was reproduced via release-please-action@v5.0.0 with manifest config, and the release PR was refreshed after the config change. The PR content updated, but changelog entries still had no author suffixes.

Expected

When include-commit-authors is enabled, changelog entries should include:

  • (@username) when a GitHub username is available
  • author name otherwise
Actual

The changelog renders normally, but author attribution is never appended.

Reproduction

Minimal shape:

{
  "include-commit-authors": true,
  "packages": {
    ".": {
      "release-type": "elixir",
      "changelog-type": "default"
    }
  }
}

Then run release-please on a repo with normal releasable commits. The release PR is generated or updated, but changelog entries do not show author info.

Suspected cause

I traced the released source and it looks like the config and renderer are wired correctly:

  • config parsing reads include-commit-authors
  • strategy passes includeCommitAuthors into changelog note generation
  • GitHub commit fetching populates raw Commit.author
  • DefaultChangelogNotes appends author info when options.includeCommitAuthors && commit.author

But parseConventionalCommits() appears to drop the author field when converting Commit into ConventionalCommit, so by the time changelog notes are rendered, commit.author is gone.

The problematic shape seems to be here in src/commit.ts:

conventionalCommits.push({
  sha: commit.sha,
  message: parsedCommit.header,
  files: commit.files,
  pullRequest: commit.pullRequest,
  type: parsedCommit.type,
  scope: parsedCommit.scope,
  bareMessage: parsedCommit.subject,
  notes: parsedCommit.notes,
  references: parsedCommit.references,
  breaking,
});

It looks like author: commit.author needs to be preserved there.

Additional note

The existing tests for this feature seem to cover DefaultChangelogNotes in isolation with handcrafted commits that already include author, but not the full path through parseConventionalCommits(). That may be why this slipped through.

If useful, I can open a PR with the minimal fix plus a regression test.

Dominant language
TypeScript
Stars
7.5k
Forks
589
Avg merge
14h 14m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from googleapis/release-please

All issues in googleapis/release-please

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.