GitHub Codespaces
Plugin details | |
---|---|
Created by | Aditya Singhal |
Category | Development |
Source | GitHub |
Type | Open-source plugin |
Limitations
- Any Codespace started using
EntityGithubCodespacesWidget
orEntityGithubCodespacesCard
action will create a new codespace with the exact same display name as the entity name. - Once the Codespace is created, you can only start the Codespace from the Widget/Card action.
- The plugin does not support GitHub Enterprise yet.
Configuration
Application configuration YAML
No action required
This plugin does not require you to add application configuration.
Secrets
This plugin requires the user to log in using the configured GitHub OAuth application. Make sure that you have a GitHub OAuth application created and configured in IDP. For instructions to configure a GitHub OAuth app, go to OAuth support for plugins.
Delegate proxy
No action required
This plugin does not require a delegate proxy to be set up because GitHub is publicly accessible.
Layout
This plugin exports a page and two card on the overview page, one to start a Codespace and another with a list of already active Codespace. Go to Admin > Layout, select Service in the dropdown menu, and then you could find the following YAML code auto-ingested:
...
- name: Overview
path: /
title: Overview
contents:
- component: EntityGithubCodespacesCard
specs:
gridProps:
md: 6
- component: EntityGithubCodespacesWidget
specs:
gridProps:
md: 6
...
- name: EntityGithubCodespacesContent
path: /github-codespaces-entity
title: CodespacesEntityContent
contents:
- component: EntitySwitch
specs:
cases:
- if: isGithubCodespacesAvailable
content:
component: EntityGithubCodespacesContent
- name: EntityGithubCodespacesRepoContent
path: /github-codespaces-repo
title: CodespacesRepoContent
contents:
- component: EntitySwitch
specs:
cases:
- if: isGithubCodespacesAvailable
content:
component: EntityGithubCodespacesRepoContent
...
The isGithubCodespacesAvailable
condition is met when the github.com/project-slug
annotation is present in the software components's catalog-info.yaml
definition file.
Annotations
If the catalog-info.yaml
descriptor file for the component is stored in GitHub, the github.com/project-slug
is automatically added as the org/repo
where the file is stored, as follows. You can as well add annotation for a custom devcontainer configuration with relative path of devcontainer.json
file from root of the repository. However, you can manually configure or override this setting:
metadata:
annotations:
github.com/project-slug: org/repo
github.com/devcontainer-path: .devcontainer/devcontainer.json
Support
The plugin is owned by an individual Aditya Singhal and managed in this Repository as an open-source project. Create a GitHub issue to report bugs or suggest new features for the plugin.