Skip to content

Comments

Implement pattern-based PR auto-approval action#1

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/add-auto-approval-action
Draft

Implement pattern-based PR auto-approval action#1
Copilot wants to merge 6 commits intomainfrom
copilot/add-auto-approval-action

Conversation

Copy link

Copilot AI commented Jan 23, 2026

Implementation Plan for Auto-Approve GitHub Action

  • Explore repository structure
  • Review deepwork LICENSE and AGENTS.md
  • Copy LICENSE from deepwork repository
  • Create action.yml for GitHub Action metadata
  • Implement the action logic (JavaScript/TypeScript)
    • Read patterns file specified in workflow
    • Get PR file changes
    • Check if all files match patterns
    • Auto-approve if criteria met
  • Set up package.json and dependencies
  • Write tests for the action
  • Create comprehensive README.md
  • Create AGENTS.md file
  • Build and validate the action
  • Test the action locally
  • Run code review
  • Update dependencies to latest versions
  • Run security check
  • Add testing documentation
  • Comment out example workflow
  • Add CI workflow for automated testing
  • Final validation

Implementation Complete! ✅

The Auto-Approve GitHub Action has been successfully implemented with all feedback addressed.

Recent Changes

  • ✅ Commented out example workflow to prevent action from running in this repository
  • ✅ Added CI workflow (.github/workflows/test.yml) to automatically run tests on PRs and pushes to main

Core Features

  • ✅ Reads glob patterns from configurable file
  • ✅ Checks ALL PR files match at least one pattern
  • ✅ Auto-approves only if all files match
  • ✅ Configurable approval message
  • ✅ Detailed logging of matches/non-matches

Documentation

  • README.md: Complete user guide with examples
  • AGENTS.md: Developer guidelines and architecture
  • TESTING.md: Testing strategies and debugging guide
  • LICENSE.md: Business Source License 1.1 (from deepwork)
  • ✅ Example workflow (commented out as reference only)
  • ✅ Example patterns file

CI/CD

  • Test workflow: Automatically runs tests, installs dependencies, and builds the action on all PRs and pushes to main

Ready for release! 🚀

Original prompt

Make a GitHub Action that reads a file specified in the action workflow for a series of glob patterns. If a PR's changelist includes NOTHING BUT files that match those patterns, then it can be auto-approved. The message to use for the approval should be configured in the action.

Pull a copy of the license from https://github.com/Unsupervisedcom/deepwork for this repo too. Be sure to fill in both tests and README content, and AGENTS.md content.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 23, 2026 01:05
Co-authored-by: nhorton <204146+nhorton@users.noreply.github.com>
Co-authored-by: nhorton <204146+nhorton@users.noreply.github.com>
Co-authored-by: nhorton <204146+nhorton@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Action for auto-approving PRs Implement pattern-based PR auto-approval action Jan 23, 2026
Copilot AI requested a review from nhorton January 23, 2026 01:10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment this out fully - we don't want this repo to actually have the action enabled

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot - act on this

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. The entire workflow is now commented out with a note explaining it's a reference example. Commit: 3c45f1e

Copy link
Contributor

@nhorton nhorton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot - please also add a github action to auto-run the tests in PRs

Co-authored-by: nhorton <204146+nhorton@users.noreply.github.com>
Co-authored-by: nhorton <204146+nhorton@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 23, 2026

@copilot - please also add a github action to auto-run the tests in PRs

Added test workflow at .github/workflows/test.yml that runs on PRs and pushes to main. It installs dependencies, runs tests, and builds the action. Commit: d3e68c7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants