Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-branch

GitHub Action

Detect Branch Changes

v0.1.2

Detect Branch Changes

git-branch

Detect Branch Changes

Detect all changes in a branch. This is done by detecting the fork-point of the current branch with the repo's base branch.

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Detect Branch Changes

uses: younited/[email protected]

Learn more about this action in younited/detect-branch-changes-action

Choose a version

Detect Branch Changes

This is a GitHub Action allows you to detect all changes in a branch. This is done by detecting the fork-point of the current branch with the repo's main branch.

Inputs

  • base_branch - Branch where the fork-point will be found on. Defaults to the repo's default_branch.
  • pathspec - Which paths should be considered to detect changes on. This path spec must be compattible with the git diff command.

Outputs

  • changed - Returns "true" or "false" if files where changed on since the current branche forked from base_branch
  • fork_point_sha - The commit sha that is considered the fork point between this branch and and the base_branch

Usage

Detect all changes (default behaviour)

- uses: younited/[email protected]

Detect changes in different root folders

- uses: younited/[email protected]
  with:
    pathspec: "application configs"

Detect file changes

- uses: younited/[email protected]
  with:
    pathspec: "a/dee/nested/folder/*.rb"

Detect based on an other branch

- uses: younited/[email protected]
  with:
    base_branch: "hotfix-147"