Skip to content

Commit

Permalink
fix: Fix issue with layer opacity presenting in json (#135)
Browse files Browse the repository at this point in the history
Fixed issue with `layer-opacity` listed in token json. Also `web` scope has been added to commits and PR name

[category:Infrastructure]

Co-authored-by: Raisa Primerova <[email protected]>
  • Loading branch information
RayRedGoose and Raisa Primerova authored Dec 18, 2024
1 parent 0f93782 commit 84bea86
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# Only run if:
# - The commit message does not contain `[skip release]`
# - OR the workflow was manually triggered and has a `version` string
if: "(!contains(github.event.head_commit.message, '[skip release]') && (contains(github.event.head_commit.message, '(web)') || contains(github.event.head_commit.message, '(all)'))) || inputs.version"
if: "(!contains(github.event.head_commit.message, '[skip release]') && contains(github.event.head_commit.message, '(web)')) || inputs.version"
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function createSyncPullRequest(baseBranch = canvasTokensRepoParams.
base: baseBranch,
head: canvasTokensRepoParams.syncBranch,
maintainer_can_modify: true,
title: 'chore: Sync Tokens Studio config 🤖',
title: 'chore(web): Sync Tokens Studio config 🤖',
body: getPullRequestTemplate(),
});
}
2 changes: 1 addition & 1 deletion scripts/utils/sync-base-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function syncBaseConfig() {
repo: canvasTokensRepoParams.repo,
path: canvasTokensRepoParams.baseConfigPath,
branch: canvasTokensRepoParams.syncBranch,
message: 'chore: Sync base tokens config',
message: 'chore(web): Sync base tokens config',
// If this is a new file, there will be no existing sha to reference.
sha: canvasTokensConfig ? canvasTokensConfig.sha : undefined,
content: encodedConfig,
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/sync-brand-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function syncBrandConfig() {
repo: canvasTokensRepoParams.repo,
path: canvasTokensRepoParams.brandConfigPath,
branch: canvasTokensRepoParams.syncBranch,
message: 'chore: Sync brand tokens config',
message: 'chore(web): Sync brand tokens config',
// If this is a new file, there will be no existing sha to reference.
sha: canvasTokensConfig ? canvasTokensConfig.sha : undefined,
content: encodedConfig,
Expand Down
9 changes: 6 additions & 3 deletions scripts/utils/sync-sys-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ function filterNonWebTokens(config: Record<string, object>) {
// If the key is in the non web tokens, iterate over its tokens
if (key in nonWebTokens) {
for (const token in tokenSet) {
const nonWebTokenSet = nonWebTokens[key as keyof typeof nonWebTokens];
const nonWebTokenSet: string[] = nonWebTokens[key as keyof typeof nonWebTokens];
if (!nonWebTokenSet.length) {
delete config[key];
}
// If the token is non web, delete it from the config object
if (!nonWebTokenSet.length || (nonWebTokenSet as string[]).includes(token)) {
if (nonWebTokenSet.includes(token)) {
delete config[key][token as keyof typeof tokenSet];
}
}
Expand Down Expand Up @@ -96,7 +99,7 @@ export async function syncSystemConfig() {
repo: canvasTokensRepoParams.repo,
path: canvasTokensRepoParams.sysConfigPath,
branch: canvasTokensRepoParams.syncBranch,
message: 'chore: Sync system tokens config',
message: 'chore(web): Sync system tokens config',
// If this is a new file, there will be no existing sha to reference.
sha: canvasSystemTokensConfig ? canvasSystemTokensConfig.sha : undefined,
content: encodedConfig,
Expand Down

0 comments on commit 84bea86

Please sign in to comment.