View GitLab issues associated with your services!
The GitLab Issues plugin shows open GitLab issues associated with the GitLab repository specified in the entity's cortex.yaml. If the cortex.yaml has a basepath defined in its x-cortex-git configuration, it will query for issues filtering by a label that matches the tag of the entity.
This plugin requires a proxy to GitLab. The API that the plugin uses is documented here, which details the type of headers you need defined.
- Define a secret that contains your GitLab Access Token. To determine which type of token to use, check the docs.
- Define a proxy that is pointed to your GitLab instance with the headers mentioned in the docs. Here is a screenshot of what your proxy may look like:
- Register the plugin.
- This plugin will not work on the Global context.
- Select an entity context (and, optionally, filter) that will have the GitLab repo in its
cortex.yaml
This plugin will connect to GitLab's cloud instance out of the box. If you are self-hosting GitLab and need to direct the plugin to a different API endpoint, update the following section of the Issues.tsx file:
// Set your GitLab url. Cloud is https://gitlab.com
const glURL = `https://gitlab.com/`;If you get the following message:
This means that the plugin did not find a GitLab repository defined as described here.
GitLab Issues Plugin is a Cortex plugin. To see how to run the plugin inside of Cortex, see our docs.
Developing and building this plugin requires either yarn or npm.
- Run
yarnornpm installto download all dependencies - Run
yarn buildornpm run buildto compile the plugin code into./dist/ui.html - Upload
ui.htmlinto Cortex on a create or edit plugin page - Add or update the code and repeat steps 2-3 as necessary
The following commands come pre-configured in this repository. You can see all available commands in the scripts section of package.json. They can be run with npm via npm run {script_name} or with yarn via yarn {script_name}, depending on your package manager preference. For instance, the build command can be run with npm run build or yarn build.
build- compiles the plugin. The compiled code root is./src/index.tsx(or as defined by webpack.config.js) and the output is generated intodist/ui.html.test- runs all tests defined in the repository using jestlint- runs lint and format checking on the repository using prettier and eslintlintfix- runs eslint in fix mode to fix any linting errors that can be fixed automaticallyformatfix- runs Prettier in fix mode to fix any formatting errors that can be fixed automatically
See available UI components via our Storybook.


