Skip to content

Commit

Permalink
Merge branch 'master' into postgres-support
Browse files Browse the repository at this point in the history
  • Loading branch information
harryzcy committed Oct 19, 2023
2 parents a7454bc + 9b599cc commit 72c81ee
Show file tree
Hide file tree
Showing 102 changed files with 6,487 additions and 6,213 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ You can modifiy Uptime Kuma in your browser without setting up a local developme

1. Click `Code` -> `Create codespace on master`
2. Wait a few minutes until you see there are two exposed ports
3. Go to the `3000` url, see if it is working
3. Go to the `3000` url, see if it is working

![image](https://github.com/louislam/uptime-kuma/assets/1336778/909b2eb4-4c5e-44e4-ac26-6d20ed856e7f)

Expand Down
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ SECURITY.md
tsconfig.json
.env
/tmp
/babel.config.js
/ecosystem.config.js
/extra/healthcheck.exe
/extra/healthcheck
/extra/exe-builder
/extra/push-examples
/extra/uptime-kuma-push

# Comment the following line if you want to rebuild the healthcheck binary
/extra/healthcheck-armv7


### .gitignore content (commented rules are duplicated)

#node_modules
Expand Down
21 changes: 19 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ module.exports = {
],
parser: "vue-eslint-parser",
parserOptions: {
parser: "@babel/eslint-parser",
parser: "@typescript-eslint/parser",
sourceType: "module",
requireConfigFile: false,
},
plugins: [
"jsdoc"
"jsdoc",
"@typescript-eslint",
],
rules: {
"yoda": "error",
Expand Down Expand Up @@ -163,6 +164,22 @@ module.exports = {
context: true,
jestPuppeteer: true,
},
},

// Override for TypeScript
{
"files": [
"**/*.ts",
],
extends: [
"plugin:@typescript-eslint/recommended",
],
"rules": {
"jsdoc/require-returns-type": "off",
"jsdoc/require-param-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"prefer-const": "off",
}
}
]
};
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ labels:

DO NOT PROVIDE ANY DETAILS HERE. Please privately report to https://github.com/louislam/uptime-kuma/security/advisories/new.


Why need this issue? It is because GitHub Advisory do not send a notification to @louislam, it is a workaround to do so.

Your GitHub Advisory URL:

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma

Tick the checkbox if you understand [x]:
Tick the checkbox if you understand [x]:
- [ ] I have read and understand the pull request rules.

# Description
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/auto-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ name: Auto Test

on:
push:
branches: [ master ]
branches: [ master, 1.23.X ]
paths-ignore:
- '*.md'
pull_request:
branches: [ master, 2.0.X ]
branches: [ master, 1.23.X ]
paths-ignore:
- '*.md'

Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "CodeQL"

on:
push:
branches: [ "master", "1.23.X"]
pull_request:
branches: [ "master", "1.23.X"]
schedule:
- cron: '16 22 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 360

permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go', 'javascript-typescript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
44 changes: 23 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,27 @@ Yes or no, it depends on what you will try to do. Since I don't want to waste yo

Here are some references:

### ✅ Usually accepted:
### ✅ Usually accepted

- Bug fix
- Security fix
- Adding notification providers
- Adding new language files (see [these instructions](https://github.com/louislam/uptime-kuma/blob/master/src/lang/README.md))
- Adding new language keys: `$t("...")`

### ⚠️ Discussion required:
### ⚠️ Discussion required

- Large pull requests
- New features

### ❌ Won't be merged:
### ❌ Won't be merged

- A dedicated PR for translating existing languages (see [these instructions](https://github.com/louislam/uptime-kuma/blob/master/src/lang/README.md))
- Do not pass the auto-test
- Any breaking changes
- Duplicated pull requests
- Buggy
- UI/UX is not close to Uptime Kuma
- UI/UX is not close to Uptime Kuma
- Modifications or deletions of existing logic without a valid reason.
- Adding functions that is completely out of scope
- Converting existing code into other programming languages
Expand All @@ -65,7 +68,6 @@ I will assign your pull request to a [milestone](https://github.com/louislam/upt

Also, please don't rush or ask for an ETA, because I have to understand the pull request, make sure it is no breaking changes and stick to my vision of this project, especially for large pull requests.


### Recommended Pull Request Guideline

Before deep into coding, discussion first is preferred. Creating an empty pull request for discussion would be recommended.
Expand Down Expand Up @@ -114,7 +116,7 @@ I personally do not like something that requires so many configurations before y

### GitHub Codespace

If you don't want to setup an local environment, you can now develop on GitHub Codespace, read more:
If you don't want to setup an local environment, you can now develop on GitHub Codespace, read more:

https://github.com/louislam/uptime-kuma/tree/master/.devcontainer

Expand Down Expand Up @@ -143,7 +145,8 @@ npm run dev
```

But sometimes, you would like to restart the server, but not the frontend, you can run these commands in two terminals:
```

```bash
npm run start-frontend-dev
npm run start-server-dev
```
Expand All @@ -152,15 +155,14 @@ npm run start-server-dev

It binds to `0.0.0.0:3001` by default.


It is mainly a socket.io app + express.js.

express.js is used for:
express.js is used for:

- entry point such as redirecting to a status page or the dashboard
- serving the frontend built files (index.html, .js and .css etc.)
- serving internal APIs of the status page


### Structure in /server/

- jobs/ (Jobs that are running in another process)
Expand All @@ -175,9 +177,9 @@ express.js is used for:

## Frontend Dev Server

It binds to `0.0.0.0:3000` by default. The frontend dev server is used for development only.
It binds to `0.0.0.0:3000` by default. The frontend dev server is used for development only.

For production, it is not used. It will be compiled to `dist` directory instead.
For production, it is not used. It will be compiled to `dist` directory instead.

You can use Vue.js devtools Chrome extension for debugging.

Expand Down Expand Up @@ -231,7 +233,7 @@ If for security / bug / other reasons, a library must be updated, breaking chang

Please add **all** the strings which are translatable to `src/lang/en.json` (If translation keys are omitted, they can not be translated).

**Don't include any other languages in your initial Pull-Request** (even if this is your mother tongue), to avoid merge-conflicts between weblate and `master`.
**Don't include any other languages in your initial Pull-Request** (even if this is your mother tongue), to avoid merge-conflicts between weblate and `master`.
The translations can then (after merging a PR into `master`) be translated by awesome people donating their language skills.

If you want to help by translating Uptime Kuma into your language, please visit the [instructions on how to translate using weblate](https://github.com/louislam/uptime-kuma/blob/master/src/lang/README.md).
Expand All @@ -249,7 +251,7 @@ https://github.com/louislam/uptime-kuma-wiki

## Docker

#### Arch
### Arch

- amd64
- arm64
Expand Down Expand Up @@ -293,12 +295,12 @@ https://github.com/louislam/uptime-kuma/issues?q=sort%3Aupdated-desc
1. Draft a release note
2. Make sure the repo is cleared
3. If the healthcheck is updated, remember to re-compile it: `npm run build-docker-builder-go`
3. `npm run release-final` with env vars: `VERSION` and `GITHUB_TOKEN`
4. Wait until the `Press any key to continue`
5. `git push`
6. Publish the release note as 1.X.X
7. Press any key to continue
8. Deploy to the demo server: `npm run deploy-demo-server`
4. `npm run release-final` with env vars: `VERSION` and `GITHUB_TOKEN`
5. Wait until the `Press any key to continue`
6. `git push`
7. Publish the release note as 1.X.X
8. Press any key to continue
9. Deploy to the demo server: `npm run deploy-demo-server`

Checking:

Expand Down Expand Up @@ -336,6 +338,6 @@ git push production master

Change the base of a pull request such as `master` to `1.23.X`

```
```bash
git rebase --onto <new parent> <old parent>
```
Loading

0 comments on commit 72c81ee

Please sign in to comment.