From 2e4c42941a01f02b203758f128d12539152687b5 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Sun, 24 Oct 2021 21:31:10 -0400 Subject: [PATCH 1/5] Rename stale-bot to stale-bot.yml --- .github/workflows/{stale-bot => stale-bot.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{stale-bot => stale-bot.yml} (100%) diff --git a/.github/workflows/stale-bot b/.github/workflows/stale-bot.yml similarity index 100% rename from .github/workflows/stale-bot rename to .github/workflows/stale-bot.yml From 3a43fec666783edc5575e5b25fd2ddb404c01ffe Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 25 Oct 2021 12:06:01 +0800 Subject: [PATCH 2/5] add recommend pull request guideline --- CONTRIBUTING.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d9b37a3..c3432c4d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,12 +29,28 @@ The frontend code build into "dist" directory. The server (express.js) exposes t Generally, if the pull request is working fine and it do not affect any existing logic, workflow and perfomance, I will merge into the master branch once it is tested. -If you are not sure, feel free to create an empty pull request draft first. +If you are not sure whether I will accept your pull request, feel free to create an empty pull request draft first. + + +### Recommended Pull Request Guideline + +1. Fork the project +1. Clone your fork repo to local +1. Create a new branch +1. Create an empty commit + `git commit -m "[empty commit] pull request for " --allow-empty` +1. Push to your fork repo +1. Create a pull request: https://github.com/louislam/uptime-kuma/compare +1. Click "Change to draft" ### Pull Request Examples +Here are some example situations in the past. + #### ✅ High - Medium Priority +Easy to review, no breaking change and not touching the existing code + - Add a new notification - Add a chart - Fix a bug @@ -46,6 +62,13 @@ I do not have such knowledge to test it. - Add k8s supports +#### ⚠ Harsh Mode + +Some pull requests are required to modifiy the core. To be honest, I do not want anyone to try to do that, because it would spend a lot of your time and my time. I will review your pull request harshly. Also you may need to write a lot of unit tests to ensure that there is no breaking change. + +- Touch large parts of code of any very important features of Uptime Kuma +- Drop a table or drop a column for any reason + #### *️⃣ Low Priority It changed my current workflow and require further studies. @@ -54,6 +77,7 @@ It changed my current workflow and require further studies. #### ❌ Won't Merge +- Any breaking changes - Duplicated pull request - Buggy - Existing logic is completely modified or deleted From 3c795bebe3a66cbfc441717c158986dbef50c1dd Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 25 Oct 2021 12:06:49 +0800 Subject: [PATCH 3/5] Update CONTRIBUTING.md --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c3432c4d..b808aa1a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,6 +55,7 @@ Easy to review, no breaking change and not touching the existing code - Add a chart - Fix a bug - Translations +- Add a independent new feature #### *️⃣ Requires one more reviewer From e69799f613561284e6bb4a837291cc8677bcafbf Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 25 Oct 2021 12:07:44 +0800 Subject: [PATCH 4/5] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b808aa1a..e521b6c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,7 +63,7 @@ I do not have such knowledge to test it. - Add k8s supports -#### ⚠ Harsh Mode +#### ⚠ Low Priority - Harsh Mode Some pull requests are required to modifiy the core. To be honest, I do not want anyone to try to do that, because it would spend a lot of your time and my time. I will review your pull request harshly. Also you may need to write a lot of unit tests to ensure that there is no breaking change. From a5f15f23196b048ab3d5e0197c6bff50afdc7a7d Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 25 Oct 2021 12:29:40 +0800 Subject: [PATCH 5/5] Fix #793, check dist-backup existing before delete --- extra/download-dist.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/extra/download-dist.js b/extra/download-dist.js index 0a08b7f9..dc64166c 100644 --- a/extra/download-dist.js +++ b/extra/download-dist.js @@ -34,9 +34,11 @@ function download(url) { }); tarStream.on("close", () => { - fs.rmdirSync("./dist-backup", { - recursive: true - }); + if (fs.existsSync("./dist-backup")) { + fs.rmdirSync("./dist-backup", { + recursive: true + }); + } console.log("Done"); }); @@ -44,7 +46,7 @@ function download(url) { if (fs.existsSync("./dist-backup")) { fs.renameSync("./dist-backup", "./dist"); } - console.log("Done"); + console.error("Error from tarStream"); }); response.pipe(tarStream);