Conversation
Co-authored-by: rawveg <308889+rawveg@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create a Github action that automatically closes and deletes any issue that has not been created by a member of one of the assigned teams. Any comments added by a non-team member should be automatically deleted too.
Add automated GitHub Action for issue and comment moderation based on team membership
Aug 20, 2025
Modified allowed teams in configuration array
rawveg
approved these changes
Aug 20, 2025
|
This is blowing my mind a little bit! Great addition. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements an automated moderation system that restricts issue creation and commenting to authorized team members only.
Problem
The repository needed a way to automatically control who can create issues and add comments, ensuring only members of designated teams have access to these features.
Solution
Added a GitHub Action workflow that:
Implementation Details
Files Added
.github/workflows/issue-moderation.yml- Main workflow that handles the moderation logic.github/ISSUE_MODERATION.md- Documentation explaining configuration and usageKey Features
allowedTeamsarrayissues: write,contents: read,metadata: read)Configuration
The workflow comes pre-configured with example teams (
core-team,maintainers,admins). To customize for your organization:Workflow Triggers
issues: [opened]- Activates when new issues are createdissue_comment: [created]- Activates when new comments are addedThe action will begin automatically moderating issues and comments as soon as this PR is merged to the main branch.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.