Skip to content

Remove generic welcome messages when no contributing guidelines found#59

Merged
slavingia merged 1 commit intomainfrom
devin/1755701619-remove-generic-welcome-messages
Aug 20, 2025
Merged

Remove generic welcome messages when no contributing guidelines found#59
slavingia merged 1 commit intomainfrom
devin/1755701619-remove-generic-welcome-messages

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

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:

  • Removed generic welcome message from handlePullRequestOpened when no contributing guidelines exist
  • Removed generic welcome message from handleIssueOpened when no contributing guidelines exist
  • Both handlers now return early without posting any comment when contributingContent is null
  • Maintains existing logging behavior (warning logged in loadContributingGuidelines when no guidelines found)

The handleIssueCommentCreated function already had the correct behavior and was not modified.

Review & Testing Checklist for Human

  • Test webhook behavior with repos lacking CONTRIBUTING.md: Create a test PR/issue in a repo without contributing guidelines and verify no generic welcome comments are posted
  • Verify existing AI analysis still works: Test with a repo that has CONTRIBUTING.md to ensure the AI moderation functionality continues to work correctly
  • Check error handling and logging: Verify that appropriate warning logs are still generated when no contributing guidelines are found

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:#FFFFFF
Loading

Notes

- 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>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@vercel
Copy link
Copy Markdown

vercel bot commented Aug 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
jacquez Ready Ready Preview Comment Aug 20, 2025 2:56pm

@slavingia slavingia merged commit 7f53ae8 into main Aug 20, 2025
4 checks passed
@slavingia slavingia deleted the devin/1755701619-remove-generic-welcome-messages branch August 20, 2025 14:56
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.

1 participant