Enforce democracy on a project by allowing a community to vote for mergeable pull requests.
Explore the docs »
Report Bug
·
Request Feature
·
Send a Pull Request
Have you ever been frustated that your open source contribution never gets merged?
Or that you missed a contribution on one of your project because you were not available?
I have...
Maintainers and contributors schedules are not synchronised. Manage or contribute to open source takes time.
Open source management and contribution are often done on your free time, and you want it as smooth as possible.
Plus, you want the open source community to be as open as it should.
That's when I knew open source community needed democracy!
GNU defines a "free software" so that we can run, study, redistribute and distrubute modified copies.
What if, as an open source enthousiasts, you could vote to express your opinion on a project?
The Github Democrat brings democracy to a project.
It gives contributors and non-contributors another way to participate by voting.
The world is more than ever in the need of strong democracy enthousiasts. And so is the open source community.
Create a new workflow in .github/workflows/democracy-enforcer.yaml
.
name: 'democracy-enforcer'
on:
schedule:
- cron: '*/30 * * * *' # checks pull requests to merge every 30 minutes
pull_request:
types:
- opened # for a voting opening message on a pull request
jobs:
enforce-democracy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: deuzu/github-democrat-action
with:
githubToken: ${{ secrets.GITHUB_TOKEN }} # GitHub automatically creates the GITHUB_TOKEN secret
voters: deuzu, not-deuzu
# dryRun: true
# prMinimumReviewScore: 1
# prVotingTimeHours: 24
# prMarkAsMegeableLabel: ready
# prTargetBranch: main
Cf. ./action.yml for action inputs.
The job will look for open pull requests and merge ones that satisfy the following constraints (configurable):
- receive more than half of the majority vote cast (votes are review approves and request changes)
- is ready to be merged (with a configurable label)
- is mature (last commit is older than a configurable delay)
- target is the configured branch
To avoid fraud, it's advised to add protections on the target 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