mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
55b4436804
It will prevent merging in a branch that's not based on its base branch HEAD, leading to streamlined history. Note it will not prevent squash commits, nor commits directly to base branch.
18 lines
556 B
YAML
18 lines
556 B
YAML
name: check-rebased
|
|
on:
|
|
pull_request:
|
|
types: [ synchronize, opened, reopened, edited ] # +edited (for triggering on PR base change)
|
|
push:
|
|
branches: [ main ]
|
|
jobs:
|
|
hook:
|
|
name: Check whether current branch is based on its base branch
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repo @ current branch
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1000 # Hopefully current branch is less than 1000 commits from main
|
|
- name: Run check-rebased.sh
|
|
run: .github/workflows/check-rebased.sh
|