Skip to content

πŸ“’ GitHub Action for notifying PR owners that their base branch is out-of-sync with the target one

License

Notifications You must be signed in to change notification settings

SonnyRR/branch-out-of-sync-notifier-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“£ Branch out-of-sync notifier action

πŸ–‹ Description

A github action that notifies pull-request owners that their base branch is behind the target branch via a comment on the pull request itself.

It utilizes tools such as git and github-script to write workflows in JavaScript.

image

πŸ”¨ Setup

Below is the bare minimum step in order to utilize this action, by default each of the inputs has a default value.

name: Check if base branch is synchronized

on:
  pull_request:
    types: [opened, synchronize, reopened, edited]

jobs:
  check-branch-sync:
    name: Check if head & base branches are in sync
    runs-on: ubuntu-latest

    steps:
      - name: Notify PR owner if branch is out of sync
        uses: SonnyRR/[email protected]

πŸ“© Inputs

base-ref:
  description: "The base git reference, used for comparison."
  default: ${{ github.event.pull_request.base.ref }}
  required: true
head-ref:
  description: "The head git reference, used for comparison."
  default: ${{ github.event.pull_request.head.ref }}
  required: true
request-owner:
  description: "The owner of the pull request"
  default: ${{ github.event.pull_request.user.login }}
  required: true
request-number:
  descripton: "The pull request number"
  default: ${{ github.event.pull_request.number }}
  required: true
no-sync-label:
  description: "The label value, used for tagging PRs that shouldn't be checked"
  default: 'no-branch-sync'
  required: false