Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow GitLab edits to create & switch across new branches and source files #3089

Merged
merged 4 commits into from
Aug 22, 2024

Conversation

cuserox
Copy link
Contributor

@cuserox cuserox commented Aug 20, 2024

Why does this PR exist?

Closes #3076

Users were experiencing errors when switching from single / multi files or referencing new branches. Similar to ADO: #3071

What does this pull request do?

  • Adds checks in the GitLab client to create the necessary branch / file / directory before pushing
  • Creates the new branch based on the currently selected one in the plugin
  • Fallback to the previous state if the user doesn't push changes

Testing this change

  • Set up GitLab as a remote provider
  • Change some settings by going to: Settings ---> Edit your Sync provider
Screenshot 2024-08-20 at 13 37 08
  • Edit the details by:
    • Switching from a single file (tokens.json) to a multifile setup (themes)
    • Switching branches
  • Pushing to the remote should work as expected

@cuserox cuserox self-assigned this Aug 20, 2024
Copy link

changeset-bot bot commented Aug 20, 2024

🦋 Changeset detected

Latest commit: 21d9165

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tokens-studio/figma-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cuserox cuserox force-pushed the fix/3076-gitlab-multifile-creation branch from c7488f6 to 691e5ba Compare August 20, 2024 13:12
Copy link
Contributor

github-actions bot commented Aug 20, 2024

⤵️ 📦 ✨ The artifact was successfully created! Want to test it? Download it here 👀 🎁

Copy link
Contributor

github-actions bot commented Aug 20, 2024

Commit SHA:f142c68ef9a4f24bf595e7e2b22892eaa2c9a323

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: fix/3076-gitlab-multifile-creation 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 67.92 (0.01) 58.54 (-0.05) 64.56 (0) 68.32 (0.01)
🔴 packages/tokens-studio-for-figma/src/app/store/providers/gitlab/gitlab.tsx 95.55 (-0.54) 81.81 (-4.55) 100 (0) 96.87 (-0.65)
🟢 packages/tokens-studio-for-figma/src/storage/GitlabTokenStorage.ts 60 (0.55) 47.77 (0.21) 52 (0) 60.37 (0.58)

Copy link
Contributor

github-actions bot commented Aug 20, 2024

Commit SHA:f142c68ef9a4f24bf595e7e2b22892eaa2c9a323
Current PR reduces the test coverage percentage by 1 for some tests

@cuserox cuserox marked this pull request as ready for review August 20, 2024 15:43
@cuserox cuserox added bug Something isn't working sync gitlab plugin v2 variables, UI, WTCG format, Bitbucket labels Aug 20, 2024
@cuserox cuserox force-pushed the fix/3076-gitlab-multifile-creation branch from 8db2072 to 21d9165 Compare August 22, 2024 09:31
Copy link
Contributor

@macintoshhelper macintoshhelper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rbosker
Copy link
Collaborator

rbosker commented Aug 22, 2024

tested and worked properly!

@cuserox cuserox merged commit 1784f10 into main Aug 22, 2024
9 of 10 checks passed
@cuserox cuserox deleted the fix/3076-gitlab-multifile-creation branch August 22, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plugin v2 variables, UI, WTCG format, Bitbucket sync gitlab
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gitlab: creating a new folder structure from the plugin doesn't work.
3 participants