Skip to content

Export to GitLab

Export directly to GitLab to keep icons versioned with your code.

Prerequisites

  • GitLab token with api scope.
  • Developer (or higher) access to the target project.
  • Project ID (numeric) and server URL (gitlab.com or self-hosted).

Important

write_repository alone is not enough for the REST endpoints used. Include api.

Steps

  1. Settings → Sync Provider: choose GitLab, enter domain, project ID, and token.
  2. Scan your file.
  3. Click Export to Repository.
  4. The plugin:
    • Creates a branch figma-icons-update-{timestamp}
    • Commits optimized SVGs under the paths you defined
    • Opens a Merge Request and shows you the link
  5. Assign reviewers, add labels, and merge when ready.

svgo.config.js

js
export default {
  multipass: true,
  plugins: [
    'removeDimensions',
    { name: 'removeAttrs', params: { attrs: '(fill|stroke)' } },
    { name: 'convertPathData', params: { floatPrecision: 3 } }
  ]
}