Enforce democracy on a repository by merging pull requests by voting score.
Explore the docs »
Report Bug
·
Request Feature
·
Send a Pull Request
Create a new workflow in .github/workflows/democracy-enforcer.yaml
.
name: 'democracy-enforcer'
on:
schedule:
- cron: '*/30 * * * *'
jobs:
enforce-democracy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: deuzu/github-democrat-action
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
The job will hunt pull requests and merge ones that fit the following constraints:
- receive more than half of the majority vote cast (votes are review approves and request changes)
- is ready to be merged (with a
ready
label) - is mature (last commit is older than 24h)
- target is the
main
branch
To avoid fraud, it's advised to add protections on the main branch:
- Require pull request reviews before merging
- Dismiss stale pull request approvals when new commits are pushed
- Require status checks to pass before merging
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are extremely appreciated. Please read those guidelines before contributing to this repository.
- Fork the Project
- Create your Feature Branch (
git checkout -b feat-amazing-feature
) - Commit your Changes (
git commit -m 'feat(scope): Add some AmazingFeature' -m "Closes #42"
) - Push to the Branch (
git push origin feat-amazing-feature
) - Open a Pull Request