Skip to main content

GitConsensus

This simple project allows github projects to be automated. It uses “reaction” as a voting mechanism to automatically merge (or close) pull requests.

Consensus Rules

The file .gitconsensus.yaml needs to be placed in the repository to be managed. Any rule set to false or ommitted will be skipped.

You can run gitconsensus init to start with a template configuration in the current working directory.

# Which version of the consensus rules to use
version: 3

# Add extra labels for the vote counts and age when merging
extra_labels: false

# Don't count any vote from a user who votes for multiple options
prevent_doubles: true

# The following only applies to pull requests
pull_requests:

  # Minimum number of voters
  quorum: 5

  # Required percentage of "yes" votes (ignoring abstentions)
  threshold: 0.65

  # Only process votes by contributors
  contributors_only: false

  # Only process votes by collaborators
  collaborators_only: false

  # When defined only process votes from these github users
  whitelist:
    - alice
    - carol

  # When defined votes from these users will be ignored
  blacklist:
    - bob
    - dan

  # Number of hours after last action (commit or opening the pull request) before issue can be merged
  merge_delay: 24

  # Number of votes from contributors at which the mergedelay gets ignored, assuming no negative votes.
  delay_override: 10

  # When `delayoverride` is set this value is the minimum hours without changes before the PR will be merged
  merge_delay_min: 1

  # Require this amount of time in hours before a PR with a license change will be merged.
  licensed_delay: 72

  # Require this amount of time in hours before a PR with a consensus change will be merged.
  consensus_delay: 72

  # Do not allow license changes to be merged.
  license_lock: true

  # Do not allow consensus changes to be merged.
  consensus_lock: true

  # Number of hours after last action (commit or opening the pull request) before issue is autoclosed
  timeout: 720

Voting

Votes are made by using reactions on the top level comment of the Pull Request.

Reaction

Vote

+1

Yes

-1

No

confused

Abstain

Label Overrides

Any Pull Request with a WIP or DONTMERGE label (case insensitive) will be skipped over.

Commands

Authentication

gitconsensus auth

You will be asked for your username, password, and 2fa token (if configured). This will be used to get an authentication token from Github that will be used in place of your username and password (which are never saved).

Initialization

Initialize the configuration for a specific project. If no template is provided the recommended settings will be used. All settings come from the gitconsensus_examples project.

gitconsensus init [TEMPLATE]

Merge

Merge all pull requests that meet consensus rules.

gitconsensus merge USERNAME REPOSITORY

Close

Close all pull requests that have passed the “timeout” date (if it is set).

gitconsensus close USERNAME REPOSITORY

Info

Get detailed infromation about a specific pull request and what rules it passes.

gitconsensus info USERNAME REPOSITORY PR_NUMBER

Force Close

Close specific pull request, including any labels and comments that normally would be sent.

gitconsensus forceclose USERNAME REPOSITORY PR_NUMBER

Force Merge

Merge specific pull request, including any labels and comments that normally would be sent.

gitconsensus forcemerge USERNAME REPOSITORY PR_NUMBER

Metadata

Release files for gitconsensus 0.7.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for gitconsensus 0.7.5
File Interpreter ABI Platform
gitconsensus-0.7.5-py3-none-any.whl Python 3 none any Details

Release files / gitconsensus-0.7.5-py3-none-any.whl

Download URL gitconsensus-0.7.5-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e272626bfb282948e507eb23e370ffc26b62dc5b7f9f051a0d938a32dcbd5e14
BLAKE2b-256 checksum
How to use checksums
218958d004c6c015bf66171bbcfe4c0235f9a8b44d965b9eb840a0cbd723f850
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.2

Security for gitconsensus 0.7.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page