Skip to content

Commit

Permalink
🎉 Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGaibler committed Oct 10, 2024
0 parents commit 41ce98b
Show file tree
Hide file tree
Showing 45 changed files with 7,007 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist/
.DS_Store
18 changes: 18 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* eslint-disable no-undef */
// eslint-disable-next-line no-undef
module.exports = {
env: {
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
},
plugins: ['@typescript-eslint'],
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @cwzilla @jsimplicio @JulianGaibler
31 changes: 31 additions & 0 deletions .github/workflows/apply-import.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Variable Import Check (apply to file)'

on:
workflow_dispatch:
inputs:
figmaUrl:
type: 'string'
description: 'URL of the branch to import and update variables'
required: true

jobs:
checks:
runs-on: 'ubuntu-latest'
environment: 'Actions'
name: 'Check if there are potential updates to the Figma Desktop Styles'
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Install dependencies
run: npm ci --production
- name: Check for updates and apply them
uses: './dist'
with:
FIGMA_URL: '${{ github.event.inputs.figmaUrl }}'
FIGMA_ACCESS_TOKEN: '${{ secrets.FIGMA_ACCESS_TOKEN }}'
SLACK_WEBHOOK_FAILURE: '${{ secrets.SLACK_WEBHOOK_FAILURE }}'
DRY_RUN: 'false'
29 changes: 29 additions & 0 deletions .github/workflows/import-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Variable Import Check (read-only)'

on:
schedule:
- cron: '0 16 * * 2' # Every Tuesday at 4 PM UTC
workflow_dispatch: # Allows manual trigger

jobs:
checks:
runs-on: 'ubuntu-latest'
environment: 'Actions'
name: 'Check if there are potential updates to the Figma Desktop Styles'
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Install dependencies
run: npm ci --production
- name: Check for updates
uses: './dist'
with:
FIGMA_URL: ${{ secrets.MAIN_FIGMA_URL }}
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}
SLACK_WEBHOOK_SUCCESS: ${{ secrets.SLACK_WEBHOOK_SUCCESS }}
SLACK_WEBHOOK_FAILURE: ${{ secrets.SLACK_WEBHOOK_FAILURE }}
DRY_RUN: 'true'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
node_modules/
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist/
.DS_Store
7 changes: 7 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
semi: false,
trailingComma: 'all',
singleQuote: true,
printWidth: 80,
tabWidth: 2,
}
Loading

0 comments on commit 41ce98b

Please sign in to comment.