From 4ee1a3f4e01ce4fc41e7c018d5dc56912571a503 Mon Sep 17 00:00:00 2001 From: Will Gillis <40799239+t-will-gillis@users.noreply.github.com> Date: Tue, 2 Apr 2024 18:53:03 -0700 Subject: [PATCH 1/2] Create `compliance.yaml` workflow (#650) * Create compliance.yaml Initial commit for `compliance.yaml` * Update compliance.yaml Renamed step, modified console.log() messages, and add flag for comment with nonvalid or missing linked issue * Update compliance.yaml tweak to successful console.log() * tweak successful console.log() * replace if-else with try-catch at API call to verify issue number * edit to comment message * use array destructuring to assign keyword and issueNumber * remove blanklines at file end, add to comment ln 25 * need ',' in array destructuring * Formatted with Prettier * replaced non-standard ellipsis line 34 * Added linebreaks, reformatted as guard clause, minor edits to messaging --- .github/workflows/compliance.yaml | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/compliance.yaml diff --git a/.github/workflows/compliance.yaml b/.github/workflows/compliance.yaml new file mode 100644 index 00000000..d0fcc8d6 --- /dev/null +++ b/.github/workflows/compliance.yaml @@ -0,0 +1,63 @@ +name: Compliance + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + - unassigned + +jobs: + check-for-linked-issue: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Check for keyword and issue number + id: check-for-keyword + uses: actions/github-script@v7 + with: + script: | + // Retrieve body of context.payload and search for GitHub keywords + const prBody = context.payload.pull_request.body; + const prNumber = context.payload.pull_request.number; + const prOwner = context.payload.pull_request.user.login; + const regex = /(? Date: Sat, 6 Apr 2024 15:05:31 -0700 Subject: [PATCH 2/2] Fix CI/CD Pipeline Errors (#653) * test: fix date input test * config: set ignore for eslint * fix: update ci scripts to use package versions for dependencies --- .eslintignore | 8 ++++++++ package.json | 4 ++-- packages/ui/src/components/calendar/calendar.tsx | 1 + packages/ui/src/components/date-input/date-input.test.tsx | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..6e76dbec --- /dev/null +++ b/.eslintignore @@ -0,0 +1,8 @@ +*-lock.* +.pnpm-store +build +coverage +data +dist +node_modules +package.* diff --git a/package.json b/package.json index a86fec21..afe1c06f 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "index.js", "scripts": { "build": "pnpm nx run-many --target=build --output-style=stream --all", - "ci:format": "pnpm dlx prettier --check --ignore-unknown '**/*.{css,js,json,jsx,md,ts,tsx,yaml}'", - "ci:lint": "pnpm dlx eslint --fix-dry-run '**/*.{js,jsx,ts,tsx}'", + "ci:format": "prettier --check --ignore-unknown '**/*.{css,js,json,jsx,md,ts,tsx,yaml}'", + "ci:lint": "eslint --fix-dry-run '**/*.{js,jsx,ts,tsx}'", "clean": "rm -rf dist node_modules && pnpm --recursive --parallel exec rm -rf dist node_modules", "dev": "pnpm nx run-many --target=dev --output-style=stream --all", "graph": "pnpm nx graph", diff --git a/packages/ui/src/components/calendar/calendar.tsx b/packages/ui/src/components/calendar/calendar.tsx index 97175467..c47f0b13 100644 --- a/packages/ui/src/components/calendar/calendar.tsx +++ b/packages/ui/src/components/calendar/calendar.tsx @@ -141,6 +141,7 @@ export default function Calendar({ initDate = new Date(), onSelectValueChange }: return (