Skip to content

Yordaniss/github-branch-check

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

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠️ Maintenance Branch Checker

A GitHub Action that checks whether a maintenance branch contains commits that are not yet merged into a base branch like main. If differences are found, an optional GitHub Issue is created automatically.


🧠 Main idea

Combine this action with cron to check the branches without manual work. See example


ℹ️ Important

For creating an issue github.token will be used

✅ Features

  • Compares a maintenance branch to a base branch
  • Detects unmerged commits
  • Optionally creates a GitHub Issue
  • Runs manually or via schedule
  • Supports user input via workflow_dispatch

🚀 Usage

Important to give also write permissions to issues for automatic creating process

name: Test Maintenance Checker

on:
  workflow_dispatch:
    inputs:
      target_branch:
        description: 'Maintenance Branch to check'
        required: true
        default: 'maintenance-release-1'
      base_branch:
        description: 'Base branch to compare against'
        required: false
        default: 'main'
      create_issue:
        description: 'Create issue if changes found?'
        required: false
        default: 'true'
  schedule:
    - cron: '0 9 * * 1' # each monday

permissions:
  issues: write
  contents: read

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: Yordaniss/[email protected]
        with:
          target_branch: ${{ github.event.inputs.target_branch }}
          base_branch: ${{ github.event.inputs.base_branch }}
          create_issue: ${{ github.event.inputs.create_issue }}

About

Github Branch Checker

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages