Skip to content

GitHub: Use PR title and body for squash commits #17467

Description

@kevinjqliu

Problem

When clicking Squash and merge, GitHub displays a generated title and body for the resulting commit. The current defaults behave differently depending on the number of commits:

  • For a single-commit pull request, GitHub uses the commit title and body.
  • For a multi-commit pull request, GitHub uses the pull request title and messages from the branch commits.

As a result, the generated squash commit may not reflect the reviewed pull request title and description, leaving less useful history on main.

Examples:

Options

GitHub allows repositories to customize these defaults. We should choose settings that better match Iceberg’s workflow.

Commit title:

  • COMMIT_OR_PR_TITLE: Use the commit title for single-commit PRs and the PR title otherwise.
  • PR_TITLE: Always use the PR title.

Commit body:

  • COMMIT_MESSAGES: Use branch commit messages.
  • PR_BODY: Use the PR description.
  • BLANK: Leave the body empty.

[GitHub documents these options here](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#update-a-repository).

Proposal

Request that ASF Infra configure squash merges to use:

  • PR_TITLE
  • PR_BODY

A squash merge represents the PR as one logical change. Its reviewed title and description are better durable history than development commit messages. This produces consistent results regardless of commit count, follows Iceberg’s Module: Description convention, and preserves useful context that BLANK would discard.

We probably need to file a ticket with ASF Infra to make the change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions