diff options
author | Daniel Baumann <daniel@debian.org> | 2024-11-26 09:28:28 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2024-11-26 12:25:58 +0100 |
commit | a1882b67c41fe9901a0cd8059b5cc78a5beadec0 (patch) | |
tree | 2a24507c67aa99a15416707b2f7e645142230ed8 /.github | |
parent | Initial commit. (diff) | |
download | uptime-kuma-a1882b67c41fe9901a0cd8059b5cc78a5beadec0.tar.xz uptime-kuma-a1882b67c41fe9901a0cd8059b5cc78a5beadec0.zip |
Adding upstream version 2.0.0~beta.0+dfsg.upstream/2.0.0_beta.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to '.github')
-rw-r--r-- | .github/FUNDING.yml | 12 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/ask-for-help.yaml | 75 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/bug_report.yaml | 100 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/feature_request.yaml | 66 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/security.md | 17 | ||||
-rw-r--r-- | .github/PULL_REQUEST_TEMPLATE.md | 33 | ||||
-rw-r--r-- | .github/config/exclude.txt | 1 | ||||
-rw-r--r-- | .github/workflows/auto-test.yml | 93 | ||||
-rw-r--r-- | .github/workflows/close-incorrect-issue.yml | 25 | ||||
-rw-r--r-- | .github/workflows/codeql-analysis.yml | 43 | ||||
-rw-r--r-- | .github/workflows/conflict_labeler.yml | 25 | ||||
-rw-r--r-- | .github/workflows/prevent-file-change.yml | 17 | ||||
-rw-r--r-- | .github/workflows/stale-bot.yml | 42 | ||||
-rw-r--r-- | .github/workflows/validate.yml | 43 |
14 files changed, 592 insertions, 0 deletions
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..d55fbd4 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: louislam # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +#patreon: # Replace with a single Patreon username +open_collective: uptime-kuma # Replace with a single Open Collective username +#ko_fi: # Replace with a single Ko-fi username +#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +#liberapay: # Replace with a single Liberapay username +#issuehunt: # Replace with a single IssueHunt username +#otechie: # Replace with a single Otechie username +#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/ISSUE_TEMPLATE/ask-for-help.yaml b/.github/ISSUE_TEMPLATE/ask-for-help.yaml new file mode 100644 index 0000000..a708dbf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ask-for-help.yaml @@ -0,0 +1,75 @@ +name: "❓ Ask for help" +description: "Submit any question related to Uptime Kuma" +#title: "[Help] " +labels: [help] +body: + - type: checkboxes + id: no-duplicate-issues + attributes: + label: "⚠️ Please verify that this question has NOT been raised before." + description: "Search in the issues sections by clicking [HERE](https://github.com/louislam/uptime-kuma/issues?q=)" + options: + - label: "I checked and didn't find similar issue" + required: true + - type: checkboxes + attributes: + label: "🛡️ Security Policy" + description: Please review the security policy before reporting security related issues/bugs. + options: + - label: I agree to have read this project [Security Policy](https://github.com/louislam/uptime-kuma/security/policy) + required: true + - type: textarea + id: steps-to-reproduce + validations: + required: true + attributes: + label: "📝 Describe your problem" + description: "Please walk us through it step by step. Include all important details and add screenshots where appropriate" + placeholder: "Describe what are you asking for..." + - type: textarea + id: error-msg + validations: + required: false + attributes: + label: "📝 Error Message(s) or Log" + - type: input + id: uptime-kuma-version + attributes: + label: "🐻 Uptime-Kuma Version" + description: "Which version of Uptime-Kuma are you running? Please do NOT provide the docker tag such as latest or 1" + placeholder: "Ex. 1.10.0" + validations: + required: true + - type: input + id: operating-system + attributes: + label: "💻 Operating System and Arch" + description: "Which OS is your server/device running on? (For Replit, please do not report this bug)" + placeholder: "Ex. Ubuntu 20.04 x86" + validations: + required: true + - type: input + id: browser-vendor + attributes: + label: "🌐 Browser" + description: "Which browser are you running on? (For Replit, please do not report this bug)" + placeholder: "Ex. Google Chrome 95.0.4638.69" + validations: + required: true + - type: textarea + id: deployment-info + attributes: + label: "🖥️ Deployment Environment" + description: | + examples: + - **Runtime**: Docker 20.10.9 / nodejs 14.18.0 / K8S via ... v1.3.3 / .. + - **Database**: sqlite/embedded mariadb/external mariadb + - **Filesystem used to store the database on**: Windows/ZFS/btrfs/NFSv3 on a SSD/HDD/eMMC + - **number of monitors**: 42 + value: | + - Runtime: + - Database: + - Filesystem used to store the database on: + - number of monitors: + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..9745a76 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,100 @@ +name: "🐛 Bug Report" +description: "Submit a bug report to help us improve" +#title: "[Bug] " +labels: [bug] +body: + - type: textarea + id: related-issues + validations: + required: true + attributes: + label: "📑 I have found these related issues/pull requests" + description: "Search related issues by clicking [HERE](https://github.com/louislam/uptime-kuma/issues?q=) and explain what the difference between them or explain that you are unable to find any related issues" + placeholder: "Related to #1 by also touching the ... system. They should not be merged because ..." + - type: checkboxes + attributes: + label: "🛡️ Security Policy" + description: Please review the security policy before reporting security related issues/bugs. + options: + - label: I agree to have read this project [Security Policy](https://github.com/louislam/uptime-kuma/security/policy) + required: true + - type: textarea + id: description + validations: + required: false + attributes: + label: "Description" + description: "You could also upload screenshots" + - type: textarea + id: steps-to-reproduce + validations: + required: true + attributes: + label: "👟 Reproduction steps" + description: "How do you trigger this bug? Please walk us through it step by step. Include all important details and add screenshots where appropriate" + placeholder: "..." + - type: textarea + id: expected-behavior + validations: + required: true + attributes: + label: "👀 Expected behavior" + description: "What did you think would happen?" + placeholder: "..." + - type: textarea + id: actual-behavior + validations: + required: true + attributes: + label: "😓 Actual Behavior" + description: "What actually happen?" + placeholder: "..." + - type: input + id: uptime-kuma-version + attributes: + label: "🐻 Uptime-Kuma Version" + description: "Which version of Uptime-Kuma are you running? Please do NOT provide the docker tag such as latest or 1" + placeholder: "Ex. 1.10.0" + validations: + required: true + - type: input + id: operating-system + attributes: + label: "💻 Operating System and Arch" + description: "Which OS is your server/device running on? (For Replit, please do not report this bug)" + placeholder: "Ex. Ubuntu 20.04 x64 " + validations: + required: true + - type: input + id: browser-vendor + attributes: + label: "🌐 Browser" + description: "Which browser are you running on?" + placeholder: "Ex. Google Chrome 95.0.4638.69" + validations: + required: true + - type: textarea + id: deployment-info + attributes: + label: "🖥️ Deployment Environment" + description: | + examples: + - **Runtime**: Docker 20.10.9 / nodejs 18.17.1 / K8S via ... v1.3.3 / .. + - **Database**: sqlite/embedded mariadb/external mariadb + - **Filesystem used to store the database on**: Windows/ZFS/btrfs/NFSv3 on a SSD/HDD/eMMC + - **number of monitors**: 42 + value: | + - Runtime: + - Database: + - Filesystem used to store the database on: + - number of monitors: + validations: + required: true + - type: textarea + id: logs + attributes: + label: "📝 Relevant log output" + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000..531a2c2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,66 @@ +name: 🚀 Feature Request +description: "Submit a proposal for a new feature" +#title: "[Feature] " +labels: [feature-request] +body: + - type: textarea + id: related-issues + validations: + required: true + attributes: + label: "📑 I have found these related issues/pull requests" + description: "Search related issues by clicking [HERE](https://github.com/louislam/uptime-kuma/issues?q=) and explain what the difference between them or explain that you are unable to find any related issues" + placeholder: "Related to #1 by also touching the ... system. They should not be merged because ..." + - type: dropdown + id: feature-area + attributes: + label: "🏷️ Feature Request Type" + description: "What kind of feature request is this?" + multiple: true + options: + - API / automation options + - New notification-provider + - Change to existing notification-provider + - New monitor + - Change to existing monitor + - Dashboard + - Status-page + - Maintenance + - Deployment + - Certificate expiry + - Settings + - Other + validations: + required: true + - type: textarea + id: feature-description + validations: + required: true + attributes: + label: "🔖 Feature description" + description: "A clear and concise description of what the feature request is." + placeholder: "You should add ..." + - type: textarea + id: solution + validations: + required: true + attributes: + label: "✔️ Solution" + description: "A clear and concise description of what you want to happen." + placeholder: "In my use-case, ..." + - type: textarea + id: alternatives + validations: + required: false + attributes: + label: "❓ Alternatives" + description: "A clear and concise description of any alternative solutions or features you've considered." + placeholder: "I have considered ..." + - type: textarea + id: additional-context + validations: + required: false + attributes: + label: "📝 Additional Context" + description: "Add any other context or screenshots about the feature request here." + placeholder: "..." diff --git a/.github/ISSUE_TEMPLATE/security.md b/.github/ISSUE_TEMPLATE/security.md new file mode 100644 index 0000000..708670e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/security.md @@ -0,0 +1,17 @@ +--- + +name: "Security Issue" +about: "Just for alerting @louislam, do not provide any details here" +title: "Security Issue" +ref: "main" +labels: + +- security + +--- + +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: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..0dfb5fa --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,33 @@ +⚠️⚠️⚠️ 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]: +- [ ] I have read and understand the pull request rules. + +# Description + +Fixes #(issue) + +## Type of change + +Please delete any options that are not relevant. + +- Bug fix (non-breaking change which fixes an issue) +- User interface (UI) +- New feature (non-breaking change which adds functionality) +- Breaking change (a fix or feature that would cause existing functionality to not work as expected) +- Other +- This change requires a documentation update + +## Checklist + +- [ ] My code follows the style guidelines of this project +- [ ] I ran ESLint and other linters for modified files +- [ ] I have performed a self-review of my own code and tested it +- [ ] I have commented my code, particularly in hard-to-understand areas (including JSDoc for methods) +- [ ] My changes generates no new warnings +- [ ] My code needed automated testing. I have added them (this is optional task) + +## Screenshots (if any) + +Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically. diff --git a/.github/config/exclude.txt b/.github/config/exclude.txt new file mode 100644 index 0000000..2532588 --- /dev/null +++ b/.github/config/exclude.txt @@ -0,0 +1 @@ +# This is a .gitignore style file for 'GrantBirki/json-yaml-validate' Action workflow diff --git a/.github/workflows/auto-test.yml b/.github/workflows/auto-test.yml new file mode 100644 index 0000000..bf76d9e --- /dev/null +++ b/.github/workflows/auto-test.yml @@ -0,0 +1,93 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Auto Test + +on: + push: + branches: [ master, 1.23.X ] + paths-ignore: + - '*.md' + pull_request: + branches: [ master, 1.23.X ] + paths-ignore: + - '*.md' + +jobs: + auto-test: + needs: [ check-linters ] + runs-on: ${{ matrix.os }} + timeout-minutes: 15 + + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest, ARM64] + node: [ 18, 20 ] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - run: git config --global core.autocrlf false # Mainly for Windows + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - run: npm install + - run: npm run build + - run: npm run test-backend + env: + HEADLESS_TEST: 1 + JUST_FOR_TEST: ${{ secrets.JUST_FOR_TEST }} + + # 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 + armv7-simple-test: + needs: [ ] + runs-on: ${{ matrix.os }} + timeout-minutes: 15 + if: ${{ github.repository == 'louislam/uptime-kuma' }} + strategy: + matrix: + os: [ ARMv7 ] + node: [ 18, 20 ] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - run: git config --global core.autocrlf false # Mainly for Windows + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - run: npm ci --production + + check-linters: + runs-on: ubuntu-latest + + steps: + - run: git config --global core.autocrlf false # Mainly for Windows + - uses: actions/checkout@v4 + + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm install + - run: npm run lint:prod + + e2e-test: + needs: [ ] + runs-on: ARM64 + steps: + - run: git config --global core.autocrlf false # Mainly for Windows + - uses: actions/checkout@v4 + + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm install + - run: npx playwright install + - run: npm run build + - run: npm run test-e2e diff --git a/.github/workflows/close-incorrect-issue.yml b/.github/workflows/close-incorrect-issue.yml new file mode 100644 index 0000000..3ef5ba3 --- /dev/null +++ b/.github/workflows/close-incorrect-issue.yml @@ -0,0 +1,25 @@ +name: Close Incorrect Issue + +on: + issues: + types: [opened] + +jobs: + close-incorrect-issue: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node-version: [18] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: node extra/close-incorrect-issue.js ${{ secrets.GITHUB_TOKEN }} ${{ github.event.issue.number }} ${{ github.event.issue.user.login }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..0e3b72c --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -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}}" diff --git a/.github/workflows/conflict_labeler.yml b/.github/workflows/conflict_labeler.yml new file mode 100644 index 0000000..fdcc9c5 --- /dev/null +++ b/.github/workflows/conflict_labeler.yml @@ -0,0 +1,25 @@ +name: Merge Conflict Labeler + +on: + push: + branches: + - master + pull_request_target: + branches: + - master + types: [synchronize] + +jobs: + label: + name: Labeling + runs-on: ubuntu-latest + if: ${{ github.repository == 'louislam/uptime-kuma' }} + permissions: + contents: read + pull-requests: write + steps: + - name: Apply label + uses: eps1lon/actions-label-merge-conflict@v3 + with: + dirtyLabel: 'needs:resolve-merge-conflict' + repoToken: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.github/workflows/prevent-file-change.yml b/.github/workflows/prevent-file-change.yml new file mode 100644 index 0000000..0af3a6c --- /dev/null +++ b/.github/workflows/prevent-file-change.yml @@ -0,0 +1,17 @@ +name: prevent-file-change + +on: + pull_request: + +jobs: + check-file-changes: + runs-on: ubuntu-latest + steps: + - name: Prevent file change + uses: xalvarez/prevent-file-change-action@v1 + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + # Regex, /src/lang/*.json is not allowed to be changed, except for /src/lang/en.json + pattern: '^(?!src/lang/en\.json$)src/lang/.*\.json$' + trustedAuthors: UptimeKumaBot + diff --git a/.github/workflows/stale-bot.yml b/.github/workflows/stale-bot.yml new file mode 100644 index 0000000..60eca64 --- /dev/null +++ b/.github/workflows/stale-bot.yml @@ -0,0 +1,42 @@ +name: 'Automatically close stale issues' +on: + workflow_dispatch: + schedule: + - cron: '0 */6 * * *' +#Run every 6 hours + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: |- + We are clearing up our old `help`-issues and your issue has been open for 60 days with no activity. + If no comment is made and the stale label is not removed, this issue will be closed in 7 days. + days-before-stale: 60 + days-before-close: 7 + days-before-pr-stale: -1 + days-before-pr-close: -1 + exempt-issue-labels: 'News,Medium,High,discussion,bug,doc,feature-request' + exempt-issue-assignees: 'louislam' + operations-per-run: 200 + - uses: actions/stale@v9 + with: + stale-issue-message: |- + This issue was marked as `cannot-reproduce` by a maintainer. + If an issue is non-reproducible, we cannot fix it, as we do not know what the underlying issue is. + If you have any ideas how we can reproduce this issue, we would love to hear them. + + We don't have a good way to deal with truely unreproducible issues and are going to close this issue in a month. + If think there might be other differences in our environment or in how we tried to reproduce this, we would appreciate any ideas. + close-issue-message: |- + This issue will be closed as no way to reproduce it has been found. + If you/somebody finds a way how to (semi-reliably) reproduce this, we can reopen this issue. ^^ + days-before-stale: 180 + days-before-close: 30 + days-before-pr-stale: -1 + days-before-pr-close: -1 + any-of-issue-labels: 'cannot-reproduce' + operations-per-run: 200 + diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..7e631cc --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,43 @@ +name: validate +on: + push: + branches: + - master + pull_request: + branches: + - master + - 1.23.X + workflow_dispatch: + +permissions: + contents: read + pull-requests: write # enable write permissions for pull request comments + +jobs: + json-yaml-validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: json-yaml-validate + id: json-yaml-validate + uses: GrantBirki/json-yaml-validate@v2.4.0 + with: + comment: "true" # enable comment mode + exclude_file: ".github/config/exclude.txt" # gitignore style file for exclusions + + # General validations + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Validate language JSON files + run: node ./extra/check-lang-json.js + + - name: Validate knex migrations filename + run: node ./extra/check-knex-filenames.mjs |