Automated GitHub Actions for managing low-effort PRs and AI-assisted contributions
Explore the docs »
View Repository
·
Report Bug
·
Request Feature
Octoguard is a comprehensive GitHub Actions solution designed to help maintainers manage low-effort pull requests and identify AI-assisted contributions during events like Hacktoberfest. It provides automated triage, labeling, and closure workflows to maintain repository quality while reducing manual maintenance overhead.
- Low-effort PR Detection: Automatically identifies and labels PRs that appear to be low-effort contributions
- AI-Assisted Detection: Flags PRs that may have been created with AI assistance
- Automated Triage: Provides guidance to contributors and sets deadlines for improvement
- Auto-close Policy: Automatically closes PRs that don't meet quality standards after a grace period
- Reusable Actions: Can be used as GitHub Marketplace actions in other repositories
- GitHub Actions
- Node.js
- JavaScript
To get a local copy up and running follow these simple steps.
This is an example of how to list things you need to use the software and how to install them.
- npm
npm install npm@latest -g- Clone the repo
git clone https://github.com/substantialcattle5/Octoguard.git- Install NPM packages
npm installAdd the Octoguard workflows to your repository by copying the workflow files from .github/workflows/ to your repository's .github/workflows/ directory.
This workflow automatically labels PRs that appear to be low-effort contributions:
name: Low-Effort Triage
on:
pull_request_target:
types: [opened, edited, synchronize]
jobs:
triage:
runs-on: ubuntu-latest
steps:
- name: Low-effort triage
uses: substantialcattle5/Octoguard/.github/actions/low-effort@main
with:
grace_hours: "48"This workflow automatically closes PRs that remain labeled as low-effort after the grace period:
name: Auto-Close Low-Effort
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
jobs:
close:
runs-on: ubuntu-latest
steps:
- name: Auto-close
uses: substantialcattle5/Octoguard/.github/actions/auto-close-low-effort@main
with:
grace_hours: "48"This workflow detects and labels AI-assisted contributions:
name: AI Suspect Detection
on:
pull_request_target:
types: [opened, edited, synchronize]
jobs:
detect:
runs-on: ubuntu-latest
steps:
- name: AI suspect detection
uses: substantialcattle5/Octoguard/.github/actions/ai-suspect@mainSee the open issues for a list of proposed features (and known issues).
- Enhanced AI detection algorithms
- Customizable triage rules
- Integration with more CI/CD platforms
- Dashboard for monitoring PR quality metrics
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'feat: Add some AmazingFeature') - Push to the Branch (
git push -u origin feature/AmazingFeature) - Open a Pull Request
You are requested to follow the contribution guidelines specified in CONTRIBUTING.md while contributing to the project 😄.
This repository includes GitHub Actions workflows to support Hacktoberfest and maintain contribution quality:
- Low-effort triage: PRs that appear low-effort (e.g., trivial docs-only changes, lockfile-only changes, generic/empty explanations) are labeled
needs-justificationwith a comment outlining required actions. - Auto-close policy: If a PR remains
needs-justificationwithout substantial updates, it may be auto-closed after 48 hours. The grace period is configurable viaLOW_EFFORT_GRACE_HOURS. - AI indicators: If AI assistance is disclosed or suspected, PRs may receive
ai-assistedorai-suspectedlabels for human review.
No extra steps are required beyond following CONTRIBUTING.md and completing the PR template.
Distributed under the MIT License. See LICENSE for more information.
Please take a look at SECURITY.md for our security policy.