GitHub Codespaces is the easiest way to get up and running for contributing to a Dapr repo. In as little as a single click, you can have an environment with all of the prerequisites ready to go in your browser.
To open a Dapr repository in a Codespace, select “Code” from the repo homepage and “Open with Codespaces”:
If you haven’t already forked the repo, creating the Codespace will also create a fork for you and use it inside the Codespace.
Developing a new Dapr component requires working with both the dapr/components-contrib and dapr/dapr repos. It is recommended to place both folders inside the /workspaces
directory, side-by-side.
dapr/dapr
If your Codespaces was started from the dapr/dapr
repo or a fork of that, you will need to clone the dapr/components-contrib
repository (or your fork of that) inside /workspaces/components-contrib
.
First, make sure you’ve authenticated with the GitHub CLI:
# Run this command and follow the prompts
# Most users should accept the default choices
gh auth login
Clone the repo:
# If you want to use your fork of dapr/components-contrib, replace this with your fork (e.g. "yourusername/components-contrib")
# Make sure you've forked the repo before doing this
REPO=dapr/components-contrib
cd /workspaces
gh repo clone "$REPO" /workspaces/components-contrib
Then, add the folder to current workspace:
code -a /workspaces/components-contrib
dapr/components-contrib
If your Codespaces was started from the dapr/components-contrib
repo or a fork of that, you will need to clone the dapr/dapr
repository (or your fork of that) inside /workspaces/dapr
.
First, make sure you’ve authenticated with the GitHub CLI:
# Run this command and follow the prompts
# Most users should accept the default choices
gh auth login
Clone the repo:
# If you want to use your fork of dapr/dapr, replace this with your fork (e.g. "yourusername/dapr")
# Make sure you've forked the repo before doing this
REPO=dapr/dapr
cd /workspaces
gh repo clone "$REPO" /workspaces/dapr
Then, add the folder to current workspace:
code -a /workspaces/dapr