Skip to content

Commit 5d0e9a4

Browse files
authored
Initial commit
0 parents  commit 5d0e9a4

23 files changed

+919
-0
lines changed

.github/CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These owners will be the default owners for everything in the repo.
2+
# Unless a later match takes precedence, global owners will be requested for review when someone opens a pull request.
3+
* @SchweizerischeBundesbahnen/SBB-CLEW-WZU-POLARION

.github/ISSUE_TEMPLATE/bug_report.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
name: Bug report
3+
description: File a new bug
4+
labels: [bug, triage]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Before requesting: search [existing issues](../../../../labels/bug).
10+
11+
- type: textarea
12+
attributes:
13+
label: Current Behavior
14+
description: "Description of the current behavior."
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
attributes:
20+
label: Expected Behavior
21+
description: "Description of the expected behavior."
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
attributes:
27+
label: Steps To Reproduce
28+
description: "Example steps to reproduce the behavior:"
29+
placeholder: |
30+
1. In this environment...
31+
2. With this config...
32+
3. Run '...'
33+
4. See error...
34+
validations:
35+
required: true
36+
37+
- type: input
38+
attributes:
39+
label: Environment - OS
40+
description: "Linux or Windows"
41+
validations:
42+
required: true
43+
44+
- type: input
45+
attributes:
46+
label: Polarion version
47+
description: "2310, 2404, etc..."
48+
validations:
49+
required: true
50+
51+
- type: input
52+
attributes:
53+
label: Extension Version
54+
description: "It can be found under https://<<host>>/polarion/#/project/dev/administration/<<Extension Name>>/About"
55+
validations:
56+
required: true
57+
58+
- type: textarea
59+
attributes:
60+
label: Anything else
61+
description: "Further hints, links, or references? Any additional information probably helping in root cause analysis."
62+
validations:
63+
required: false
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Feature request
3+
description: Request an enhancement for this Polarion extension
4+
labels: [enhancement]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Before requesting: search [existing issues](../../../../labels/enhancement).
10+
11+
- type: textarea
12+
attributes:
13+
label: "Description"
14+
description: "Describe the feature you're requesting."
15+
placeholder: "This feature adds functionality to ..."
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
attributes:
21+
label: "Motivation"
22+
description: "Describe additional context such as examples or use cases helping in understanding the feature request."
23+
placeholder: "This feature would be helpful because ... so that the following use case is addressed: ..."
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
attributes:
29+
label: "Proposed Solution (optional)"
30+
description: "Sketch an implementation idea, possibly considering multiple approaches."
31+
validations:
32+
required: false

.github/pull_request_template.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Proposed changes
2+
3+
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) here in this description (not in the title of the PR).
4+
5+
### Checklist
6+
7+
Before creating a PR, run through this checklist and mark each as complete:
8+
- [ ] I have read the [`CONTRIBUTING`](CONTRIBUTING.md) document
9+
- [ ] If applicable, I have added tests that prove my fix is effective or that my feature works
10+
- [ ] If applicable, I have checked that any relevant tests pass after adding my changes
11+
- [ ] I have updated any relevant documentation

.github/workflows/maven-release.yml

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
name: maven-release
3+
on:
4+
push:
5+
branches: [main, feature/**, renovate/**]
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
packages: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up JDK 17 for deploy to S3 bucket
15+
uses: actions/setup-java@v4
16+
with:
17+
distribution: adopt
18+
java-version: 17
19+
cache: maven
20+
- uses: whelk-io/maven-settings-xml-action@v22
21+
with:
22+
repositories: >
23+
[
24+
{
25+
"id": "s3",
26+
"name": "s3.sbb.polarion.maven.repo",
27+
"url": "s3://sbb-polarion-maven-repo/polarion.mvn",
28+
"releases": {
29+
"enabled": "true",
30+
"updatePolicy": "never"
31+
}
32+
},
33+
{
34+
"id": "repsy",
35+
"name": "repsy.io",
36+
"url": "https://repo.repsy.io/mvn/sbb/polarion",
37+
"releases": {
38+
"enabled": "true",
39+
"updatePolicy": "never"
40+
}
41+
}
42+
]
43+
servers: >
44+
[
45+
{
46+
"id": "s3",
47+
"username": "${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY }}",
48+
"password": "${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY }}"
49+
},
50+
{
51+
"id": "github",
52+
"username": "${env.GITHUB_ACTOR}",
53+
"password": "${env.GITHUB_TOKEN}"
54+
},
55+
{
56+
"id": "repsy",
57+
"username": "${{ secrets.CH_SBB_POLARION_REPSY_USERNAME }}",
58+
"password": "${{ secrets.CH_SBB_POLARION_REPSY_PASSWORD }}"
59+
}
60+
]
61+
active_profiles: >
62+
[
63+
"github"
64+
]
65+
- name: Print settings.xml
66+
run: cat /home/runner/.m2/settings.xml
67+
- name: Build with Maven
68+
run: mvn --batch-mode clean package
69+
- name: Extract artefact version
70+
id: artefact_version
71+
run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
72+
- name: Publish to S3 bucket
73+
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }}
74+
run: mvn --batch-mode deploy -Ps3Deploy
75+
- name: Publish to repsy.io
76+
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }}
77+
run: mvn --batch-mode deploy -PrepsyDeploy
78+
- name: Publish to GitHub Packages
79+
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }}
80+
run: mvn --batch-mode deploy -PgithubDeploy
81+
env:
82+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/pr.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: PR checks
3+
4+
on:
5+
pull_request:
6+
types:
7+
- opened
8+
- edited
9+
- synchronize
10+
- reopened
11+
- unlocked
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
check-conventional-commit:
18+
name: Check commit messages
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
ref: "${{ github.event.pull_request.head.ref }}"
24+
repository: "${{ github.event.pull_request.head.repo.full_name }}"
25+
fetch-depth: 0
26+
- uses: actions/setup-python@v5
27+
with:
28+
cache: "pip" # caching pip dependencies
29+
- run: pip install commitizen
30+
- name: Check commit messages
31+
run: cz check --rev-range origin/${GITHUB_BASE_REF}..

.github/workflows/release-please.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: release-please
3+
on:
4+
push:
5+
branches: [main]
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
release-please:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: release-please
14+
id: release
15+
uses: google-github-actions/release-please-action@v4
16+
with:
17+
release-type: maven
18+
default-branch: main

.gitignore

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.jar
15+
*.war
16+
*.nar
17+
*.ear
18+
*.zip
19+
*.tar.gz
20+
*.rar
21+
22+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23+
hs_err_pid*
24+
replay_pid*
25+
.idea/*
26+
27+
# code style config
28+
!.idea/codeStyles
29+
.idea/codeStyles/*
30+
!.idea/codeStyles/Project.xml
31+
!.idea/codeStyles/codeStyleConfig.xml
32+
33+
target/
34+
*.iml
35+
dependency-reduced-pom.xml

.idea/codeStyles/Project.xml

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mvn/extensions.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<extensions>
2+
<extension>
3+
<groupId>com.github.seahen</groupId>
4+
<artifactId>maven-s3-wagon</artifactId>
5+
<version>1.3.3</version>
6+
</extension>
7+
</extensions>

.pre-commit-config.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
default_install_hook_types: [pre-commit, commit-msg]
3+
repos:
4+
- repo: https://github.com/lyz-code/yamlfix
5+
rev: 1.13.0
6+
hooks:
7+
- id: yamlfix
8+
args: [-c .yamlfix]
9+
- repo: https://github.com/pre-commit/pre-commit-hooks
10+
rev: v4.5.0
11+
hooks:
12+
- id: check-merge-conflict
13+
- id: trailing-whitespace
14+
- id: check-xml
15+
- id: check-json
16+
- id: check-yaml
17+
- id: detect-private-key
18+
- id: no-commit-to-branch
19+
- id: mixed-line-ending
20+
- repo: https://github.com/zricethezav/gitleaks
21+
rev: v8.18.0
22+
hooks:
23+
- id: gitleaks
24+
- repo: https://github.com/grigoriev/pre-commit-check-git-user
25+
rev: v0.9.0
26+
hooks:
27+
- id: check-git-config-user-email
28+
args: [--templates, ^\S+\.\S+@sbb\.ch$]
29+
- repo: https://github.com/commitizen-tools/commitizen
30+
rev: v3.13.0
31+
hooks:
32+
- id: commitizen

.yamlfix

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
allow_duplicate_keys = false
2+
line_length = 120
3+
sequence_style = "flow_style"

0 commit comments

Comments
 (0)