googleapis / googleapis/release-please

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

Open
#2,761 1 comment 10 reactions 0 assignees View on GitHub
priority: p2 type: bug
Dominant language
TypeScript
Stars
7.5k
Forks
588
Avg merge
12h 16m
Merged PRs (30d)
7

Description

### 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:

```json
{
"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`:

```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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.