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

Run OpenDevin on OpenDevin in GitHub Actions #198

Closed
rbren opened this issue Mar 26, 2024 · 15 comments
Closed

Run OpenDevin on OpenDevin in GitHub Actions #198

rbren opened this issue Mar 26, 2024 · 15 comments
Labels
enhancement New feature or request good first issue Good for newcomers severity:low Minor issues, code cleanup, etc

Comments

@rbren
Copy link
Collaborator

rbren commented Mar 26, 2024

What problem or use case are you trying to solve?
Let's dogfood our own agents!

Describe the UX of the solution you'd like
I'd like to tag any issue with OpenDevin, and have a GitHub action kick off that tries to solve the issue by running the agent on this repo.

Do you have thoughts on the technical implementation?

  • GitHub action
  • Run python ./opendevin/main.py -d ./ -t "${ISSUE_TITLE}: $ISSUE_CONTENT"
  • git commit the results (maybe ask OpenDevin to do the commit and craft the message?)
  • Open a pull request

We might need better support for multi-line tasks, not sure how that will go.

We will need to put an OpenAI (or similar) key into the environment. Once we have a prototype here I can add one with a small amount of funding.

@rbren rbren added the enhancement New feature or request label Mar 26, 2024
@rbren rbren changed the title Run OpenDevin on OpenDevin in GitHub aActions Run OpenDevin on OpenDevin in GitHub Actions Mar 26, 2024
@rbren rbren added the good first issue Good for newcomers label Mar 26, 2024
@abhay-singhal
Copy link

Hey @rbren , can I pick up this issue as it is marked good first.

@rbren
Copy link
Collaborator Author

rbren commented Mar 28, 2024

Awesome! I don't think anyone else is looking.

It's a good first issue in the sense that it doesn't require much knowledge of system internals. But it will probably be a good deal of work!

@abhay-singhal
Copy link

acknowledged, will start looking into it.

@VJlaxmi
Copy link

VJlaxmi commented Mar 29, 2024

Hi @rbren , If this issue is still open, can I please pick it up?

@rbren
Copy link
Collaborator Author

rbren commented Mar 29, 2024

You might want to coordinate with @abhay-singhal

@VJlaxmi
Copy link

VJlaxmi commented Mar 30, 2024

yes I can do it, please provide me a channel to communicate better

@rbren
Copy link
Collaborator Author

rbren commented Mar 30, 2024

This issue is probably the best place to communicate. You can also apply to join the Slack, but it seems to take a few days for the admins to get through the list: https://github.com/OpenDevin/OpenDevin?tab=readme-ov-file#join-us

@foragerr
Copy link
Collaborator

foragerr commented Apr 5, 2024

@abhay-singhal @VJlaxmi Do you folks have any progress to share?

@foragerr
Copy link
Collaborator

foragerr commented Apr 5, 2024

Here's an experiment I started:

workflow: https://github.com/foragerr/OpenDevin/actions/runs/8575724652/workflow
Action run: https://github.com/foragerr/OpenDevin/actions/runs/8575724652/job/23505325009

When a label OpenDevin is applied to an issue, the workflow runs, send the issue title and body as task to main.py
and the agents start working on it. In this run the agent gets stuck in a loop - which sucks, but my focus is not agent quality. So things to do next:

  • Rerun with a simpler task, perhaps 'Create hello world script'
  • Once the agent finishes, commit code, create PR
  • Post status back to issue that triggered the run
  • Add Actions caching to poetry and pnpm so initial setup can run faster

@foragerr
Copy link
Collaborator

foragerr commented Apr 5, 2024

This is the issue I used to trigger the workflow: foragerr#1

@rbren
Copy link
Collaborator Author

rbren commented Apr 6, 2024

This is rad! Very cool work. Agree that we'll need some more agent quality before we can really get use out of this 😄

@foragerr
Copy link
Collaborator

foragerr commented Apr 6, 2024

Here's the finished workflow: https://github.com/foragerr/OpenDevin/actions/runs/8577986362/workflow
How to use it:

  1. Setup repo secret called OPENAI_API_KEY containing a valid OPENAI key
  2. Create an issue containing sufficient context in the title and body. Rudimentary Example
  3. Apply label dogfood-this to the issue - which will trigger the workflow to run Run Example
  4. Workflow will
  • Grab task from Issue title and body
  • Run agent to generate code - Your agent quality mileage may vary
  • Commit any generated changes into a new branch
  • Create a PR to the default branch in the repo
  • Post a comment back to original issue that PR is ready for review.
  • Example PR raised by this workflow

@foragerr
Copy link
Collaborator

foragerr commented Apr 6, 2024

PR: #803

@foragerr
Copy link
Collaborator

foragerr commented Apr 6, 2024

caution: Adding labels on issues is not controlled, anyone would be able to add a label and generate spurious PRs, and more importantly use up OpenAI Credits.

Perhaps the trigger should change to "if <label-foo> is added by one of [list of github-ids]"

@rbren rbren added the severity:low Minor issues, code cleanup, etc label Apr 9, 2024
@foragerr
Copy link
Collaborator

This is completed in #803

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers severity:low Minor issues, code cleanup, etc
Projects
None yet
Development

No branches or pull requests

4 participants