Using Sturdy

This tutorial takes you from setting up Sturdy with a repository from GitHub to merging a pull request from Sturdy. Make sure you have completed the Sturdy quick start before continuing.

UI Overview

Sturdy UI overview
  1. The left sidebar lists codebases and open draft changes from your organization — click on a codebase or draft change to navigate to it
  2. The top left corner has a icon with tree dots — click the icon to open a menu with additional actions, such as creating a new codebase
  3. The bottom left corner has a bell icon — click the icon to open the notifications panel
  4. The bottom left corned also shows your avatar and a gearbox icon — click on either of them to go to your profile settings

Your first codebase

In Sturdy you can create a codebase in two ways:

  • Create new codebases [go to]
  • Connect one or multiple existing repositories from GitHub [go to]
ℹ️ If you are running a self-hosted Sturdy instance and would like to connect a GitHub repository, you will need to first perform additional setup.
Follow this guide before continuing.

Create a Sturdy standalone codebase

  1. Click on the three dots icon in the top left corner and select "New codebase"
  2. Type in a codebase name and press "Create"

Setup Sturdy on a GitHub repository

Repositories imported from GitHub will remain up-to-date with changes made outside of Sturdy (read more).

  1. Click on the three dots icon in the top left corner and select "Settings"
  2. Go to the GitHub-tab
  3. Authenticate yourself with GitHub
  4. Update the GitHub installation, selecting one or multiple repositories Updating the selected repositories on GitHub
  5. On GitHub, select the organization which contains the codebase you wish to setup
  6. Selecting repository access on GitHub
  7. You will be redirected back to Sturdy
  8. On Sturdy, click "Setup" on the repositories that you want to use from Sturdy
  9. Creating a Sturdy codebase connected to a GitHub repository

Exploring the codebase

Navigate to the codebase by selecting it's name in the sidebar on the left. This page shows you an overview of the codebase that shows you the following:

  1. A getting started panel
  2. The most recent changes
  3. A file explorer with the contents of the codebase
  4. The README.md file
  5. A list of collaborators

Connecting a directory

With the codebase selected:

  1. Connect a directory where you want to have the code by clicking the "Connect directory" button
  2. Connecting a local directory to a Sturdy draft change
  3. Select a directory where you want to have the code in. Sturdy will create a new directory inside the directory that you select with the same name as the codebase.
  4. Observe that a new draft change was created with the name "Untitled Draft". In Sturdy, work always happens inside a draft change.
  5. Open draft changes are listed in the sidebar on the left, below the codebase
  6. Press the "Edit" button at the top of the page and rename it to "My first change"
  7. Any changes made files in the connected directory will show up here
  8. The folder you chose is connected to this draft. This is indicated at the top of the draft change page.

Creating your first change

With the draft change "My first change" selected:

  1. Open the connected folder on your computer with an IDE or text editor of your choice
    1. The directory connected to this draft is indicated at the top
    2. Optional: Open the codebase in Visual Studio Code with the "Open in" button
    Creating your first change on Sturdy
  2. Using your editor, open a file in the codebase and make some changes to it
  3. Within Sturdy — observe that changes you make are displayed as diffs in the "My first change" draft

Describing your changes

With the draft "My first change" selected:

  1. Write a description of your changes in the text box at the top
    1. The description is automatically saved
  2. Observe that after a description has been provided a "Create pull request" button appears

Creating and merging a pull request

With the draft change "My first change" selected and a description provided:

  1. Click the "Create pull request" button at the top
  2. Change description in a Sturdy draft change
  3. Two new buttons will appear ("Update pull request" and "Merge")
  4. Click the "Merge" button. This is the same action as hitting "Merge" on GitHub, but without leaving Sturdy
  5. Managing a GitHub Pull Request from Sturdy
  6. After a few seconds the PR will be merged. A new draft change will automatically be created for you, so that you're ready to code again right away!
ℹ️ If your repository on GitHub requires approvals for pull requests, use the "Go to pull request" link in order to open the pull request in the browser.

Exploring the codebase changelog

After the pull request from the "My first change" draft has been merged:

  1. Navigate to the codebase overview by clicking on the codebase in the sidebar on the left
  2. The panel with recent changes now contains the change that you just created
  3. Click on the Changelog
  4. You can see the list of changes, including the one you've just created
  5. Exploring previous changes
  6. Observe that on the right side you have a list of older changes — click on any of them to show you the details of that change

Next steps

You can read more about: