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 bitbucket folder sync pull #3072

Merged
merged 8 commits into from
Aug 16, 2024
Merged

Conversation

akshay-gupta7
Copy link
Contributor

Why does this PR exist?

Resolves #3070

In the 2.0 version of the plugin, the users are unable to fetch sets from Bitbucket remote storage, when the sets are in a folder structure. For example if a set exists as folder1/set1, it shall be unable to fetch it and even delete the existing folder sets.

What does this pull request do?

  • This PR scans through the response of the Bitbucket API and filters the directories as well(which was earlier being ignored), and then fetches the sets in json format from each of those folders.
  • It then scans through all the json files(which was being done previously as well, but now includes the folder structure sets as well)

Testing this change

  • Create a set in a folder,
  • Add some tokens in the set
  • Push to Bitbucket
  • Then pull from Bitbucket
  • Expected: It should not wipe the folder sets and pull the sets in the folder

@akshay-gupta7 akshay-gupta7 self-assigned this Aug 15, 2024
Copy link

changeset-bot bot commented Aug 15, 2024

🦋 Changeset detected

Latest commit: 92786ad

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

Copy link
Contributor

github-actions bot commented Aug 15, 2024

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

Copy link
Contributor

github-actions bot commented Aug 15, 2024

Commit SHA:576fb0487442f42e97665e696d357a3bd3b96dde

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: fix-bitbucket-folder-sync-pull 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 67.94 (-0.02) 58.69 (-0.01) 64.72 (-0.03) 68.33 (-0.02)
🔴 packages/tokens-studio-for-figma/src/storage/BitbucketTokenStorage.ts 63.63 (-3.03) 63.41 (-0.69) 68.42 (-6.58) 63.51 (-3.15)

Copy link
Contributor

github-actions bot commented Aug 15, 2024

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

@akshay-gupta7 akshay-gupta7 marked this pull request as draft August 15, 2024 08:10
@akshay-gupta7 akshay-gupta7 added bug Something isn't working sync bitbucket plugin v2 variables, UI, WTCG format, Bitbucket labels Aug 15, 2024
@akshay-gupta7 akshay-gupta7 marked this pull request as ready for review August 15, 2024 10:06
Copy link
Collaborator

@six7 six7 left a comment

Choose a reason for hiding this comment

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

super minor comments, otherwise good to merge!

.changeset/mighty-cooks-punch.md Outdated Show resolved Hide resolved
@akshay-gupta7 akshay-gupta7 merged commit a75f03b into main Aug 16, 2024
7 of 8 checks passed
@akshay-gupta7 akshay-gupta7 deleted the fix-bitbucket-folder-sync-pull branch August 16, 2024 06:38
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 bitbucket
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BitBucket: push/pull for sets using folders not working properly
2 participants