Forem Creators and Builders 🌱

Cover image for Contribute to Forem 🌱 in Gitpod on your own fork
Bogdan Covrig
Bogdan Covrig

Posted on • Originally published at dev.to on

Contribute to Forem 🌱 in Gitpod on your own fork

To follow-up on @ben's post, Gitpod allows you to spin up Forem's codebase on the cloud and makes it available to you in the browser. Really, a fully working local instance in your browser. Within minutes.

If you already tried to spin up Forem on Gitpod as the documentation describes, most probably you couldn't push the changes. That is perfectly normal; contributors are not allowed to (and they shouldn't) push changes directly into the original repo.

remote: Permission to forem/forem.git denied to BogDAAAMN.
fatal: unable to access 'https://github.com/forem/forem/': The requested URL returned error: 403
Enter fullscreen mode Exit fullscreen mode

The solution is to push the changes to your Forem fork instead. The fastest way to do that is to change the origin of the project. Gitpod allows that in a bunch of ways.

Option 1. Good old git remote

If you take a quick look at the remote right after Gitpod's initialization, the origin is pointing to the Forem repository. If you push now, naturally, the changes go to the origin.

$ git remote -v
origin https://github.com/forem/forem.git (fetch)
origin https://github.com/forem/forem.git (push)
Enter fullscreen mode Exit fullscreen mode

To work this out, fire up a terminal in Gitpod and set the origin to your Forem fork (assuming you already have one).

$ git remote set-url origin https://github.com/<YOUR_USERNAME>/forem
$ git remote -v
origin https://github.com/<YOUR_USERNAME>/forem.git (fetch)
origin https://github.com/<YOUR_USERNAME>/forem.git (push)
Enter fullscreen mode Exit fullscreen mode

Cool, from now on you will push your commits to the new origin – your fork.

You still need to add the Forem repository as upstream because you will need to pull and fetch the latest changes from forem/forem.

$ git remote add upstream https://github.com/forem/forem
$ git remote -v
origin https://github.com/<YOUR_USERNAME>/forem.git (fetch)
origin https://github.com/<YOUR_USERNAME>/forem.git (push)
upstream https://github.com/forem/forem.git (fetch)
upstream https://github.com/forem/forem.git (push)
Enter fullscreen mode Exit fullscreen mode

Option 2. Gitpod UI

A visual approach to changing the origin to your fork is to use the Gitpod UI Git panel (left side toolbar). Click on the Git button. If the remote repository is set to forem/forem and you don't have the right to push changes, a yellow warning will appear stating that You don't have push permissions for forem/forem.

A quick fix is to click on the Fork button.

Gitpod Git panel

Gitpod's command palette will pop up, asking you to Switch to existing fork.

If you didn't fork the Forem repo yet, you will have to provide access to Gitpod to create one. Then you will be able to switch to the freshly created one.

Gitpod Command Pallete

Cool, now wait for confirmation. Once the prompt (bottom right-hand side) says that the remote was successfully changed to your fork, you are good to go! Gitpod took care of changing the remote of the repo for you.

Gitpod Confirmation Prompt

Option 3. Your fork instance on Gitpod

As explained in the community forum, Gitpod will fire up any repository URL you provide.

If you already forked Forem, you can simply paste your repo URL into https://gitpod.io/#<URL>. Gitpod will clone your fork and spin up the Forem local instance in your browser.

https://gitpod.io/#https://github.com/<YOUR_USERNAME>/forem
Enter fullscreen mode Exit fullscreen mode

Finale

Comment for #2321

This is absolutely amazing, I've been dreaming of making this happen.

@jankeromnes just sign the CLA and this is good to go.

I absolutely love Gitpod for removing a lot of friction from running Forem on my machine. Pretty awesome how it makes it possible to fiddle with the code within minutes. It helps a lot if you always mess up trying to install the right Ruby version locally :)

However, there are still issues and bugs that the community encountered while trying to work on Gitpod. Fell free to Pull Request along!

Incorrect node version used in GitPod #8849

Describe the bug Creating a new GitPod instance leads to a bug where under gem install solargraph; bin/setup && bin/startup the bin/setup script fails at yarn install due to incorrect node version being used (which is 12.18.x).

The GitPod Dockerfile does handle the installation of nvm and correct node version, but forgets to switch to the correct node version (12.16.3).

To Reproduce

  1. Create a GitPod Workspace with https://gitpod.io/#https://github.com/thepracticaldev/dev.to
  2. Wait till bundle install finishes in the third workspace/dev.to tab completes.
  3. Yarn throws the error as indicated in screenshot below.

Expected behavior Correct node version is selected in nvm, which allows the yarn install command to complete successfully.

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Version: 83

Additional context The nvm use command can be of help.

continue button on ¨onboarding welcome message¨ is not working #9195

Issue: continue button on ¨onboarding welcome message¨ is not working

Platform: Gitpod Oauth: Github

Did I miss configuring something?

Love 🌱🌱

Oldest comments (0)