Conversation
- Remove generic welcome message from handlePullRequestOpened when no CONTRIBUTING.md exists - Remove generic welcome message from handleIssueOpened when no CONTRIBUTING.md exists - Both handlers now return early without posting any comment when contributingContent is null - Maintains existing logging behavior for when no contributing guidelines are found Co-Authored-By: Sahil Lavingia <sahil@gumroad.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Remove generic welcome messages when no contributing guidelines found
Summary
Removed generic welcome message fallbacks from the Jacquez GitHub bot when repositories don't have contributing guidelines. Previously, when no CONTRIBUTING.md file was found, the bot would post generic "Hello! Thanks for opening..." messages for both pull requests and issues.
Changes made:
handlePullRequestOpenedwhen no contributing guidelines existhandleIssueOpenedwhen no contributing guidelines existcontributingContentis nullloadContributingGuidelineswhen no guidelines found)The
handleIssueCommentCreatedfunction already had the correct behavior and was not modified.Review & Testing Checklist for Human
Recommended test plan: Set up webhook events in test repositories (one with and one without CONTRIBUTING.md) to verify the end-to-end behavior matches expectations.
Diagram
%%{ init : { "theme" : "default" }}%% flowchart TD webhook["GitHub Webhook Event"] route["app/api/webhook/route.ts"]:::major-edit handlePR["handlePullRequestOpened()"]:::major-edit handleIssue["handleIssueOpened()"]:::major-edit handleComment["handleIssueCommentCreated()"]:::context loadGuidelines["loadContributingGuidelines()"]:::context webhook --> route route --> handlePR route --> handleIssue route --> handleComment handlePR --> loadGuidelines handleIssue --> loadGuidelines handleComment --> loadGuidelines loadGuidelines -->|"null (no guidelines)"| earlyReturn["Early return<br/>(no comment posted)"]:::major-edit loadGuidelines -->|"guidelines found"| aiAnalysis["AI Analysis & Conditional Comment"]:::context subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes