Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork11
A Github Action to prevent merging pull requests containing autosquash commit messages.
License
xt0rted/block-autosquash-commits-action
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A Github Action to prevent merging pull requests containingautosquash commit messages.
If any commit message in the pull request starts withfixup!
orsquash!
the check status will be set toerror
.
⚠️ GitHub's API only returns the first 250 commits of a PR so if you're working on a really large PR your fixup commits might not be detected.
on:pull_requestname:Pull Requestsjobs:message-check:name:Block Autosquash Commitsruns-on:ubuntu-lateststeps: -name:Block Autosquash Commitsuses:xt0rted/block-autosquash-commits-action@v2with:repo-token:${{ secrets.GITHUB_TOKEN }}
You'll also need to add arequired status check rule for your action to block merging if it detects anyfixup!
orsquash!
commits.
If your repository is usingcontrol permissions you'll need to setpull-request: read
on either the workflow or the job.
on:pull_requestname:Pull Requestpermissions:pull-requests:readjobs:message-check:name:Block Autosquash Commitsruns-on:ubuntu-lateststeps: -name:Block Autosquash Commitsuses:xt0rted/block-autosquash-commits-action@v2with:repo-token:${{ secrets.GITHUB_TOKEN }}
on:pull_requestname:Pull Requestjobs:message-check:name:Block Autosquash Commitsruns-on:ubuntu-latestpermissions:pull-requests:readsteps: -name:Block Autosquash Commitsuses:xt0rted/block-autosquash-commits-action@v2with:repo-token:${{ secrets.GITHUB_TOKEN }}
About
A Github Action to prevent merging pull requests containing autosquash commit messages.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.