Skip to content

Commit 6658f2c

Browse files
chore: format the .github folder (louislam#6654)
1 parent af26601 commit 6658f2c

File tree

11 files changed

+143
-136
lines changed

11 files changed

+143
-136
lines changed

.github/ISSUE_TEMPLATE/security_issue.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ body:
1212
## ❗ IMPORTANT: DO NOT SHARE VULNERABILITY DETAILS HERE
1313
1414
## Please do not open issues for upstream dependency scan results.
15-
15+
1616
Automated security tools often report false-positive issues that are not exploitable in the context of Uptime Kuma.
1717
Reviewing these without concrete impact does not scale for us.
18-
18+
1919
If you can demonstrate that an upstream issue is actually exploitable in Uptime Kuma (e.g. with a PoC or reproducible steps), we’re happy to take a look.
2020
2121
### ⚠️ Report a Security Vulnerability

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
<!-- Provide a clear summary of the purpose and scope of this pull request-->
66

7-
87
## 📋 Related issues
98

109
<!--Please link any GitHub issues or tasks that this pull request addresses-->
10+
1111
- Relates to #issue-number <!--this links related the issue-->
1212
- Resolves #issue-number <!--this auto-closes the issue-->
1313

.github/REVIEW_GUIDELINES.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ correct authorization and authentication mechanisms are in place.
9090
### Security Best Practices
9191

9292
- Ensure that the code is free from common vulnerabilities like **SQL
93-
injection**, **XSS attacks**, and **insecure API calls**.
93+
injection**, **XSS attacks**, and **insecure API calls**.
9494
- Check for proper encryption of sensitive data, and ensure that **passwords**
95-
or **API tokens** are not hardcoded in the code.
95+
or **API tokens** are not hardcoded in the code.
9696

9797
## Performance
9898

@@ -105,15 +105,15 @@ like load times, memory usage, or other performance aspects.
105105

106106
- Have the right libraries been chosen?
107107
- Are there unnecessary dependencies that might reduce performance or increase
108-
code complexity?
108+
code complexity?
109109
- Are these dependencies actively maintained and free of known vulnerabilities?
110110

111111
### Performance Best Practices
112112

113113
- **Measure performance** using tools like Lighthouse or profiling libraries.
114114
- **Avoid unnecessary dependencies** that may bloat the codebase.
115115
- Ensure that the **code does not degrade the user experience** (e.g., by
116-
increasing load times or memory consumption).
116+
increasing load times or memory consumption).
117117

118118
## Compliance and Integration
119119

@@ -187,9 +187,9 @@ the PR can be approved. Some examples of **significant issues** include:
187187
- Missing tests for new functionality.
188188
- Identified **security vulnerabilities**.
189189
- Code changes that break **backward compatibility** without a proper migration
190-
plan.
190+
plan.
191191
- Code that causes **major performance regressions** (e.g., high CPU/memory
192-
usage).
192+
usage).
193193

194194
## After the Review
195195

.github/copilot-instructions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,26 @@
1818
## Build & Validation Commands
1919

2020
### Prerequisites
21+
2122
- Node.js >= 20.4.0, npm >= 9.3, Git
2223

2324
### Essential Command Sequence
2425

2526
1. **Install Dependencies**:
27+
2628
```bash
2729
npm ci # Use npm ci NOT npm install (~60-90 seconds)
2830
```
2931

3032
2. **Linting** (required before committing):
33+
3134
```bash
3235
npm run lint # Both linters (~15-30 seconds)
3336
npm run lint:prod # For production (zero warnings)
3437
```
3538

3639
3. **Build Frontend**:
40+
3741
```bash
3842
npm run build # Takes ~90-120 seconds, builds to dist/
3943
```
@@ -105,6 +109,7 @@ npm run dev # Starts frontend (port 3000) and backend (port 3001)
105109
## CI/CD Workflows
106110

107111
**auto-test.yml** (runs on PR/push to master/1.23.X):
112+
108113
- Linting, building, backend tests on multiple OS/Node versions (15 min timeout)
109114
- E2E Playwright tests
110115

@@ -142,7 +147,9 @@ npm run dev # Starts frontend (port 3000) and backend (port 3001)
142147
## Adding New Features
143148

144149
### New Notification Provider
150+
145151
Files to modify:
152+
146153
1. `server/notification-providers/PROVIDER_NAME.js` (backend logic)
147154
2. `server/notification.js` (register provider)
148155
3. `src/components/notifications/PROVIDER_NAME.vue` (frontend UI)
@@ -151,7 +158,9 @@ Files to modify:
151158
6. `src/lang/en.json` (add translation keys)
152159

153160
### New Monitor Type
161+
154162
Files to modify:
163+
155164
1. `server/monitor-types/MONITORING_TYPE.js` (backend logic)
156165
2. `server/uptime-kuma-server.js` (register monitor type)
157166
3. `src/pages/EditMonitor.vue` (frontend UI)

.github/workflows/auto-test.yml

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Auto Test
55

66
on:
77
push:
8-
branches: [ master, 1.23.X, 3.0.0 ]
8+
branches: [master, 1.23.X, 3.0.0]
99
pull_request:
1010
permissions: {}
1111

@@ -21,39 +21,39 @@ jobs:
2121
matrix:
2222
os: [macos-latest, ubuntu-22.04, windows-latest, ubuntu-22.04-arm]
2323
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
24-
node: [ 20, 24 ]
24+
node: [20, 24]
2525
# Also test non-LTS, but only on Ubuntu.
2626
include:
2727
- os: ubuntu-22.04
2828
node: 25
2929

3030
steps:
31-
- run: git config --global core.autocrlf false # Mainly for Windows
32-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
33-
with: { persist-credentials: false }
34-
35-
- name: Cache/Restore node_modules
36-
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
37-
id: node-modules-cache
38-
with:
39-
path: node_modules
40-
key: node-modules-${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
41-
42-
- name: Use Node.js ${{ matrix.node }}
43-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
44-
with:
45-
node-version: ${{ matrix.node }}
46-
- run: npm clean-install --no-fund
47-
48-
- name: Rebuild native modules for ARM64
49-
if: matrix.os == 'ubuntu-22.04-arm'
50-
run: npm rebuild @louislam/sqlite3
51-
52-
- run: npm run build
53-
- run: npm run test-backend
54-
env:
55-
HEADLESS_TEST: 1
56-
JUST_FOR_TEST: ${{ secrets.JUST_FOR_TEST }}
31+
- run: git config --global core.autocrlf false # Mainly for Windows
32+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
33+
with: { persist-credentials: false }
34+
35+
- name: Cache/Restore node_modules
36+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
37+
id: node-modules-cache
38+
with:
39+
path: node_modules
40+
key: node-modules-${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
41+
42+
- name: Use Node.js ${{ matrix.node }}
43+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
44+
with:
45+
node-version: ${{ matrix.node }}
46+
- run: npm clean-install --no-fund
47+
48+
- name: Rebuild native modules for ARM64
49+
if: matrix.os == 'ubuntu-22.04-arm'
50+
run: npm rebuild @louislam/sqlite3
51+
52+
- run: npm run build
53+
- run: npm run test-backend
54+
env:
55+
HEADLESS_TEST: 1
56+
JUST_FOR_TEST: ${{ secrets.JUST_FOR_TEST }}
5757

5858
# As a lot of dev dependencies are not supported on ARMv7, we have to test it separately and just test if `npm ci --production` works
5959
armv7-simple-test:
@@ -63,7 +63,7 @@ jobs:
6363
strategy:
6464
fail-fast: false
6565
matrix:
66-
node: [ 20, 22 ]
66+
node: [20, 22]
6767
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
6868

6969
steps:
@@ -92,23 +92,23 @@ jobs:
9292
contents: read
9393

9494
steps:
95-
- run: git config --global core.autocrlf false # Mainly for Windows
96-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
97-
with: { persist-credentials: false }
98-
99-
- name: Cache/Restore node_modules
100-
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
101-
id: node-modules-cache
102-
with:
103-
path: node_modules
104-
key: node-modules-${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
105-
106-
- name: Use Node.js 20
107-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
108-
with:
109-
node-version: 20
110-
- run: npm clean-install --no-fund
111-
- run: npm run lint:prod
95+
- run: git config --global core.autocrlf false # Mainly for Windows
96+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
97+
with: { persist-credentials: false }
98+
99+
- name: Cache/Restore node_modules
100+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
101+
id: node-modules-cache
102+
with:
103+
path: node_modules
104+
key: node-modules-${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
105+
106+
- name: Use Node.js 20
107+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
108+
with:
109+
node-version: 20
110+
- run: npm clean-install --no-fund
111+
- run: npm run lint:prod
112112

113113
e2e-test:
114114
runs-on: ubuntu-22.04-arm
@@ -117,28 +117,28 @@ jobs:
117117
env:
118118
PLAYWRIGHT_VERSION: ~1.39.0
119119
steps:
120-
- run: git config --global core.autocrlf false # Mainly for Windows
121-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
122-
with: { persist-credentials: false }
123-
124-
- name: Cache/Restore node_modules
125-
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
126-
id: node-modules-cache
127-
with:
128-
path: node_modules
129-
key: node-modules-${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
130-
131-
- name: Setup Node.js
132-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
133-
with:
134-
node-version: 22
135-
- run: npm clean-install --no-fund
136-
137-
- name: Rebuild native modules for ARM64
138-
run: npm rebuild @louislam/sqlite3
139-
140-
- name: Install Playwright ${{ env.PLAYWRIGHT_VERSION }}
141-
run: npx playwright@${{ env.PLAYWRIGHT_VERSION }} install
142-
143-
- run: npm run build
144-
- run: npm run test-e2e
120+
- run: git config --global core.autocrlf false # Mainly for Windows
121+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
122+
with: { persist-credentials: false }
123+
124+
- name: Cache/Restore node_modules
125+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
126+
id: node-modules-cache
127+
with:
128+
path: node_modules
129+
key: node-modules-${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
130+
131+
- name: Setup Node.js
132+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
133+
with:
134+
node-version: 22
135+
- run: npm clean-install --no-fund
136+
137+
- name: Rebuild native modules for ARM64
138+
run: npm rebuild @louislam/sqlite3
139+
140+
- name: Install Playwright ${{ env.PLAYWRIGHT_VERSION }}
141+
run: npx playwright@${{ env.PLAYWRIGHT_VERSION }} install
142+
143+
- run: npm run build
144+
- run: npm run test-e2e

.github/workflows/autofix.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: autofix.ci
22

33
on:
44
push:
5-
branches: [ "master", "1.23.X"]
5+
branches: ["master", "1.23.X"]
66
pull_request:
77
permissions: {}
88

@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1616
with: { persist-credentials: false }
17-
17+
1818
- name: Cache/Restore node_modules
1919
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
2020
id: node-modules-cache
@@ -42,5 +42,5 @@ jobs:
4242
# - name: Auto-format code with Prettier
4343
# run: npm run fmt
4444
# continue-on-error: true
45-
46-
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
45+
46+
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27

.github/workflows/close-incorrect-issue.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
node-version: [20]
1818

1919
steps:
20-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
21-
with: { persist-credentials: false }
20+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
21+
with: { persist-credentials: false }
2222

23-
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
25-
with:
26-
node-version: ${{ matrix.node-version }}
27-
- run: npm ci
28-
- name: Close incorrect issue
29-
run: node extra/close-incorrect-issue.js ${{ secrets.GITHUB_TOKEN }} ${{ github.event.issue.number }} "$ISSUE_USER_LOGIN"
30-
env:
31-
ISSUE_USER_LOGIN: ${{ github.event.issue.user.login }}
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
- run: npm ci
28+
- name: Close incorrect issue
29+
run: node extra/close-incorrect-issue.js ${{ secrets.GITHUB_TOKEN }} ${{ github.event.issue.number }} "$ISSUE_USER_LOGIN"
30+
env:
31+
ISSUE_USER_LOGIN: ${{ github.event.issue.user.login }}

0 commit comments

Comments
 (0)