Skip to content

Commit

Permalink
Merge branch 'master' of github.com:xola/ui-kit into react-upgrade
Browse files Browse the repository at this point in the history
# By Manoj Vaibhav (18) and others
# Via GitHub (10) and others
* 'master' of github.com:xola/ui-kit: (98 commits)
  XS-414 weekdays bug fix and removed unnecessary console log (xola#348)
  XS-30 | Multi language support - Xola app content (xola#334)
  Do not checkout & run workflow if user is not in Xola (xola#347)
  Explicitly specify GITHUB_TOKEN
  Set `permissions` on eslint.yml workflow
  Use default token
  Update token for eslint annotate
  2.3.12
  Update eslint.yml
  X2-10410 Dashboard search overlap issue fix (xola#342)
  2.3.11
  X2-10394 Cannot filter by date range in Purchases tab for seller (xola#341)
  2.3.10
  Update to use  event
  X2-10221 | fixed datepicker for specific case (xola#336)
  X2-9433 Breakdown Item line fix (xola#337)
  2.3.8
  X2-10131 Mobile browser: The page refreshes when you try to select a message template in the Send a Message pop-up if zoomed in (xola#333)
  2.3.7
  X2-9962 Lazy mounting for popovers for performance (xola#330)
  ...

# Conflicts:
#	.github/workflows/deploy.yml
#	.xo-config.json
#	package-lock.json
#	package.json
#	src/components/Forms/BaseInput.jsx
#	src/helpers/browser.js
  • Loading branch information
rushi committed Sep 20, 2024
2 parents fa819ab + ff00cfe commit adbbda5
Show file tree
Hide file tree
Showing 298 changed files with 2,357 additions and 1,053 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Chromatic"

on:
push:
pull_request_target:
pull_request:
types: [assigned, opened, synchronize, reopened]

jobs:
Expand All @@ -15,7 +15,9 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 16
cache: "npm"
cache-dependency-path: "package-lock.json"

- name: Install dependencies
run: npm ci
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/deploy-icons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish @xola/icons

on:
workflow_dispatch:
inputs:
tag:
description: "Tag version"
default: latest
required: true

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: "package-lock.json"
registry-url: https://registry.npmjs.org/

- run: cd src/icons && pwd && npm ci

- name: Publish to @xola/icons
run: cd src/icons && pwd && npm publish --tag ${{ github.event.inputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
registry-url: https://registry.npmjs.org/
12 changes: 9 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Node.js Package
name: Publish @xola/ui-kit

on:
workflow_dispatch:
inputs:
tag:
description: "Tag version"
default: next
default: latest
required: true

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: "package-lock.json"
registry-url: https://registry.npmjs.org/

- run: npm ci

- run: npm run build

- run: npm publish --tag ${{ github.event.inputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
57 changes: 0 additions & 57 deletions .github/workflows/eslint-annotate.yml

This file was deleted.

100 changes: 69 additions & 31 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,77 @@
name: Run ES Lint
name: Lint

on:
push:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
push:
# Runs against the workflow and code from the merge commit
# pull_request:
# types: [ opened, synchronize, reopened ]
# Runs against the workflow and code from the base of the pull request
pull_request_target:
types: [opened, synchronize, reopened]

env:
DISABLE_PROGRESS: true
DISABLE_PROGRESS: true

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
checks: write

jobs:
RunLint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
token: "${{ secrets.ES_LINT_TOKEN }}"
ref: ${{github.event.pull_request.head.sha}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Node.JS 16
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install Node Dependencies
run: npm ci
env:
CI: TRUE

- name: Lint Report
# This is to show the failures in Github actions
run: npm run lint
continue-on-error: true
Lint:
name: ⚡ ES Lint
runs-on: ubuntu-latest

steps:
- name: Check user for team affiliation
uses: tspascoal/get-user-teams-membership@v2
id: checkUserMember
with:
GITHUB_TOKEN: ${{ secrets.ES_LINT_TOKEN }}
username: ${{ github.actor }}
organization: xola
team: 'Engineering,X2 Consultants'

- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'false' }}
run: |
echo "Hey ${{ github.actor }} you are not in a whitelisted team"
exit 1
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{github.event.pull_request.head.sha}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Node.JS 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: "package-lock.json"

- name: Install Node Dependencies
run: npm ci --no-fund --no-audit

- name: Save Code Linting Report to JSON
# This is to show failures in GitHub pull request using the action below
run: npm run lint:report
continue-on-error: true

- name: Annotate Code Linting Results
uses: ataylorme/[email protected]
with:
check-name: "View Lint Report"
markdown-report-on-step-summary: true
repo-token: ${{ secrets.GITHUB_TOKEN }}
report-json: "eslint_report.json"

# # OPTIONAL: save a copy of the usage report for download or use in another job
# # Save a copy of the usage report for download or use in another job
# - name: Upload ESLint report
# uses: actions/upload-artifact@v3
# with:
# name: eslint_report.json
# path: eslint_report.json
45 changes: 45 additions & 0 deletions .github/workflows/link-jira-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Link TOOLS Ticket to PR
# URL: https://github.com/marketplace/actions/add-jira-info-to-pull-request#how-to-get-the-jira-token-and-jira-username
# The following formats will work:
# PRJ-1234-some-short-description
# feature/PRJ-1234_some-short-description
# some-short-description_PRJ-1234
# feature/some-short-description_PRJ-1234
# feature/PRJ-1234_some-short-description

on:
pull_request:
types:
- opened
- synchronize
- reopened
workflow_dispatch:

permissions:
contents: read
pull-requests: write

jobs:
automation:
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.XOLA_GITHUB_APP_ID }}
private_key: ${{ secrets.XOLA_GITHUB_APP_PRIVATE_KEY }}

- name: Add Jira info
uses: contractify/add-jira-info@v1
with:
github-token: ${{ steps.generate_token.outputs.token }}
jira-base-url: https://xola01.atlassian.net/
jira-username: [email protected]
jira-token: ${{ secrets.RUSHI_JIRA_API_KEY }}
jira-project-key: TOOLS
add-label-with-issue-type: true
issue-type-label-color: FBCA04
issue-type-label-description: 'Jira Issue Type'
add-jira-key-to-title: true
add-jira-key-to-body: true
45 changes: 45 additions & 0 deletions .github/workflows/link-jira-x2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Link X2 Ticket to PR
# URL: https://github.com/marketplace/actions/add-jira-info-to-pull-request#how-to-get-the-jira-token-and-jira-username
# The following formats will work:
# PRJ-1234-some-short-description
# feature/PRJ-1234_some-short-description
# some-short-description_PRJ-1234
# feature/some-short-description_PRJ-1234
# feature/PRJ-1234_some-short-description

on:
pull_request:
types:
- opened
- synchronize
- reopened
workflow_dispatch:

permissions:
contents: read
pull-requests: write

jobs:
automation:
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.XOLA_GITHUB_APP_ID }}
private_key: ${{ secrets.XOLA_GITHUB_APP_PRIVATE_KEY }}

- name: Add Jira info
uses: contractify/add-jira-info@v1
with:
github-token: ${{ steps.generate_token.outputs.token }}
jira-base-url: https://xola01.atlassian.net/
jira-username: [email protected]
jira-token: ${{ secrets.RUSHI_JIRA_API_KEY }}
jira-project-key: X2
add-label-with-issue-type: true
issue-type-label-color: FBCA04
issue-type-label-description: 'Jira Issue Type'
add-jira-key-to-title: true
add-jira-key-to-body: true
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish to GitHub Pages
name: Publish UI Kit Storybook

on:
push:
Expand All @@ -14,7 +14,9 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 16
cache: "npm"
cache-dependency-path: "package-lock.json"

- name: Install dependencies
run: npm ci
Expand Down
15 changes: 14 additions & 1 deletion .xo-config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
{
"ignorePatterns": ["src/stories", "**/*.test.js*", "**/*.test.ts*", "**/test/**/*.*"]
"ignorePatterns": [
"src/stories",
"**/*.test.js*",
"**/*.test.ts*",
"**/test/**/*.*"
],
"rules": {
"complexity": [
"warn",
{
"max": 25
}
]
}
}
Loading

0 comments on commit adbbda5

Please sign in to comment.