diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..99db888 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true +end_of_line = lf +max_line_length = 160 + +[*.{yaml,yml}] +indent_size = 2 \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..67a955b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,107 @@ +name: 🐞 Bug +description: Something is not working as indended. +labels: [🐞 bug] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + Before you submit this issue, please make sure you have read the documentation and searched for similar issues. + If you have done that, please fill out the template below. + + - type: textarea + attributes: + label: Current Behavior + description: A concise description of what you're experiencing. + placeholder: | + When I do , happens and I see the error message attached below: + ```...``` + validations: + required: true + + - type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you expected to happen. + placeholder: When I do , should happen instead. + validations: + required: true + + - type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. In this environment... + 2. With this config... + 3. Run '...' + 4. See error... + render: Markdown + validations: + required: false + + - type: markdown + attributes: + value: + Please not that openvpn-auth-oauth2 requires an OpenVPN server version + 2.6.2 or higher. + + - type: textarea + attributes: + label: Environment + description: | + examples: + - **openvpn-auth-oauth2 Version**: 1.5.1 + - **OpenVPN Server Version**: 2.6.2 + - **Server OS**: Linux + - **OpenVPN Client (flavor, OS)**: Tunnelblick 4.0.0beta10 / MacOS + - **OIDC Provider**: Entra ID + value: | + - openvpn-auth-oauth2 Version: + - OpenVPN Server Version: + - Server OS: + - OpenVPN Client (flavor, OS): + - OIDC Provider: + validations: + required: true + + - type: textarea + attributes: + label: openvpn-auth-oauth2 logs + description: | + Log of openvpn-auth-oauth2. Output of `journalctl -flu openvpn-auth-oauth2` and `dmesg | grep openvpn`, if openvpn-auth-oauth2 is installed as linux package. + ⚠️ Without proving logs, I unable to assist here. ⚠️ + render: shell + validations: + required: true + + - type: textarea + attributes: + label: openvpn server logs + description: | + Log of openvpn server + render: shell + validations: + required: false + + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + + - type: checkboxes + id: documentation + attributes: + label: Preflight Checklist + options: + - required: true + #language=markdown + label: | + I could not find a solution in the [documentation](https://github.com/jkroepke/openvpn-auth-oauth2/wiki), + the [FAQ](https://github.com/jkroepke/openvpn-auth-oauth2/wiki/FAQ), the existing issues or discussions. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/enhancement.yaml b/.github/ISSUE_TEMPLATE/enhancement.yaml new file mode 100644 index 0000000..570fc88 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.yaml @@ -0,0 +1,54 @@ +name: ✨ Enhancement / Feature / Task +description: Some feature is missing or incomplete. +labels: [✨ enhancement] +body: + - type: textarea + attributes: + label: Problem Statement + description: + Without specifying a solution, describe what the project is missing + today. + placeholder: | + The rotating project logo has a fixed size and color. + There is no way to make it larger and more shiny. + validations: + required: false + - type: textarea + attributes: + label: Proposed Solution + description: Describe the proposed solution to the problem above. + placeholder: | + - Implement 2 new flags CLI: ```--logo-color=FFD700``` and ```--logo-size=100``` + - Let these flags control the size of the rotating project logo. + validations: + required: false + - type: textarea + attributes: + label: Additional information + placeholder: | + We considered adjusting the logo size to the phase of the moon, but there was no + reliable data source in air-gapped environments. + validations: + required: false + - type: textarea + attributes: + label: Acceptance Criteria + placeholder: | + - [ ] As a user, I can control the size of the rotating logo using a CLI flag. + - [ ] As a user, I can control the color of the rotating logo using a CLI flag. + - [ ] Defaults are reasonably set. + - [ ] New settings are appropriately documented. + - [ ] No breaking change for current users of the rotating logo feature. + validations: + required: false + + - type: checkboxes + id: documentation + attributes: + label: Preflight Checklist + options: + - required: true + #language=markdown + label: | + I could not find a solution in the [documentation](https://github.com/jkroepke/openvpn-auth-oauth2/wiki), + the [FAQ](https://github.com/jkroepke/openvpn-auth-oauth2/wiki/FAQ), the existing issues or discussions. diff --git a/.github/ISSUE_TEMPLATE/question.yaml b/.github/ISSUE_TEMPLATE/question.yaml new file mode 100644 index 0000000..bb428c4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yaml @@ -0,0 +1,59 @@ +name: ❓ Question +description: Something is not clear. +labels: [❓ question] +body: + - type: textarea + attributes: + label: Problem Statement + description: + Without specifying a solution, describe what the project is missing + today. + placeholder: | + The rotating project logo has a fixed size and color. + There is no way to make it larger and more shiny. + validations: + required: false + + - type: textarea + attributes: + label: openvpn-auth-oauth2 logs + description: | + Log of openvpn-auth-oauth2. Output of `journalctl -flu openvpn-auth-oauth2` and `dmesg | grep openvpn`, if openvpn-auth-oauth2 is installed as linux package. + ⚠️ Without proving logs, I unable to assist in case of issues. ⚠️ + render: shell + validations: + required: true + + - type: markdown + attributes: + value: + Please not that openvpn-auth-oauth2 requires an OpenVPN server version + 2.6.2 or higher. + + - type: textarea + attributes: + label: Environment + description: | + examples: + - **openvpn-auth-oauth2 Version**: 1.5.1 + - **OpenVPN Server Version**: 2.6.2 + - **Server OS**: Linux + - **OpenVPN Client (flavor, OS)**: Tunnelblick 4.0.0beta10 / MacOD + value: | + - openvpn-auth-oauth2 Version: + - OpenVPN Server Version: + - Server OS: + - OpenVPN Client (flavor, OS): + validations: + required: false + + - type: checkboxes + id: documentation + attributes: + label: Preflight Checklist + options: + - required: true + #language=markdown + label: | + I could not find a solution in the [documentation](https://github.com/jkroepke/openvpn-auth-oauth2/wiki), + the [FAQ](https://github.com/jkroepke/openvpn-auth-oauth2/wiki/FAQ), the existing issues or discussions. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b1421a9..34065cb 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -20,5 +20,6 @@ Complete these before marking the PR as `ready to review`: - [ ] [DCO](https://github.com/prometheus-community/helm-charts/blob/main/CONTRIBUTING.md#sign-off-your-work) signed - [ ] The PR title has a summary of the changes +- [ ] The PR title begins with `feat:`, `fix:` or `chore:` - [ ] The PR body has a summary to reflect any significant (and particularly user-facing) changes introduced by this PR diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..ad16672 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,15 @@ +version: 1 +appendOnly: true +labels: + - label: 'chore' + type: 'pull_request' + title: '^chore:.*' + - label: '🐞 bug' + type: 'pull_request' + title: '^fix:.*' + - label: '✨ enhancement' + type: 'pull_request' + title: '^feat:.*' + - label: '📖 docs' + type: 'pull_request' + title: '^docs:.*' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9e5d16..80e7f71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,13 +68,10 @@ jobs: VALIDATE_ALL_CODEBASE: true VALIDATE_BASH: true VALIDATE_BASH_EXEC: true - VALIDATE_EDITORCONFIG: true VALIDATE_ENV: true VALIDATE_GITHUB_ACTIONS: true VALIDATE_HTML: true - # VALIDATE_JSON: true VALIDATE_NATURAL_LANGUAGE: true - # VALIDATE_RENOVATE: true VALIDATE_SHELL_SHFMT: true VALIDATE_XML: true VALIDATE_YAML: true diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..17995d8 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,62 @@ +name: Pull Request +on: + pull_request: + types: + - opened + - reopened + - synchronize + - labeled + - unlabeled + +permissions: {} + +jobs: + add-labels: + runs-on: ubuntu-latest + if: >- + !contains(github.event.pull_request.labels.*.name, '💥 breaking-change') && + !contains(github.event.pull_request.labels.*.name, '✨ enhancement') && + !contains(github.event.pull_request.labels.*.name, '🐞 bug') && + !contains(github.event.pull_request.labels.*.name, '📖 docs') && + !contains(github.event.pull_request.labels.*.name, 'chore') && + !contains(github.event.pull_request.labels.*.name, '🛠️ dependencies') + steps: + - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + id: app-token + with: + app-id: 1248576 + private-key: ${{ secrets.APP_RENOVATE_HELPER_PRIVATE_KEY }} + - uses: srvaroa/labeler@v1 + env: + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + validate-labels: + name: check labels missing + runs-on: ubuntu-latest + steps: + - name: check + if: >- + !contains(github.event.pull_request.labels.*.name, '💥 breaking-change') && + !contains(github.event.pull_request.labels.*.name, '✨ enhancement') && + !contains(github.event.pull_request.labels.*.name, '🐞 bug') && + !contains(github.event.pull_request.labels.*.name, '📖 docs') && + !contains(github.event.pull_request.labels.*.name, 'chore') && + !contains(github.event.pull_request.labels.*.name, '🛠️ dependencies') + run: >- + echo One of the following labels is missing on this PR: + breaking-change enhancement bug docs chore && exit 1 + validate-title: + name: check title prefix + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: check + run: | + PR_TITLE_PREFIX=$(echo "$PR_TITLE" | cut -d':' -f1) + if [[ "$PR_TITLE_PREFIX" == "fix"* ]] || [[ "$PR_TITLE_PREFIX" == "feat"* ]] || [[ "$PR_TITLE_PREFIX" == "chore"* ]]; then + exit 0 + fi + + echo "PR title must start with feat, fix or chore" + exit 1 + env: + PR_TITLE: ${{ github.event.pull_request.title }} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..d36e950 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +.github/**/*.yaml diff --git a/release.config.mjs b/.releaserc similarity index 79% rename from release.config.mjs rename to .releaserc index 3463573..e2f8e22 100644 --- a/release.config.mjs +++ b/.releaserc @@ -1,14 +1,11 @@ -/** - * @type {import('semantic-release').GlobalConfig} - */ -export default { +{ branches: ['main'], plugins: [ [ '@semantic-release/commit-analyzer', { preset: 'angular', - releaseRules: [{ type: 'chore', scope: 'deps', release: 'patch' }] + releaseRules: [{ type: 'chore', scope: 'deps', release: 'patch' },{ type: 'chore', scope: 'fix', release: 'patch' }] } ], [ diff --git a/action.yml b/action.yml index 41afecc..ecef0e9 100644 --- a/action.yml +++ b/action.yml @@ -2,7 +2,7 @@ name: 'stackit-cli tools installer' description: |- Install a specific version of the stackit-cli binary. Acceptable values are latest or any semantic version string like 0.31.0. - + https://github.com/stackitcloud/stackit-cli inputs: version: diff --git a/badges/coverage.svg b/badges/coverage.svg index 22b6d51..f6403f3 100644 --- a/badges/coverage.svg +++ b/badges/coverage.svg @@ -1 +1 @@ -Coverage: 52.54%Coverage52.54% \ No newline at end of file +Coverage: 25.42%Coverage25.42% \ No newline at end of file diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 3643406..7a00c40 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -12,7 +12,6 @@ "src", "eslint.config.mjs", "jest.config.js", - "rollup.config.ts", - "release.config.mjs" + "rollup.config.ts" ] }