Skip to content

feat(cmd): add import command

Description

This MR creates a new CLI command under variables which helps the user to "import" the CI/CD variables from JSON files as well as STDIN

Affected files:

  1. internal\commands\variable\import\import.go (new file)
  2. internal\commands\variable\import\import_test.go (new file)
  3. internal\commands\variable\variable.go

Related Issues

Resolves #7952

How has this been tested?

  1. I created a glab.exe by executing the main.go and ran the CLI command pointing to my personal fork and verified the existence of the variables under CI/CD section

Screenshots (if appropriate):

{CED1E8E2-2F93-4B34-A805-07FF7B4004EB}.png

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap
Edited by ajey muthiah

Merge request reports

Loading