From 85745a9e01005dba6510a4f7c8bfbe46be4784e9 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Mon, 22 Jul 2024 14:35:08 -0400 Subject: [PATCH 1/6] Update pr-annotations.yaml --- .github/workflows/pr-annotations.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-annotations.yaml b/.github/workflows/pr-annotations.yaml index d943317..9fd7285 100644 --- a/.github/workflows/pr-annotations.yaml +++ b/.github/workflows/pr-annotations.yaml @@ -2,22 +2,17 @@ name: Annotate PR with trunk issues on: workflow_run: - workflows: [Pull Request] + workflows: ["Pull Request"] types: [completed] -permissions: read-all - jobs: trunk_check: name: Trunk Check Annotate runs-on: ubuntu-latest - permissions: - checks: write - steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Trunk Check uses: trunk-io/trunk-action@v1 From 7aa49a958ec719642ac356c915d904fe29acb9b4 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Mon, 22 Jul 2024 14:56:49 -0400 Subject: [PATCH 2/6] Update pr-annotations.yaml --- .github/workflows/pr-annotations.yaml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-annotations.yaml b/.github/workflows/pr-annotations.yaml index 9fd7285..dc3d58d 100644 --- a/.github/workflows/pr-annotations.yaml +++ b/.github/workflows/pr-annotations.yaml @@ -1,15 +1,23 @@ -name: Annotate PR with trunk issues +name: CI on: - workflow_run: - workflows: ["Pull Request"] - types: [completed] + push: + branches: + - main + - develop + pull_request: + +# cancel in-progress runs on new commits to same PR (gitub.event.number) +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + +permissions: + contents: read # to fetch code (actions/checkout) jobs: - trunk_check: - name: Trunk Check Annotate + Lint: runs-on: ubuntu-latest - steps: - name: Checkout uses: actions/checkout@v3 @@ -18,3 +26,6 @@ jobs: uses: trunk-io/trunk-action@v1 with: post-annotations: true # only for fork PRs + + + From 068c6ea45a495df2024df508a07e86f1a0b80624 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Mon, 22 Jul 2024 18:58:20 +0000 Subject: [PATCH 3/6] Makes a contribution --- src/components/RedSquareWithResize.tsx | 9 +++++---- .../docs/4-advanced-drawing-and-events/clipping.md | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/RedSquareWithResize.tsx b/src/components/RedSquareWithResize.tsx index ef49583..50f5e7f 100644 --- a/src/components/RedSquareWithResize.tsx +++ b/src/components/RedSquareWithResize.tsx @@ -6,8 +6,8 @@ const RedSquareWithResize: React.FC = () => { const canvasRef = useRef(null); const [x, setX] = useState(0); const [y, setY] = useState(0); - const [w, setW] = useState(50); - const [h, setH] = useState(50); + const [w, setW] = useState(50); + const [h, setH] = useState(50); const draw = (ctx: { fillStyle: string; @@ -29,6 +29,7 @@ const RedSquareWithResize: React.FC = () => { return (
+

The box is positioned at {{x}}, {{y}} with size {{w}} by {{h}}.

@@ -38,7 +39,7 @@ const RedSquareWithResize: React.FC = () => { max={100} step={1} value={x} - label="X" + label='X-Position' handleChange={(event) => { setX(parseInt(event.target.value)); }} @@ -50,7 +51,7 @@ const RedSquareWithResize: React.FC = () => { max={100} step={1} value={y} - label="Y" + label='Y-Position' handleChange={(event) => { setY(parseInt(event.target.value)); }} diff --git a/src/content/docs/4-advanced-drawing-and-events/clipping.md b/src/content/docs/4-advanced-drawing-and-events/clipping.md index 72f3cc7..d9ec1c6 100644 --- a/src/content/docs/4-advanced-drawing-and-events/clipping.md +++ b/src/content/docs/4-advanced-drawing-and-events/clipping.md @@ -1,5 +1,6 @@ --- title: placeholder description: placeholder -prev: true + prev: true + --- From 01ebaa78cb08c1f231f1460605002c26d47491ab Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Mon, 22 Jul 2024 19:02:18 +0000 Subject: [PATCH 4/6] Fix workflow permissions --- .github/workflows/pr-annotations.yaml | 2 ++ .gitignore | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/pr-annotations.yaml b/.github/workflows/pr-annotations.yaml index dc3d58d..9f15b63 100644 --- a/.github/workflows/pr-annotations.yaml +++ b/.github/workflows/pr-annotations.yaml @@ -17,7 +17,9 @@ permissions: jobs: Lint: + name: Trunk Check Annotate runs-on: ubuntu-latest + permissions: steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.gitignore b/.gitignore index 6240da8..342a315 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +package-lock.json \ No newline at end of file From e4bc4a1699d175a0c0155f28562c6bd17f82d227 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Mon, 22 Jul 2024 19:03:58 +0000 Subject: [PATCH 5/6] Fix workflow permissions --- .github/workflows/pr-annotations.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-annotations.yaml b/.github/workflows/pr-annotations.yaml index 9f15b63..0fe56bf 100644 --- a/.github/workflows/pr-annotations.yaml +++ b/.github/workflows/pr-annotations.yaml @@ -20,6 +20,7 @@ jobs: name: Trunk Check Annotate runs-on: ubuntu-latest permissions: + checks: write steps: - name: Checkout uses: actions/checkout@v3 From 203cfd08706f55cb364e5c1ca2579b33c528cf87 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Mon, 22 Jul 2024 15:12:32 -0400 Subject: [PATCH 6/6] Revert "Makes a contribution" --- .github/workflows/pr-annotations.yaml | 3 --- .gitignore | 2 -- src/components/RedSquareWithResize.tsx | 9 ++++----- .../docs/4-advanced-drawing-and-events/clipping.md | 3 +-- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pr-annotations.yaml b/.github/workflows/pr-annotations.yaml index 0fe56bf..dc3d58d 100644 --- a/.github/workflows/pr-annotations.yaml +++ b/.github/workflows/pr-annotations.yaml @@ -17,10 +17,7 @@ permissions: jobs: Lint: - name: Trunk Check Annotate runs-on: ubuntu-latest - permissions: - checks: write steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.gitignore b/.gitignore index 342a315..6240da8 100644 --- a/.gitignore +++ b/.gitignore @@ -19,5 +19,3 @@ pnpm-debug.log* # macOS-specific files .DS_Store - -package-lock.json \ No newline at end of file diff --git a/src/components/RedSquareWithResize.tsx b/src/components/RedSquareWithResize.tsx index 50f5e7f..ef49583 100644 --- a/src/components/RedSquareWithResize.tsx +++ b/src/components/RedSquareWithResize.tsx @@ -6,8 +6,8 @@ const RedSquareWithResize: React.FC = () => { const canvasRef = useRef(null); const [x, setX] = useState(0); const [y, setY] = useState(0); - const [w, setW] = useState(50); - const [h, setH] = useState(50); + const [w, setW] = useState(50); + const [h, setH] = useState(50); const draw = (ctx: { fillStyle: string; @@ -29,7 +29,6 @@ const RedSquareWithResize: React.FC = () => { return (
-

The box is positioned at {{x}}, {{y}} with size {{w}} by {{h}}.

@@ -39,7 +38,7 @@ const RedSquareWithResize: React.FC = () => { max={100} step={1} value={x} - label='X-Position' + label="X" handleChange={(event) => { setX(parseInt(event.target.value)); }} @@ -51,7 +50,7 @@ const RedSquareWithResize: React.FC = () => { max={100} step={1} value={y} - label='Y-Position' + label="Y" handleChange={(event) => { setY(parseInt(event.target.value)); }} diff --git a/src/content/docs/4-advanced-drawing-and-events/clipping.md b/src/content/docs/4-advanced-drawing-and-events/clipping.md index d9ec1c6..72f3cc7 100644 --- a/src/content/docs/4-advanced-drawing-and-events/clipping.md +++ b/src/content/docs/4-advanced-drawing-and-events/clipping.md @@ -1,6 +1,5 @@ --- title: placeholder description: placeholder - prev: true - +prev: true ---