Tutorial for Getting Started with Sweep
We recommend using an existing real project for Sweep, but if you must start from scratch, we recommend using a template. In particular, we recommend Vercel templates and Vercel auto-deploy, since Vercel's auto-generated previews make it easy to review Sweep's PRs
- Go to https://vercel.com/templates/next.js/docusaurus-2 (opens in a new tab) (or another template) and click "Deploy".
- Vercel will prompt you to select a GitHub account and click "Clone" after. This will trigger a build and deploy which will take a few minutes. Once the build is done, you will be greeted with a congratulations message.
Go to the Sweep Installation (opens in a new tab) page and click the grey "Configure" button or the green "Install" button. Ensure that that the Vercel template (i.e. Docusaurus) is configured to use Sweep.
Go to your Docusaurus fork (https://github.com/USERNAME/docusaurus-2 (opens in a new tab)) and create an issue prefixed with "Sweep:", such as "Sweep: Add a banner at the top asking the user to star the docusaurus repo with the current number of stars".
- After about 5 minutes, Sweep will make a PR to your Docusaurus fork. If you go to the PR, you will see a Vercel preview.
a. If the PR's preview looks completely wrong, you can add more details to the issue description or title like "Use shields.io and make sure this is at the very top of the repo. Make sure it's aesthetic, centered and set the background color of the banner to lime.". Sweep will make a new PR with a new preview like the following:
b. If the PR is mostly right but you want to do some tweaking, you can leave a comments on the PR or code and Sweep will address the comments, also generating a new preview, like the following:
c. If you have GitHub Actions set up, it will automatically run the linters, build, and tests and will show any failed logs to Sweep to handle. This only works with GitHub Actions and not other CI providers, so unfortunately for Vercel we have to copy paste manually.
- Once you are happy with the PR, you can merge it and it will be deployed to production via Vercel.
You can see the final example at https://github.com/kevinlu1248/docusaurus-2/pull/4 (opens in a new tab) with preview https://docusaurus-2-ql4cskc5o-sweepai.vercel.app/ (opens in a new tab).
Now to be a Sweep power user, check out Advanced: becoming a Sweep power user (opens in a new tab).