placementt-core 1.400.957 → 1.400.959

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,48 @@
1
+ name: Sync PR status to ClickUp
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, closed]
6
+
7
+ jobs:
8
+ sync-clickup:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - name: Extract ClickUp Task ID
13
+ id: extract
14
+ run: |
15
+ # Try branch name first (format: CU-{taskId}_title)
16
+ TASK_ID=$(echo "${{ github.head_ref }}" | grep -oE 'CU-[a-zA-Z0-9]+' | head -1 | sed 's/CU-//')
17
+ # Fall back to PR title (format: "CU-{taskId}" or "Cu {taskId}")
18
+ if [ -z "$TASK_ID" ]; then
19
+ TASK_ID=$(echo "${{ github.event.pull_request.title }}" | grep -oiE '(CU-[a-zA-Z0-9]+|Cu [a-zA-Z0-9]+)' | head -1 | sed 's/^[Cc][Uu][-\ ]*//')
20
+ fi
21
+ echo "TASK_ID=$TASK_ID" >> $GITHUB_ENV
22
+
23
+ # 👉 When PR is opened → set to "In Review"
24
+ - name: Set status to In Review
25
+ if: github.event.action == 'opened' && env.TASK_ID != ''
26
+ run: |
27
+ curl -X PUT "https://api.clickup.com/api/v2/task/$TASK_ID" \
28
+ -H "Authorization: ${{ secrets.CLICKUP_API_KEY }}" \
29
+ -H "Content-Type: application/json" \
30
+ -d '{"status":"In review"}'
31
+
32
+ # 👉 When PR is merged → set to "Done"
33
+ - name: Set status to Done
34
+ if: github.event.action == 'closed' && github.event.pull_request.merged == true && env.TASK_ID != ''
35
+ run: |
36
+ curl -X PUT "https://api.clickup.com/api/v2/task/$TASK_ID" \
37
+ -H "Authorization: ${{ secrets.CLICKUP_API_KEY }}" \
38
+ -H "Content-Type: application/json" \
39
+ -d '{"status":"complete"}'
40
+
41
+ # 👉 When PR is merged → resolve linked errors in Firebase
42
+ - name: Resolve errors in Firebase
43
+ if: github.event.action == 'closed' && github.event.pull_request.merged == true && env.TASK_ID != ''
44
+ continue-on-error: true
45
+ run: |
46
+ curl -X POST "https://europe-west2-placementt-dev.cloudfunctions.net/errorLogging-resolveErrorsByClickupTask" \
47
+ -H "Content-Type: application/json" \
48
+ -d "{\"clickupTaskId\":\"$TASK_ID\"}"
@@ -16,9 +16,9 @@ jobs:
16
16
  - name: Setup Node
17
17
  uses: actions/setup-node@v4
18
18
  with:
19
- node-version: 22.14.0
19
+ node-version: 22
20
20
  registry-url: https://registry.npmjs.org
21
-
21
+
22
22
  - name: Install NPM
23
23
  run: npm install -g npm@latest
24
24
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "placementt-core",
4
4
  "author": "Placementt",
5
- "version": "1.400.957",
5
+ "version": "1.400.959",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "scripts": {