-
Notifications
You must be signed in to change notification settings - Fork 241
feat: add auto-reply workflow for assignment requests #1451
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
base: development
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis PR adds a new GitHub Actions workflow that listens for assignment-request comments and automatically posts a standardized reply to streamline moderator workload. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `.github/workflows/auto-reply.yml:22` </location>
<code_context>
+ with:
+ script: |
+ const comment = context.payload.comment.body.toLowerCase();
+ const author = context.payload.comment.user.login;
+
+ // Skip bot comments (including this workflow)
+ if (author.endsWith("[bot]")) {
+ return;
+ }
</code_context>
<issue_to_address>
The bot detection logic may miss some bot accounts that do not end with '[bot]'.
Consider checking the 'type' field in the user object for more accurate bot detection, as naming conventions may vary.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
const comment = context.payload.comment.body.toLowerCase();
const author = context.payload.comment.user.login;
// Skip bot comments (including this workflow)
if (author.endsWith("[bot]")) {
return;
}
=======
const comment = context.payload.comment.body.toLowerCase();
const author = context.payload.comment.user.login;
const userType = context.payload.comment.user.type;
// Skip bot comments (including this workflow)
if (author.endsWith("[bot]") || userType === "Bot") {
return;
}
>>>>>>> REPLACE
</suggested_fix>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Build StatusBuild successful. APKs to test: https://github.com/fossasia/badgemagic-app/actions/runs/17470796332/artifacts/3986243137. Screenshots |
Fixes #1363
Changes
Added a new workflow (.github/workflows/auto-reply.yml)
Detects assignment requests in issue comments using regex (e.g. “please assign”, “can I work on this”, “assign me”, etc.)
Automatically replies with a standard message:
“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.”
This saves time for moderators by reducing repetitive responses to assignment requests.
The code uses simple regex to track the commentors message and check for keywords such as "please assign, can i work on this.."
Screenshots / Recordings
N/A
Checklist:
constants.dart
without hard coding any value.Summary by Sourcery
CI: