From 658b0010f2d4d982c62891c58fb5cae464f03e38 Mon Sep 17 00:00:00 2001 From: ariwk Date: Wed, 5 Jun 2024 17:26:07 +0200 Subject: [PATCH] chore: update repo with template --- .github/ISSUE_TEMPLATE/bug_report.yml | 21 +++++++-------------- .github/ISSUE_TEMPLATE/feature_request.yml | 19 ++++++++----------- .github/workflows/maven-release.yml | 7 +++---- .github/workflows/pr.yml | 16 ++++------------ .github/workflows/release-please.yml | 2 +- .pre-commit-config.yaml | 11 +++++------ .yamlfix => .yamlfix.toml | 2 +- CONTRIBUTING.md | 2 +- renovate.json | 17 +---------------- 9 files changed, 31 insertions(+), 66 deletions(-) rename .yamlfix => .yamlfix.toml (76%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 196f6b3..0a9e135 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -7,25 +7,22 @@ body: attributes: value: | Before requesting: search [existing issues](../../../../labels/bug). - - type: textarea attributes: label: Current Behavior - description: "Description of the current behavior." + description: Description of the current behavior. validations: required: true - - type: textarea attributes: label: Expected Behavior - description: "Description of the expected behavior." + description: Description of the expected behavior. validations: required: true - - type: textarea attributes: label: Steps To Reproduce - description: "Example steps to reproduce the behavior:" + description: 'Example steps to reproduce the behavior:' placeholder: | 1. In this environment... 2. With this config... @@ -33,31 +30,27 @@ body: 4. See error... validations: required: true - - type: input attributes: label: Environment - OS - description: "Linux or Windows" + description: Linux or Windows validations: required: true - - type: input attributes: label: Polarion version - description: "2310, 2404, etc..." + description: 2310, 2404, etc... validations: required: true - - type: input attributes: label: Extension Version - description: "It can be found under https://<>/polarion/#/project/dev/administration/<>/About" + description: It can be found under https://<>/polarion/#/project/dev/administration/<>/About validations: required: true - - type: textarea attributes: label: Anything else - description: "Further hints, links, or references? Any additional information probably helping in root cause analysis." + description: Further hints, links, or references? Any additional information probably helping in root cause analysis. validations: required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index a9ac348..216f9c3 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -7,26 +7,23 @@ body: attributes: value: | Before requesting: search [existing issues](../../../../labels/enhancement). - - type: textarea attributes: - label: "Description" - description: "Describe the feature you're requesting." - placeholder: "This feature adds functionality to ..." + label: Description + description: Describe the feature you're requesting. + placeholder: This feature adds functionality to ... validations: required: true - - type: textarea attributes: - label: "Motivation" - description: "Describe additional context such as examples or use cases helping in understanding the feature request." - placeholder: "This feature would be helpful because ... so that the following use case is addressed: ..." + label: Motivation + description: Describe additional context such as examples or use cases helping in understanding the feature request. + placeholder: 'This feature would be helpful because ... so that the following use case is addressed: ...' validations: required: true - - type: textarea attributes: - label: "Proposed Solution (optional)" - description: "Sketch an implementation idea, possibly considering multiple approaches." + label: Proposed Solution (optional) + description: Sketch an implementation idea, possibly considering multiple approaches. validations: required: false diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml index fa9fabb..a588176 100644 --- a/.github/workflows/maven-release.yml +++ b/.github/workflows/maven-release.yml @@ -2,7 +2,7 @@ name: maven-release on: push: - branches: [main, feature/**, renovate/**] + branches: ['**/**'] jobs: build: runs-on: ubuntu-latest @@ -37,7 +37,7 @@ jobs: "id": "githubDeploy", "properties": { - "altDeploymentRepository": "github::default::https://maven.pkg.github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.pdf-exporter" + "altDeploymentRepository": "github::default::https://maven.pkg.github.com/${{ github.repository }}" } } ] @@ -60,8 +60,7 @@ jobs: run: mvn --batch-mode clean package - name: Extract artefact version id: artefact_version - run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" - >> $GITHUB_OUTPUT + run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT - name: Publish to GitHub Packages if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }} run: mvn --batch-mode deploy -PgithubDeploy diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4ead895..fe7df91 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,18 +1,10 @@ --- name: PR checks - on: pull_request: - types: - - opened - - edited - - synchronize - - reopened - - unlocked - + types: [opened, edited, synchronize, reopened, unlocked] permissions: contents: read - jobs: check-conventional-commit: name: Check commit messages @@ -20,12 +12,12 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: "${{ github.event.pull_request.head.ref }}" - repository: "${{ github.event.pull_request.head.repo.full_name }}" + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} fetch-depth: 0 - uses: actions/setup-python@v5 with: - cache: "pip" # caching pip dependencies + cache: pip # caching pip dependencies - run: pip install commitizen - name: Check commit messages run: cz check --rev-range origin/${GITHUB_BASE_REF}.. diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 3bdb4fa..07c92c2 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -15,4 +15,4 @@ jobs: uses: googleapis/release-please-action@v4 with: release-type: maven - default-branch: main + target-branch: main diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aa74040..6c634be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,23 +2,22 @@ default_install_hook_types: [pre-commit, commit-msg] repos: - repo: https://github.com/lyz-code/yamlfix - rev: 1.13.0 + rev: 1.16.0 hooks: - id: yamlfix - args: [-c .yamlfix] + args: [-c, .yamlfix.toml] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-merge-conflict - id: trailing-whitespace - id: check-xml - id: check-json - id: check-yaml - - id: detect-private-key - id: no-commit-to-branch - id: mixed-line-ending - repo: https://github.com/zricethezav/gitleaks - rev: v8.18.0 + rev: v8.18.3 hooks: - id: gitleaks - repo: https://github.com/grigoriev/pre-commit-check-git-user @@ -27,6 +26,6 @@ repos: - id: check-git-config-user-email args: [--templates, ^\S+\.\S+@sbb\.ch$] - repo: https://github.com/commitizen-tools/commitizen - rev: v3.13.0 + rev: v3.27.0 hooks: - id: commitizen diff --git a/.yamlfix b/.yamlfix.toml similarity index 76% rename from .yamlfix rename to .yamlfix.toml index 685c363..4d8e209 100644 --- a/.yamlfix +++ b/.yamlfix.toml @@ -1,3 +1,3 @@ allow_duplicate_keys = false -line_length = 120 +line_length = 180 sequence_style = "flow_style" \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 581600d..fbeaf36 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,7 +84,7 @@ Before you submit your Pull Request (PR) consider the following guidelines: Note: The optional commit `-a` command line option will automatically "add" and "rm" edited files. Note: The command line option `-S` generates a signed commit, which is required to make a contribution (See [Developer Certificate of Origin](./LICENSES/DCO.txt)) - + * Push your branch to GitHub: ```shell diff --git a/renovate.json b/renovate.json index 332e0cd..959d019 100644 --- a/renovate.json +++ b/renovate.json @@ -1,21 +1,6 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "config:base", - ":prNotPending", - ":rebaseStalePrs", - ":semanticCommits" - ], - "branchConcurrentLimit": 1, - "packageRules": [ - { - "matchManagers": ["maven"], - "allowedVersions": "!/-jboss-|-redhat-|redhat-|-jenkins-|-patch-|-atlassian-|-NODEP$|-atlassian$|-jbossorg-|-SNAPSHOT$|-PFD-|-jbossas-|-does-not-exist|-tc$|-jahia1$/" - }, - { - "matchManagers": ["maven"], - "matchDepTypes": ["provided", "runtime"], - "enabled": false - } + "github>SchweizerischeBundesbahnen/casc-renovate-preset-polarion-java" ] }