Skip to content

Commit 712b650

Browse files
authored
Merge pull request #1 from jjideenschmiede/development
Add first version of files to project
2 parents 8737933 + c64f8f7 commit 712b650

File tree

17 files changed

+603
-0
lines changed

17 files changed

+603
-0
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Here you can find all the code owners for the following project.
2+
* @jjideenschmiede/backend
3+
.github/ @jjideenschmiede/devops
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Bug Report
2+
description: Create a report to help us improve.
3+
title: "fix: "
4+
labels: ["fix"]
5+
assignees:
6+
- gowizzard
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Bitte fülle alle Felder zu deinem Bug Report sorgfältig aus, sodass diese unter besten Voraussetzungen bearbeitet werden können.
12+
- type: textarea
13+
id: which-error
14+
attributes:
15+
label: Welcher Fehler ist aufgetreten?
16+
description: Beschreibe den Fehler so detailliert wie möglich.
17+
placeholder: "Ein Fehler ist aufgetreten, weil..."
18+
validations:
19+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Feature Request
2+
description: Create a new feature request to help us improve.
3+
title: "feat: "
4+
labels: ["feature"]
5+
assignees:
6+
- gowizzard
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Bitte fülle alle Felder zu dem Feature Request sorgfältig aus, sodass diese unter besten Voraussetzungen bearbeitet werden können.
12+
- type: textarea
13+
id: which-feature
14+
attributes:
15+
label: Welches Feature möchtest du vorschlagen?
16+
description: Beschreibe das Feature so detailliert wie möglich.
17+
placeholder: "Ich möchte das Feature, weil..."
18+
validations:
19+
required: true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
If you can read this, then the adjustments are so minimal that they do not need to be described.
2+
3+
**PS: The code is documentation enough! 🤡**

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# The dependabot.yml file is used to configure the dependabot.
2+
# The dependabot is a bot that automatically updates the dependencies of the project.
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"
10+
reviewers:
11+
- "jjideenschmiede/devops"
12+
commit-message:
13+
prefix: "ci"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Pull Request Labels
2+
on:
3+
pull_request:
4+
types: [opened, synchronize]
5+
jobs:
6+
pull-request-labels:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
- name: Add label to pull request
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
const script = require('.github/workflows/scripts/labels.js')
19+
script({github, context})
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Qodana Code Quality
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
types: [opened, synchronize]
6+
env:
7+
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
8+
jobs:
9+
code-quality:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
checks: write
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.pull_request.head.sha }}
20+
fetch-depth: 0
21+
- name: Qodana Scan
22+
uses: JetBrains/qodana-action@v2025.1
23+
with:
24+
args: --linter,jetbrains/qodana-jvm:2025.1
25+
post-pr-comment: false
26+
env:
27+
QODANA_TOKEN: ${{ env.QODANA_TOKEN }}
28+
QODANA_ENDPOINT: "https://qodana.cloud"
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// This script is used to add labels to pull requests based on the title of the pull request.
2+
// The title of the pull request is checked for specific keywords and based on the keyword, a label is added
3+
// to the pull request. If the label does not exist, it is created and then added to the pull request.
4+
module.exports = async ({ github, context }) => {
5+
6+
const commits = await github.rest.pulls.listCommits({
7+
owner: context.repo.owner,
8+
repo: context.repo.repo,
9+
pull_number: context.payload.pull_request.number,
10+
});
11+
12+
for (const commit of commits.data) {
13+
14+
const title = commit.commit.message.split('\n')[0].toLowerCase();
15+
16+
const regex = /^(fix|feat|build|docs|test|chore)(\((\w+)\))?(!)?:\s.+$/;
17+
const match = title.match(regex);
18+
if (!match) continue;
19+
20+
const type = match[1];
21+
const scope = match[3];
22+
const breaking = match[4] === "!";
23+
24+
const config = {
25+
"fix": { name: "fix", description: "Fixes specific bug or issue", color: "FF1938" },
26+
"feat": { name: "feature", description: "Adds new features", color: "00EEBC" },
27+
"build": { name: "build", description: "Updates in build components", color: "04103A" },
28+
"docs": { name: "documentation", description: "Documentation updates", color: "19ABFF" },
29+
"test": { name: "test", description: "Test suite changes", color: "EBF0F6" },
30+
"chore": { name: "chore", description: "Other changes", color: "19ABFF" },
31+
"deps": { name: "dependencies", description: "Dependency updates", color: "FFE019" }
32+
};
33+
34+
let labels = [];
35+
if (config[type]) labels.push(config[type]);
36+
if (config[scope]) labels.push(config[scope]);
37+
if (breaking) {
38+
labels.push({ name: "breaking change", description: "Introduces significant changes", color: "FFE019" });
39+
}
40+
41+
if (labels.length === 0) continue;
42+
43+
const existing = await github.rest.issues.listLabelsForRepo({
44+
owner: context.repo.owner,
45+
repo: context.repo.repo,
46+
});
47+
48+
for (const label of labels) {
49+
const exists = existing.data.some(data => data.name === label.name);
50+
if (!exists) {
51+
await github.rest.issues.createLabel({
52+
owner: context.repo.owner,
53+
repo: context.repo.repo,
54+
name: label.name,
55+
color: label.color,
56+
description: label.description,
57+
});
58+
}
59+
}
60+
61+
await github.rest.issues.addLabels({
62+
issue_number: context.payload.pull_request.number,
63+
owner: context.repo.owner,
64+
repo: context.repo.repo,
65+
labels: labels.map(label => label.name),
66+
});
67+
68+
}
69+
70+
};

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# First irgnore all unused folders.
2+
# After that we ignore all other files.
3+
.gradle
4+
.teamcity

0 commit comments

Comments
 (0)