Skip to content

Commit

Permalink
chore: update repo with template (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ariwk authored Jun 5, 2024
1 parent 1b4d1a8 commit 7f4f4ed
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 66 deletions.
21 changes: 7 additions & 14 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,50 @@ 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...
3. Run '...'
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://<<host>>/polarion/#/project/dev/administration/<<Extension Name>>/About"
description: It can be found under https://<<host>>/polarion/#/project/dev/administration/<<Extension Name>>/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
19 changes: 8 additions & 11 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 3 additions & 4 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: maven-release
on:
push:
branches: [main, feature/**, renovate/**]
branches: ['**/**']
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -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 }}"
}
}
]
Expand All @@ -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
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
---
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
runs-on: ubuntu-latest
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}..
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
uses: googleapis/release-please-action@v4
with:
release-type: maven
default-branch: main
target-branch: main
11 changes: 5 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion .yamlfix → .yamlfix.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
allow_duplicate_keys = false
line_length = 120
line_length = 180
sequence_style = "flow_style"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 1 addition & 16 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -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"
]
}

0 comments on commit 7f4f4ed

Please sign in to comment.