top of page

4 results found for ""

  • Running AutoCodeRover on Private GitHub Repositories

    In the previous Post, We have seen how we can easily create Projects and Tasks in AutoCodeRover to generate a patch according to the descriptions we provide. However, the examples we used were for a public GitHub Repository, which are accessible to anyone on the internet. To get AutoCodeRover to work for Projects hosted on private GitHub repos, we will start by configuring a GitHub Personal Access Token with the sufficient permissions, to read and clone the private repo. Adding A GitHub Personal Access Token After logging into our AutoCodeRover account, we can find our user centre button on the top right corner of the window, which opens up to various options for us to configure our settings. To add a GitHub token to our account, click on the 'Account' option in the dropdown menu, and navigate to the 'External Integrations' section of our Account page. As we can see, there are two buttons that allows us to 1) Generate a GitHub User Access Token, and 2) Add an API Key or Token manually. For our purposes of being able to clone a private repository, we will need to take the manual approach, as a User Access Token has the lowest common level of permission that both the user and the app have. (Just a sidenote here: a User Access Token allows us to directly import our Public GitHub Repositories as Projects - instead of adding them manually like we did in the previous post!) After clicking on the Add Key / Token button, we should specify the following information about the Key / Token: The Service: The type of service that our Key / Token belongs to The Key Name: The unique key name for our Key / Token The API Key Secret: The content of our API Key, usually beginning with 'sk-xxx' or 'ghp_xxx', depending on the service Once done, click on the 'Add Key / Token' button, and we can now find our GitHub Personal Access Token under the External Integrations section on our Account page. We can also remove our third party keys at any time by clicking on the 'Remove' button next to the key. Importing a Private GitHub Repository Now, let us go back to the Projects Tab, and try Importing a Private Project using the token we had just added! Click on the 'Import Projects' button, and select 'From GitHub', and we can see the Token we had just added, along with the same buttons we previously saw, which allows us to generate GitHub User Access Tokens and add keys manually. Let us select our Personal Access Token, and then hit 'Confirm'. Here, we can see all the Repositories that this token has access to, and we can easily import them as Projects by selecting the repos we want, then hitting that 'Import Selected Repos' button. And there we have it: our private GitHub repo had just been imported, and the Personal Access Token we had used for the import has also been automatically configured as the 'Default Repo Token' and the 'Issue Tracker Token' for the Github Issue Tracker. Neat! From this project details page, we can then go on to start manually adding tasks, or importing them from GitHub Issues, just like how we did for a public GitHub repo in the previous post . When AutoCodeRover is requested to perform a run on a private GitHub repo, it clones the repo using the provided Personal Access Token, with both the private token and repo being securely stored.

  • Your one-stop guide to AutoCodeRover

    Welcome to AutoCodeRover In this series of blogposts, we will explore how you can use AutoCodeRover to maintain your software systems, by generating patches for your code using various sources of issue description. Let's dive right into it! Registration On the login page, create an account for AutoCodeRover if you have not yet done so, or simply sign in using your Google or GitHub accounts. Dashboard After signing in, you will be greeted with your Dashboard containing the various Projects, Tasks, and Runs you have added. You will also be able to configure your user settings via the dropdown located on the top right corner of the page. Now, let us take a look at creating Projects and Tasks, and create your first Run using AutoCodeRover! Projects To create a new Project, first click on the 'Projects' section on the Navigation bar to the left. Here, you can see all the projects you have added, as well as create new projects or import them via a Version Control Service such as GitHub. For now, let us try manually adding and customizing our first project, by clicking the '+ Add Project' button. For this example, we will add a public repository hosted on GitHub (stay tuned for adding private repositories!), and configure our AutoCodeRover Project to match the various project descriptions. Here is the link to our example public GitHub repo: https://github.com/AutoCodeRoverSG/simple-repo On the 'Add New Project' page, choose a name for your new project, as well as an optional local path for this repository on your local machine, which, in a soon-to-be-deployed feature, will allow you to directly open and apply the patch generated by AutoCodeRover on your local IDEs. Select the appropriate repository source, visibility, and URL to ensure that AutoCodeRover can access your repository. As this example is for a public repo, we can leave the default repository token option as it is. AutoCodeRover currently supports the following languages (with more on the way!) : Python C C++ Java JavaScript TypeScript PHP Go We will select 'Python' for our example, but you can also include all languages that apply for your own project. Since GitHub supports both a Verision Control System and an Issue Tracker, let's also configure a Issue Tracker for our Project, by clicking on 'Add Issue Tracker' and filling in the information of our GitHub repository, as shown in the figure below: Once that is done, click on 'Create Project' and -- voila! We have created a Project using information from our GitHub Repository, and we are now ready to create Tasks for AutoCodeRover, to help us generate patches for this Project. Adding and Running Tasks Continuing with the Project we had just created - we can see the project details page. Here, we can view the project descriptions we had just configured, and are free to modify them by clicking the 'Edit' button as well. If you wish to remove this Project, simply click on the 'Delete' button, which will remove this Projects and Tasks related to it as well. However, all Run records that AutoCodeRover had generated for this Project will be kept in your Activities tab, and you will be able to refer to them in future even after deleting the Project. That said, it is time to create a Task! We can either manually add individual tasks, or import them from a Version Control Service like GitHub. Let's first take a look at manually adding a Task, using the same public GitHub repository as our example. After clicking on the '+ Add Task' button, we are prompted to fill in the Task details, and we will do so by taking the information from this GitHub Issue here: https://github.com/AutoCodeRoverSG/simple-repo/issues/1 . If the default GitHub Issue description is sufficient, we can simply provide the Issue link by adding that as the Task URL, as seen in the figure below. Alternatively, we can provide further elaborations in the Description field, that describes the Task we want AutoCodeRover to carry out when generating a patch. If we wish to provide our own description for the task, simply leave the URL field blank, and write the task descriptions in the description field. Once the details have been filled, click on 'Create Task', and we will be directed to the Task details page, where we can select the LLM provider, model, and LLM API key that AutoCodeRover will be using to generate our code patch. As of the writing of this blog, we are providing all users with 20 free complimentary credits, which can be used to explore the features provided by AutoCodeRover. Now, back to running our newly added Task: click on the 'Run' button, select your favourite LLM provider and model, choose a key, and click on 'Run Task' - Nice! AutoCodeRover is now working to generate a patch for our Project, in order to fix the issue described by the Task we have just added. Tasks - Importing via GitHub While we wait for AutoCodeRover to generate a patch for the previous Task we just added, let's take a look at how we can create Tasks more easily by importing them - from GitHub Issues. Navigate back to the Project details page, and locate the 'Import Tasks' button that is right beside the 'Add Task' button. If we did not configure an issue tracker for our project previously, this 'Import Tasks' button will prompt us about that. However, since we have added GitHub as our issue tracker for this project, we can choose to import tasks from GitHub - instead of adding each one individually. Now, we are prompted to choose a token for importing tasks. As our example repo is publicly visible, we can proceed with selecting 'No Token', and - there we go! All the Open GitHub Issues that belongs to this repo are loaded on this screen, and we can easily import them by either ticking the checkboxes or by entering their issue numbers, or both! If the default Task description from the Issue description is insufficient, we can also modify it on the Task details page by clicking the 'Edit' button. Run Details Let's see if AutoCodeRover has finished generating a patch for our previous task, shall we? Click on the Task which we manually added earlier, look at the section containing the Run History - and it seems that our Run is complete! Let's click on the Run number (WebTask#171 in the example) to see what patch has AutoCodeRover generated for us. On the 'Info', 'Output' and 'Patch' tabs of our Run Details page, we can view the run information, the entire conversation dialogue, as well as the final patch generated. If the patch is to our liking, we can then choose to copy or download it as a .diff file onto our local machine, and apply it to our codebase. With that, we have seen how we can easily setup AutoCodeRover to generate patches for our Public GitHub repositories. In the next guide, we will look at doing so for Private GitHub repoitories - which will require us to first add some GitHub Personal Access Tokens to our AutoCodeRover account.

  • Improved performance on SWE-Bench

    AutoCodeRover is a fully automated approach for resolving GitHub issues (bug fixing and feature addition) where LLMs are combined with analysis and debugging capabilities to prioritize patch locations ultimately leading to a patch. Our latest version resolves 37%  of issues (pass@1) in SWE-bench lite and 46% of issues (pass@1) in SWE-bench verified! AutoCodeRover achieved this efficacy while being economical — each task costs less than $0.7  and is completed within 7 mins ! AutoCodeRover Agent Source: https://www.flickr.com/photos/152824664@N07/30212411048/ AutoCodeRover works in two stages: 🔎 Context retrieval: The LLM is provided with code search APIs to navigate the codebase and collect relevant context. 💊 Patch generation: The LLM tries to write a patch, based on retrieved context. AutoCodeRover is a fully automated approach for resolving software engineering tasks. You can get an open-source version at our Github repository . If you are interested in more technical details of this work, please check our Arxiv report at https://arxiv.org/abs/2408.02232 We’ll also be releasing more user-friendly services around AutoCodeRover. Stay tuned by: Following us on X ( https://twitter.com/autocoderover ) Joining our Discord channel ( https://discord.gg/c6DAfNUngZ ) Visiting our Website ( https://autocoderover.dev ). #AutoCodeRover #OpenSource #AIDevAssistant

  • Revamping Issue Resolution

    We are thrilled to introduce the latest integration of AutoCodeRover within GitHub, bringing effortless automation to software development. With this new feature, users can seamlessly invoke the AutoCodeRover agent directly within GitHub issues to automatically generate software patches, quickly address reported problems, and subsequently create Pull Requests with zero friction . AutoCodeRover is our advanced agent technology designed for autonomous program enhancement, which is capable of generating code to fix software defects and implement new features. How does it work? AutoCodeRover is an agent technology that leverages the capabilities of AI to generate program improvements (see technical report ). Our autonomous agent can automatically infer the expected behavior from the issue description, identify the source location to modify, and generate code changes to resolve the described issue. Here is a quick demo showcasing the use of AutoCodeRover on GitHub issues. In this video, we demonstrate the power of AI using a real-world GitHub project discord.py , a popular API wrapper for Discord written in Python. We replicate a scenario from a recently disclosed issue . How to Setup? You can set up AutoCodeRover on your own GitHub repositories using GitHub Actions. GitHub Actions provides a way to automate workflows for continuous integration, deployment tasks, and project management in a repository. They run directly on GitHub servers hosted runner machines or self-hosted runners that your repository maintainer sets up. You can configure custom workflows and decide when to invoke AutoCodeRover. You can also configure your preferred LLM model to generate the patch, currently, we support OpenAI and Anthoripc models only. GitHub Actions comes with built-in secrets management, which allows you to securely store your OpenAI or Anthropic keys. Step 1: In your repository, create a new workflow file (e.g. acr_bot.yml) in .github/workflows/. Following is an example template that you can modify and update. name: "AutoCodeRover Bot" permissions: issues: write contents: write # change to `read` if you do not want to use open-pr pull-requests: write # (optional) remove if you do not want to use open-pr on: issue_comment: types: [created] issues: types: [opened] jobs: acr-bot: runs-on: ubuntu-latest if: ${{ contains(github.event.comment.body || github.event.issue.body, '@acr-bot') }} steps: - name: Check out uses: actions/checkout@v4 - id: set-var run: echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT - name: ACR bot uses: AutoCodeRoverSG/code-rover-bot@v2.0.0 env: TARGET_REPO_PATH: ${{ steps.set-var.outputs.GITHUB_WORKSPACE }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} Step 2: Set OPENAI_API_KEY or ANTHROPIC_API_KEY in your repository. This should set in Settings -> Secrets and variables -> Actions. In Repository secrets, create a new secret with the name OPENAI_API_KEY whose value is your key. If you want to use the Anthropic models, set ANTHROPIC_API_KEY them with similar steps. Running the Bot You can now invoke acr-bot under an existing issue in your repository. The bot can be invoked by writing @acr-bot  as a comment on the issue.  should be a model name that you wish to invoke acr-bot with. List of currently supported model names: Name Model gpt-4o gpt-4o-2024-11-20 gpt-4o-2024-08-06 gpt-4o-2024-08-06 gpt-4o-2024-05-13 gpt-4o-2024-05-13 gpt-4-turbo-2024-04-09 gpt-4-turbo-2024-04-09 gpt-4-turbo-2024-04-09 gpt-4-turbo-2024-04-09 sonnet claude-3-5-sonnet-20241022 claude-3-5-sonnet-20241022 claude-3-5-sonnet-20241022 claude-3-5-sonnet-20240620 claude-3-5-sonnet-20240620 claude-3-opus-20240229 claude-3-opus-20240229 The recommended models are gpt-4o and sonnet, which can be invoked by @acr-bot gpt-4o and @acr-bot sonnet. You can also omit the instruction (i.e. just @acr-bot), and the default model will be used (currently gpt-4o). Iterative Feedback The GitHub bot can also work in an interactive feedback loop, where you can add additional requirements or enhance the issue description by adding new comments to the existing GitHub issue. AutoCodeRover bot will automatically retrieve all comments to create a summary to generate a better patch. Finally, you can instruct our GitHub bot to create a pull request using @acr-bot open-pr The bot will then process the conversation history of the issue and take the latest patch generated by itself to create a pull request. Note that you should use this mode only after acr-bot has generated a patch for this issue in the Patch mode. Final Remarks It’s easier to use AutoCodeRover with your GitHub projects using GitHub actions, which you can customize with many more events. Extending the above template, you can invoke AutoCodeRover to fix build failures, generate code changes for discussion topics, and many more. We encourage you to explore these possibilities and share your experience in the comments below! We’ll also be releasing more user-friendly services around AutoCodeRover. Stay tuned by: Following us on X ( https://twitter.com/autocoderover ) Following us on LinkedIn ( https://www.linkedin.com/company/autocoderover ) Joining our Discord channel ( https://discord.gg/c6DAfNUngZ ) Visiting our Website ( https://autocoderover.dev )

A Sonar Company

Contact

Address
7 Straits View, #19-05 Marina One East Tower, Singapore 018936

General Inquiries:
acr@sonarsource.com

Sales:
sales@autocoderover.dev

Careers:
careers@autocoderover.dev

Connect with Us

Subscribe to stay updated on the latest in autonomous program improvement.

© 2024 AutoCodeRover. All rights reserved.

bottom of page