@pixpilot/scaffoldfy-configs 0.40.3 → 0.41.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @pixpilot/scaffoldfy-configs
2
2
 
3
+ ## 0.41.0
4
+
5
+ ### Minor Changes
6
+
7
+ - add CodeQL workflow for private repositories
8
+
9
+ ## 0.40.4
10
+
11
+ ### Patch Changes
12
+
13
+ - update notification step for release status
14
+
3
15
  ## 0.40.3
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -14,6 +14,16 @@ This package provides the following scaffoldfy templates:
14
14
 
15
15
  <!-- scaffoldfy-templates:start -->
16
16
 
17
+ ### codeql-private-repo
18
+
19
+ Replaces the CodeQL workflow with the pixpilot/codeql-scanner action for private repositories
20
+
21
+ Usage:
22
+
23
+ ```sh
24
+ npx @pixpilot/scaffoldfy@latest --config https://unpkg.com/@pixpilot/scaffoldfy-configs@latest/codeql-private-repo/scaffoldfy.json
25
+ ```
26
+
17
27
  ### license-file
18
28
 
19
29
  Generate a LICENSE file with common open-source licenses
@@ -0,0 +1,39 @@
1
+ name: CodeQL Analyser
2
+
3
+ permissions:
4
+ security-events: write
5
+ actions: read
6
+ contents: read
7
+ issues: write # Required for pixpilot/codeql-scanner@main
8
+
9
+ on:
10
+ push:
11
+ branches:
12
+ - main
13
+ - master
14
+ pull_request:
15
+ branches:
16
+ - main
17
+ - master
18
+ schedule:
19
+ # ┌───────────── minute (0 - 59)
20
+ # │ ┌───────────── hour (0 - 23)
21
+ # │ │ ┌───────────── day of the month (1 - 31)
22
+ # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
23
+ # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
24
+ # │ │ │ │ │
25
+ # * * * * *
26
+ - cron: '30 1 * * 0' # Every Sunday at 01:30 UTC
27
+
28
+ jobs:
29
+ analyze:
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - name: Checkout repository
33
+ uses: actions/checkout@v4
34
+
35
+ - name: Run CodeQL Scanner
36
+ uses: pixpilot/codeql-scanner@main
37
+ with:
38
+ token: ${{ secrets.GITHUB_TOKEN }}
39
+ config-file: .github/codeql/codeql-config.yml
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "../node_modules/@pixpilot/scaffoldfy/schema/scaffoldfy.schema.json",
3
+ "name": "codeql-private-repo",
4
+ "description": "Replaces the CodeQL workflow with the pixpilot/codeql-scanner action for private repositories",
5
+ "prompts": [
6
+ {
7
+ "id": "isPrivateRepo",
8
+ "type": "confirm",
9
+ "message": "Is this a private repository?",
10
+ "default": {
11
+ "type": "exec",
12
+ "value": "node -e \"try{process.stdout.write(require('child_process').execSync('gh repo view --json isPrivate -q .isPrivate',{stdio:['ignore','pipe','ignore']}).toString().trim())}catch{process.stdout.write('false')}\""
13
+ }
14
+ }
15
+ ],
16
+ "tasks": [
17
+ {
18
+ "id": "codeql-private-repo-workflow",
19
+ "name": "Replace CodeQL workflow for private repo",
20
+ "description": "Overwrites the CodeQL workflow to use pixpilot/codeql-scanner",
21
+ "enabled": {
22
+ "type": "condition",
23
+ "value": "isPrivateRepo === true"
24
+ },
25
+ "type": "write",
26
+ "config": {
27
+ "templateFile": "codeql-analysis.yml",
28
+ "file": ".github/workflows/codeql-analysis.yml"
29
+ }
30
+ }
31
+ ]
32
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/scaffoldfy-configs",
3
3
  "type": "module",
4
- "version": "0.40.3",
4
+ "version": "0.41.0",
5
5
  "author": "PixPilot <m.doaie@hotmail.com>",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -32,8 +32,8 @@
32
32
  "@internal/eslint-config": "0.3.0",
33
33
  "@internal/prettier-config": "0.0.1",
34
34
  "@internal/tsdown-config": "0.1.0",
35
- "@internal/vitest-config": "0.1.0",
36
- "@pixpilot/scaffoldfy": "0.55.1"
35
+ "@pixpilot/scaffoldfy": "0.55.1",
36
+ "@internal/vitest-config": "0.1.0"
37
37
  },
38
38
  "prettier": "@internal/prettier-config",
39
39
  "publishConfig": {
@@ -62,15 +62,16 @@ jobs:
62
62
  provenance: 'false'
63
63
 
64
64
  notify:
65
- name: Notify on Release Failure
65
+ name: Notify Release Status
66
66
  needs: [ci, release]
67
67
  if: always()
68
68
  runs-on: ubuntu-latest
69
69
 
70
70
  steps:
71
- - name: Send Telegram notification
71
+ - name: Send Telegram release-status notification
72
72
  uses: pixpilot/notify-action@v1
73
73
  with:
74
74
  status: ${{ contains(needs.*.result, 'failure') && 'failure' || contains(needs.*.result, 'cancelled') && 'cancelled' || 'success' }}
75
+ notify-on: any
75
76
  telegram-bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
76
77
  telegram-chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}
@@ -50,15 +50,16 @@ jobs:
50
50
  provenance: 'true'
51
51
 
52
52
  notify:
53
- name: Notify on Release Failure
53
+ name: Notify Release Status
54
54
  needs: [ci, release]
55
55
  if: always()
56
56
  runs-on: ubuntu-latest
57
57
 
58
58
  steps:
59
- - name: Send Telegram notification
59
+ - name: Send Telegram release-status notification
60
60
  uses: pixpilot/notify-action@v1
61
61
  with:
62
62
  status: ${{ contains(needs.*.result, 'failure') && 'failure' || contains(needs.*.result, 'cancelled') && 'cancelled' || 'success' }}
63
+ notify-on: any
63
64
  telegram-bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
64
65
  telegram-chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}
@@ -7,6 +7,7 @@
7
7
  "../license-file/scaffoldfy.json",
8
8
  "../update-root-package-json/scaffoldfy.json",
9
9
  "../security-policy/scaffoldfy.json",
10
+ "../codeql-private-repo/scaffoldfy.json",
10
11
  "../monorepo-generate-packages-section/scaffoldfy.json"
11
12
  ],
12
13
  "name": "pnpm-turbo-monorepo-template-setup",