From c5b9daf2bebf03266790ee8bc74d0281f51dd3e2 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:23:13 +0000 Subject: [PATCH 1/4] Create sweep.yaml --- sweep.yaml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sweep.yaml diff --git a/sweep.yaml b/sweep.yaml new file mode 100644 index 00000000..9d391502 --- /dev/null +++ b/sweep.yaml @@ -0,0 +1,46 @@ +# Sweep AI turns bugs & feature requests into code changes (https://sweep.dev) +# For details on our config file, check out our docs at https://docs.sweep.dev/usage/config + +# This setting contains a list of rules that Sweep will check for. If any of these rules are broken in a new commit, Sweep will create an pull request to fix the broken rule. +rules: + - "All docstrings and comments should be up to date." + - "There should be no commented out code in the repository." + - "All error logs should use traceback during exceptions." + - "There should be no instances of `import pdb; pdb.set_trace()` in the code." + - "There should be no debug log or print statements in the code." + - "There should be no unused variables or imports in the code." + +# This is the branch that Sweep will develop from and make pull requests to. Most people use 'main' or 'master' but some users also use 'dev' or 'staging'. +branch: 'main' + +# By default Sweep will read the logs and outputs from your existing Github Actions. To disable this, set this to false. +gha_enabled: True + +# This is the description of your project. It will be used by sweep when creating PRs. You can tell Sweep what's unique about your project, what frameworks you use, or anything else you want. +# +# Example: +# +# description: sweepai/sweep is a python project. The main api endpoints are in sweepai/api.py. Write code that adheres to PEP8. +description: '' + +# This sets whether to create pull requests as drafts. If this is set to True, then all pull requests will be created as drafts and GitHub Actions will not be triggered. +draft: False + +# This is a list of directories that Sweep will not be able to edit. +blocked_dirs: [] + +# This is a list of documentation links that Sweep will use to help it understand your code. You can add links to documentation for any packages you use here. +# +# Example: +# +# docs: +# - PyGitHub: ["https://pygithub.readthedocs.io/en/latest/", "We use pygithub to interact with the GitHub API"] +docs: [] + +# Sandbox executes commands in a sandboxed environment to validate code changes after every edit to guarantee pristine code. For more details, see the [Sandbox](./sandbox) page. +sandbox: + install: + - trunk init + check: + - trunk fmt {file_path} + - trunk check --fix {file_path} From 62f509e84ffb7d9952c3c7f81697cad93bdc09eb Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:23:13 +0000 Subject: [PATCH 2/4] Create sweep template --- .github/ISSUE_TEMPLATE/sweep-template.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/sweep-template.yml diff --git a/.github/ISSUE_TEMPLATE/sweep-template.yml b/.github/ISSUE_TEMPLATE/sweep-template.yml new file mode 100644 index 00000000..98811de1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/sweep-template.yml @@ -0,0 +1,14 @@ +name: Sweep Issue +title: 'Sweep: ' +description: For small bugs, features, refactors, and tests to be handled by Sweep, an AI-powered junior developer. +labels: sweep +body: + - type: textarea + id: description + attributes: + label: Details + description: Tell Sweep where and what to edit and provide enough context for a new developer to the codebase + placeholder: | + Bugs: The bug might be in ... file. Here are the logs: ... + Features: the new endpoint should use the ... class from ... file because it contains ... logic. + Refactors: We are migrating this function to ... version because ... From ff0db0061e6cea10de25f911774bfefb9b1c3208 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:23:14 +0000 Subject: [PATCH 3/4] Create sweep slow template --- .github/ISSUE_TEMPLATE/sweep-slow-template.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/sweep-slow-template.yml diff --git a/.github/ISSUE_TEMPLATE/sweep-slow-template.yml b/.github/ISSUE_TEMPLATE/sweep-slow-template.yml new file mode 100644 index 00000000..1f238402 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/sweep-slow-template.yml @@ -0,0 +1,14 @@ +name: Sweep Slow Issue +title: 'Sweep (slow): ' +description: For larger bugs, features, refactors, and tests to be handled by Sweep, an AI-powered junior developer. Sweep will perform a deeper search and more self-reviews but will take longer. +labels: sweep +body: + - type: textarea + id: description + attributes: + label: Details + description: Tell Sweep where and what to edit and provide enough context for a new developer to the codebase + placeholder: | + Bugs: The bug might be in ... file. Here are the logs: ... + Features: the new endpoint should use the ... class from ... file because it contains ... logic. + Refactors: We are migrating this function to ... version because ... From 3720b9038c3fcc5ec8f4c77f56ea601f14bc6ac1 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:23:15 +0000 Subject: [PATCH 4/4] Create sweep fast template --- .github/ISSUE_TEMPLATE/sweep-fast-template.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/sweep-fast-template.yml diff --git a/.github/ISSUE_TEMPLATE/sweep-fast-template.yml b/.github/ISSUE_TEMPLATE/sweep-fast-template.yml new file mode 100644 index 00000000..ff4aab15 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/sweep-fast-template.yml @@ -0,0 +1,14 @@ +name: Sweep Fast Issue +title: 'Sweep (fast): ' +description: For few-line fixes to be handled by Sweep, an AI-powered junior developer. Sweep will use GPT-3.5 to quickly create a PR for very small changes. +labels: sweep +body: + - type: textarea + id: description + attributes: + label: Details + description: Tell Sweep where and what to edit and provide enough context for a new developer to the codebase + placeholder: | + Bugs: The bug might be in ... file. Here are the logs: ... + Features: the new endpoint should use the ... class from ... file because it contains ... logic. + Refactors: We are migrating this function to ... version because ...