Coder Social home page Coder Social logo

repo-moderator's Introduction

repo-moderator

This GitHub Action empowers repositories to regulate sponsor team interactions with GitHub Issues, Pull Requests, and Discussions, ensuring optimal collaboration and workflow integrity.

Key Features

  • Label Enforcement: Restricts sponsors to a designated set of labels on issues and pull requests.
  • Issue/PR Control: Prevents sponsors from closing, reopening, or assigning issues and pull requests.

Prerequisites

  • A GitHub repository where you want to enforce sponsor restrictions.
  • A GitHub Token with appropriate permissions (repo scope and potentially admin:org for managing team memberships).

Setup

  1. Add Workflow: Create a .github/workflows/repo-moderator.yml file in your repository, copy over the "Workflow Example" below, and edit the sponsor-team-slug to the name of sponsor team in GitHub.
  2. Secrets: This Action uses the default GitHub Action token GITHUB_TOKEN

Workflow Example

name: Repo Moderator

on:
  issues: 
    types: [labeled, unlabeled, closed, reopened, assigned, unassigned] 
  pull_request:
    types: [closed, reopened, assigned, unassigned]

jobs:
  revert-action:
    if: github.actor != 'C4-Staff'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Revert Label Changes
        uses: geoffchan23/repo-moderator@main
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          sponsor-team-slug: "2024-04-sponsor-team-name"
          allowed-labels: "sponsor confirmed, sponsor disputed, sponsor acknowledged"

repo-moderator's People

Contributors

geoffchan23 avatar

Watchers

 avatar

repo-moderator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.