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.
- The left sidebar lists codebases and open draft changes from your organization — click on a codebase or draft change to navigate to it
- 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
- The bottom left corner has a bell icon — click the icon to open the notifications panel
- 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
Create a Sturdy standalone codebase
- Click on the three dots icon in the top left corner and select "New codebase"
- 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).
- Click on the three dots icon in the top left corner and select "Settings"
- Go to the GitHub-tab
- Authenticate yourself with GitHub
- Update the GitHub installation, selecting one or multiple repositories
- On GitHub, select the organization which contains the codebase you wish to setup
- You will be redirected back to Sturdy
- On Sturdy, click "Setup" on the repositories that you want to use from Sturdy
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:
- A getting started panel
- The most recent changes
- A file explorer with the contents of the codebase
- The README.md file
- A list of collaborators
Connecting a directory
With the codebase selected:
- Connect a directory where you want to have the code by clicking the "Connect directory" button
- 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.
- Observe that a new draft change was created with the name "Untitled Draft". In Sturdy, work always happens inside a draft change.
- Open draft changes are listed in the sidebar on the left, below the codebase
- Press the "Edit" button at the top of the page and rename it to "My first change"
- Any changes made files in the connected directory will show up here
- 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:
- Open the connected folder on your computer with an IDE or text editor of your choice
- The directory connected to this draft is indicated at the top
- Optional: Open the codebase in Visual Studio Code with the "Open in" button
- Using your editor, open a file in the codebase and make some changes to it
- 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:
- Write a description of your changes in the text box at the top
- The description is automatically saved
- 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:
- Click the "Create pull request" button at the top
- Two new buttons will appear ("Update pull request" and "Merge")
- Click the "Merge" button. This is the same action as hitting "Merge" on GitHub, but without leaving Sturdy
- 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:
- Navigate to the codebase overview by clicking on the codebase in the sidebar on the left
- The panel with recent changes now contains the change that you just created
- Click on the Changelog
- You can see the list of changes, including the one you've just created
- 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
You can read more about: