Skip to content

Enforce democracy on a project by allowing a community to vote for mergeable pull requests

License

Notifications You must be signed in to change notification settings

deuzu/github-democrat-action

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

fe50628 · Apr 4, 2021

History

9 Commits
Apr 3, 2021
Apr 4, 2021
Apr 4, 2021
Apr 4, 2021
Apr 3, 2021
Apr 2, 2021
Apr 4, 2021
Apr 2, 2021
Apr 2, 2021
Apr 2, 2021
Apr 3, 2021
Apr 2, 2021
Apr 4, 2021
Apr 2, 2021
Apr 2, 2021
Apr 4, 2021
Apr 2, 2021
Apr 2, 2021
Apr 2, 2021

Repository files navigation


Logo

Github Democrat Action

Enforce democracy on a repository by merging pull requests by voting score.
Explore the docs »

Report Bug · Request Feature · Send a Pull Request

Table of Contents

About The Project

Built With

Getting Started

Installation

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

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feat-amazing-feature)
  3. Commit your Changes (git commit -m 'feat(scope): Add some AmazingFeature' -m "Closes #42")
  4. Push to the Branch (git push origin feat-amazing-feature)
  5. Open a Pull Request

License

MIT

Contact

Acknowledgements