From c8d4f494ce63f609cf46e29f6aceb349d3f6df97 Mon Sep 17 00:00:00 2001 From: tomsun28 Date: Fri, 31 Mar 2023 23:06:28 +0800 Subject: [PATCH] [script] update github workflow, add pr template (#819) [script]update github workflow, add pr template [script]update github workflow [script]update github workflow update update --- .github/PULL_REQUEST_TEMPLATE.md | 10 ++++++++++ .github/workflows/codeql-analysis.yml | 11 +++++++---- .../usthe/alert/service/impl/AlertServiceImpl.java | 1 + 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000000..2ac673f32ff --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +## What's changed? + + + + +## Checklist + +- [ ] I have read the [Contributing Guide](https://hertzbeat.com/docs/others/contributing/) +- [ ] I have written the necessary doc or comment. +- [ ] I have added the necessary unit tests and all cases have passed. diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 8111b7f28e3..ba46e2b02c5 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,8 +12,11 @@ name: "CodeQL" on: - schedule: - - cron: '21 13 * * 4' + pull_request: + branches: [ master, dev ] + paths: + - '**/*.java' + - '**/*.ts' jobs: analyze: @@ -21,9 +24,9 @@ jobs: runs-on: ubuntu-latest strategy: - fail-fast: false + fail-fast: true matrix: - language: [ 'java' ] + language: [ 'java', 'javascript' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed diff --git a/alerter/src/main/java/com/usthe/alert/service/impl/AlertServiceImpl.java b/alerter/src/main/java/com/usthe/alert/service/impl/AlertServiceImpl.java index 7ec4dd4db36..a391dd67278 100644 --- a/alerter/src/main/java/com/usthe/alert/service/impl/AlertServiceImpl.java +++ b/alerter/src/main/java/com/usthe/alert/service/impl/AlertServiceImpl.java @@ -109,6 +109,7 @@ public AlertSummary getAlertsSummary() { } } long total = alertDao.count(); + alertSummary.setTotal(total); long dealNum = total - alertSummary.getPriorityCriticalNum() - alertSummary.getPriorityEmergencyNum() - alertSummary.getPriorityWarningNum(); alertSummary.setDealNum(dealNum);