Skip to content

added auto reply #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/auto-assign-reply.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Auto Reply to Assign Requests

on:
issue_comment:
types: [created]

jobs:
auto-reply:
runs-on: ubuntu-latest
env:
ASSIGN_KEYWORDS: |
assign this to me
please assign
assign me
can you assign
assign to me
can i be assigned
may i be assigned
could you assign
ASSIGN_RESPONSE: |
Please go ahead and create a PR when you are ready. We do not formally assign issues. Contributors are free to pick up any open issue based on their availability. You can open a PR or even a draft PR to let others know that you’re working on it.
steps:
- name: Check for assign request and comment
uses: actions/github-script@v7
with:
script: |
// Get keywords from env, split by newlines, and trim
const assignKeywords = process.env.ASSIGN_KEYWORDS.split('\n').map(k => k.trim()).filter(Boolean);
// Create regex patterns for each keyword (case-insensitive)
const assignPatterns = assignKeywords.map(k => new RegExp(k, 'i'));
const commentBody = context.payload.comment.body;
if (assignPatterns.some(pattern => pattern.test(commentBody))) {
const commenter = context.payload.comment.user.login;
const response = `@${commenter} ${process.env.ASSIGN_RESPONSE}`;
github.rest.issues.createComment({
issue_number: context.payload.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: response
});
}