Skip to content

API for common ancestor #1442

Open
Open
@ikonst

Description

IIUC, danger.git.base is

  • master on local
  • base branch's current sha on CI

A common ancestor with base is useful to compare against the starting point of a PR.

For example, consider checking a change to an API being backwards compatible. In my PR, I'm adding a field foo which is a backward compatible change. It's possible that someone else has merged a change to the base branch adding field bar. My PR is not removing field bar but if I compare the two files naively, it would appear as if my PR removes field bar.

In terms of git, it's essentially the result of git merge-base ${danger.git.head} ${danger.git.base}.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions