Skip to content
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

[example] Create github PR discord agent #39

Open
ponderingdemocritus opened this issue Jan 24, 2025 · 4 comments
Open

[example] Create github PR discord agent #39

ponderingdemocritus opened this issue Jan 24, 2025 · 4 comments
Labels

Comments

@ponderingdemocritus
Copy link
Contributor

ponderingdemocritus commented Jan 24, 2025

This agent should be capable for:

  • Chatting in discord
  • Submitting issues into github
  • Responding with open issues in github that are urgent when requested
  • Anything else

This agent will lay the groundwork to the next agent which will be able to write it's own PRs.

For this to be completed you must have an example that shows a basic interaction. Look in the examples folder to see.

@0xibs
Copy link

0xibs commented Jan 24, 2025

This looks interesting to me. I would like to work on it @ponderingdemocritus

@ponderingdemocritus
Copy link
Contributor Author

Great! please go ahead

@ponderingdemocritus
Copy link
Contributor Author

OpenHands started fixing the issue! You can monitor the progress here.

@ponderingdemocritus
Copy link
Contributor Author

An attempt was made to automatically fix this issue, but it was unsuccessful. A branch named 'openhands-fix-issue-39' has been created with the attempted changes. You can view the branch here. Manual intervention may be required.

Additional details about the failure:
Failed to decode answer from LLM response: ---

success
true


explanation
The issue has been successfully resolved based on the changes made. The PR introduces a Discord bot (discord_agent.py) that integrates with GitHub to submit issues and retrieve urgent ones. It includes:

  1. Discord Bot Setup: The bot initializes with necessary intents and commands to handle interactions.
  2. Issue Submission: The submit_issue method sends POST requests to GitHub's API, creating new issues with titles and bodies provided through Discord commands.
  3. Urgent Issues Retrieval: The get_urgent_issues method fetches issues labeled "urgent" and formats them for display.
  4. Command Handling: The bot listens for !submit_issue and !get_urgent commands, processing them accordingly.
  5. Testing: Comprehensive unit tests in test_discord_agent.py mock API responses to verify both success and failure scenarios for issue submission and retrieval.

These changes directly address the issue requirements, providing a functional foundation for the next agent to build upon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants