Context URL

Gitpod understands a variety of common situations you experience as part of your development workflow and automates repetitive tasks, giving you time to focus on more impactful work.

The context is determined by a Gitpod URL’s anchor, i.e. the link provided at the end of the # character in the gitpod.io/# URL.

Regardless of the context, Gitpod performs the tasks configured in .gitpod.yml if this configuration file is available for a given repository.

Gitpod is aware of the following contexts:

Please note, these contexts are supported for GitHub, GitLab, and Bitbucket. This also includes Self-Hosted installations of these git providers, where available.

Repository Context

To start a new workspace, you prefix your repository URL with gitpod.io/#. E.g. gitpod.io/#github.com/gitpod-io/workspace-images.

This is the most basic context and Gitpod simply checks out the default branch and opens the Welcome screen once the workspace is ready.

An example URL for the repository context is:

gitpod.io/#https://github.com/gitpod-io/workspace-images

Branch and Commit Contexts

The branch and commit contexts are very similar to the repository context described above. When you open a new workspace for a given branch or commit, Gitpod automatically checks out that branch or commit, allowing you to browse the repository on that branch or at the time of the given commit.

An example URL for the branch context is:

gitpod.io/#https://github.com/gitpod-samples/awesome-gitpod/tree/main

An example URL for the commit SHA context is:

gitpod.io/#https://github.com/gitpod-samples/awesome-gitpod/commit/32715a0c3ce3ce9f1f4d61d7d81ee0b097bf374d

Issue Context

The fastest way to work on an issue is to start a Gitpod workspace with an issue context. Gitpod automatically creates a local branch based on the following pattern:

language icon language: 
text
<your-username>/<issue-title>-<issue-number>

This branch is based on the most recent commit in your project’s default branch.

You can commit your changes with the git command line interface or use the Source Control panel on the left side of the editor. From there, you can also create a new pull/merge request without leaving Gitpod.

An example URL for the issue context is:

gitpod.io/#https://github.com/gitpod-samples/awesome-gitpod/issues/14

Pull/Merge Request Context

Note: Currently pull-request based context URLs are only supported by GitHub authentication as a Gitpod authentication method.

When Gitpod recognizes a pull or merge request context, it knows you most likely have one of two intentions:

  • As a reviewer, provide PR/MR feedback
  • As an author, process feedback and update the code

In either case, Gitpod automatically performs the following tasks for you:

  1. Starts a workspace with the correct branch checked out
  2. Opens the PR/MR review panel where you can see and contribute to existing conversations
  3. Displays a list of files changed as part of that PR/MR
  4. Enables you to leave comments right within individual files (yep, no need to switch between the code and the PR/MR in your browser)

In addition, Gitpod lets you merge a PR/MR. Once merged, you close the browser tab and move on to your next task - in a new, ephemeral developer environment 🎉.

An example URL for the pull/merge request context is:

gitpod.io/#https://github.com/gitpod-samples/template-typescript-react/pull/16

Was this helpful?