• Stars
    star
    178
  • Rank 214,989 (Top 5 %)
  • Language
    JavaScript
  • License
    ISC License
  • Created over 6 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ‘ฎ GitHub Bot For Validating Pull Request Mergability Requirements and Issues Structure

Waffle.io - Columns and their card count https://github.com/Schachte/Git-Enforcer/issues

Git Enforcer is an open-source linter bot to faciliate collaboration efforts. Git Enforcer validates user-defined pull request structure, ensures approval requests don't go stale, validates issues follow a specific format, sends SMS alerts on PR status checks, allows for label customizability & more!

Inspired by Justin Law @jusx

Table of Contents:

Priority Roadmap

Table Last Updated: 5/13/2018 (More detailed progress board can be found here)

Priority Items In Construction ETA Completed
Issue title prefix/suffix requirements 05/15 โœ“
Issue required assignee check 05/15 โœ“
Issue required milestone check 05/15 โœ“
Issue required label assignment 05/15 โœ“
Issue required milestone check 05/15 โœ“
Issue required REGEX on title 05/14
Improving, Testing & Refactoring 05/15
Fully Issue Analysis Support 05/19
Pull Request Prefix/Suffix Requirement with Status Check 05/19
Pull Request Contains REGEX in Title with Status Check 05/21
Pull Request Contains REGEX in Body with Status Check 05/21
Pull Request Contains Required Assignee Status Check 05/22
Pull Request Contains Required Project Status Check 05/22
Pull Request Contains Required Milestone Status Check 05/24
Sending reminder notifications to requested reviewers to do a code review 05/26
Requiring issue number regex existence in PR body 05/26
Providing instructions on instantly rolling your own server to run bot 05/26

Example Issue Validation Analysis

Issues Validation Support

Currently, the following things are supported for issues:

Feature Description Config Mapping
Issue Title Prefix Check Enforcing that an issue title must be prepended with a user-specified string title_must_be_prefixed
Issue Title Suffix Check Enforcing that an issue title must be appended with a user-specified string title_must_be_suffixed
Required Issue Labelling Requires new issues to have at least N (user-specified) amount of labels validate_label_population
Auto Label On Failure Will auto-label issues that fail spot-check tbd
Milestone Checker Verification Verfifies issues assigned a milestone or a particular milestone tbd
Assignee Checker Vericiation Verfifies an assignee has been added to a particular milestone tbd

Pull Request Validation Support

TBD

Example Configuration .yml

The configuration for Git-Enforcer is extremely customizable. As a result, the config file is quite large. Not everything needs to be used or enabled, however, you can freely toggle things on and off through the file place in the .github/git-enforcer.yml location of your repo.

#############################################################################
#                      GIT-ENFORCER RULE FILE GUIDELINES
#############################################################################
#
# This is a sample YML file for structuring your PR mergability requirements and
# issues that are created within your repository or organization.
#
# Any any time you want to ignore a particular rule, comment it out or don't add
# it into the file.
#
# ------------------------------------------------------------------------
# BELOW IS THE LIST OF AVAILABLE RULE DEFINITIONS THAT CAN BE DEFINED:
# ------------------------------------------------------------------------

# ---------------------------
# Issue Policy Configuration:
# ---------------------------
# add_label_on_failure            : Add custom label to issues that fail git-enforcer check
# title_must_contain              : Require issue title to contain a specific pattern
# title_must_not_contain          : Require issue to NOT contain a specific pattern in title
# title_must_be_prefixed          : Require text prefix to all issue titles
# title_must_be_suffixed          : Require text suffix to all issue titles
# validate_label_population       : Require labels to be populated on all issues
# validate_assignee_population    : Require assignees to be added to all issues
# milestone_required              : Require all issues to be assigned a milestone
#
# ---------------------------------
# Pull-Request Policy Configuration:
# ---------------------------------
# approvals                       : Require N no. of approvers to pass status check
# title_must_contain              : Pattern match on title to pass status check
# title_must_not_contain          : Pattern match to not contain in title 
# title_must_be_prefixed          : Require title prefix to pass status check
# title_must_be_suffixed          : Require title suffix to pass status check
# commits_must_be_prefixed        : Require commit prefix to pass status check
# commits_must_be_suffixed        : Require commit suffix to pass status check

#############################################################################

# Here is an example git-enforcer policy. A more detailed policy guide can be
# found within the GitHub readme.
git-enforcer:
  labels:
    add_label_on_failure:
      color: "FFA500"
      name: "Issue Failure"
    title_must_contain:
      pattern: null
    title_must_not_contain:
      pattern: null
    title_must_be_prefixed:
      prefix: "[GIT-ENFORCE]"
    title_must_be_suffixed:
      suffix: SUFFIX
    validate_label_population:
      message: "Don't create issues with no labels!"
    validate_assignee_population:
      message: "Remember to choose at least one assignee to this issue!"
    milestone_required:
      message: "A milestone is required to be selected when making a new issue"
      required_milestone_name: null
  pull_requests:
    approvals:
      number: 0
    title_must_contain:
      pattern: null
    title_must_not_contain:
      pattern: null
    title_must_be_prefixed:
      prefix: null
      suffix: null
    commits_must_be_prefixed:
      prefix: null
    commits_must_be_suffixed:
      suffix: null

Setup Local Environment

# Install dependencies
npm install

# Run the bot
npm start

Check out smee to proxy requests to local environment, local tunnel or NGINX

More Repositories

1

Mermrender

๐Ÿงœโ€โ™€๏ธ RESTful rendering pipeline for generating sequence and UML diagrams using Mermaid for Markdown docs (Diagrams as a Service)
JavaScript
915
star
2

cloudflare-google-auth

JS module to authenticate to Google Cloud from within a Cloudflare Worker
TypeScript
24
star
3

Firecracker-VM-Wizard

๐Ÿ”ฅ Helper program for setting up a Firecracker microVM on a fresh metal
Shell
15
star
4

Cloudflare-Stream-Video-Upload

Demoing Cloudflare Stream TUS Uploads for Creator Uploads
TypeScript
15
star
5

stable-matching-algorithm

Python code for stable matching algorithm video tutorial by The Simple Engineer
Python
13
star
6

WIPCream

๐ŸฆGithub Work In Progress (WIP) Management Bot
JavaScript
12
star
7

mac-space-monitor-rs

A Rust crate for subscribing and retrieving the current active space on Mac OS X
Rust
10
star
8

simple-engineer-aws-deployment-tutorial

JavaScript
10
star
9

Hackernews-Recommender-System

ML algorithm that uses cosine similarity and TF-IDF to recommend top posts based on interests
Jupyter Notebook
8
star
10

ASU-Open-Seat-Detection

Python script to find open seats and notify via email and SMS
Python
8
star
11

cloudflare-stream-downloader

Download tool for Cloudflare Stream
Go
7
star
12

AirBnB-Dataset-Visualization-Backend

๐Ÿ”ฅ๐Ÿ”ฅ ๐Ÿก Interactive Data Visualization for the AirBnB Dataset - 2017 ๐Ÿ“‰ ๐Ÿ”ฅ๐Ÿ”ฅ
Python
6
star
13

Distributed-Prefix-Trie

Distributed prefix trie implementation to demonstrated autocomplete capabilities at a distributed level.
Java
4
star
14

Algorithms

โˆญ Trees, Graph Theory, String Manipulation, Algorithms, Riddles!
Java
4
star
15

Workers-OpenTelemetry

Providing tracing using OpenTelemetry in Cloudflare Workers
TypeScript
3
star
16

rate-limiter

Distributed rate limiter written in Go, supports token bucket algorithm
Go
3
star
17

PlayListr

iOS Application designed in Swift 2 to give users the best new music experience.
JavaScript
3
star
18

Planit

CLI book planner to hit your reading goal
JavaScript
3
star
19

Algorithms-2019-Edition

๐Ÿง Algorithms
Java
3
star
20

This_American_Life_Downloader

Download tool designed to download either a random episode of TAL or the most recent episode of TAL in an MP3 format directly to the desktop.
Python
3
star
21

Search-Algorithm-Visualizer

Visualizing search algorithms in React
JavaScript
3
star
22

ServerlessNewsletter

AWS Lambda Based Architecture for Serverless Newsletter Management
JavaScript
3
star
23

Cloudflare-R2-Concurrency

Go
2
star
24

AirBnB-Dataset-Visualization-Frontend

๐Ÿ”ฅ๐Ÿ”ฅ ๐Ÿก Interactive Data Visualization for the AirBnB Dataset - 2017 ๐Ÿ“‰ ๐Ÿ”ฅ๐Ÿ”ฅ
JavaScript
2
star
25

Memdoop

An in-memory implementation of the Hadoop file-system
Java
2
star
26

cloudflare-worker-gauth-example

Demo of my Cloudflare OAuth2 module for Cloudflare Workers
TypeScript
2
star
27

AWS-to-Cloudflare-Migration-Utility

โ˜๏ธ Utility to help transfer items from AWS S3 to Cloudflare Stream & Cloudflare R2
TypeScript
2
star
28

AsciiPhile

๐Ÿ“ Simple Scalable Object-Based Content Store
Java
2
star
29

Java-Simple-Graph

๐ŸŒณ Simple Graph/Tree Data Structure API for Java
Java
2
star
30

c-development-base

My preferred build environment for C development on ARM64/Apple Silicon
C
1
star
31

SimpleEngineerYoutube

1
star
32

react-base-template

My preferred boiler plate template for React projects
TypeScript
1
star
33

FirstFollowSetTheory

First & Follow Set Syntax Recognizer and Dynamic Calculation For User-Defined Syntax
C++
1
star
34

React-SSR-CSR

Demo test implementing server-side rendering with React, Redux and GraphQL
JavaScript
1
star
35

WhereIsMyMoney

๐Ÿ’ฐ Simplistic Budgeting Tool Focusing on the Essentials
JavaScript
1
star
36

redditplayer

JavaScript
1
star
37

personal-website

TypeScript
1
star
38

writings

My personal website
JavaScript
1
star
39

Maven-Fundamentals

The basics of the Maven Build Tool
1
star
40

Neural-Networks

Neural Network implementations for predictive learning
Python
1
star
41

spotify-alarm-mac

Simple terminal interface to set up a song to play as your alarm in the morning from Spotify
Python
1
star
42

Learn_Python_The_Hard_Way

Walk through of all the book examples
Python
1
star
43

MathInterpreter

Interprets simple mathematical expressions
Java
1
star
44

Dynamic-Markdown-Parser

Generates nested structure for generating dynamic anchor linking and table of contents for MDX type blogs/sites
JavaScript
1
star
45

JudgeMyEducator

Rate My Prof Clone
CSS
1
star
46

Rust_DNS

RFC 1035 DNS Client/Server implementation in Rust
Rust
1
star
47

r2_download_file

download file cloudflare r2
Go
1
star
48

Hack-Language-Assembler

Java
1
star
49

Resume

Ryan Schachte's LateX Resume
TeX
1
star
50

Simplex-Language

Simplex Programming Language & Interpreter
Java
1
star
51

Fibonacci_Analysis

Different methods of computing the fibonacci sequence using recursion, dynamic programming and matricies.
Python
1
star