Skip to content

Commit

Permalink
Merge branch 'develop' into chore/test-preview-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed Aug 13, 2024
2 parents b452cc1 + e430740 commit cb79f89
Show file tree
Hide file tree
Showing 50 changed files with 2,379 additions and 329 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

---


20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
37 changes: 37 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
### Motivation
<!-- Explain why this change is necessary. What problem does it solve? -->
<!-- Link to the issue this PR addresses (e.g., `Fixes #123`, `Closes #123`, etc.) -->

### Description
<!-- Provide a brief summary of the changes. -->

### Screenshots (if applicable)
<!-- Attach screenshots here. -->

### Checklist

#### General

- [ ] PR title is clear and descriptive
- [ ] PR description explains the purpose and changes
- [ ] Code follows project coding standards
- [ ] Self-review of the code has been done
- [ ] Changes have been tested locally
- [ ] Screenshots have been attached (if applicable)
- [ ] Documentation has been updated (if applicable)

#### Client (if applicable)

- [ ] UI changes look good on all screen sizes and browsers
- [ ] No console errors or warnings
- [ ] User experience and accessibility have been tested
- [ ] Added Storybook stories for new components
- [ ] Components follow design system guidelines (if applicable)

#### Server (if applicable)

- [ ] Code is performant and follows best practices
- [ ] No security vulnerabilities introduced
- [ ] Proper error handling has been implemented
- [ ] Added tests for new functionality
- [ ] Changes have been tested in different environments (if applicable)
21 changes: 21 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
documentation:
- changed-files:
- any-glob-to-any-file: docs/**

client:
- changed-files:
- any-glob-to-any-file: webapp/**

application-server:
- changed-files:
- any-glob-to-any-file: server/application-server/**

intelligence-service:
- changed-files:
- any-glob-to-any-file: "server/intelligence-service/**"

feature:
- head-branch: ['^feature', 'feature', '^feat', 'feat']

bug:
- head-branch: ['^fix', 'fix', '^bug', 'bug']
87 changes: 87 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: "Pull Request Labeler"
on:
pull_request_target:

jobs:
labeler:
name: "Apply labels"
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: "Checkout repository"
uses: actions/checkout@v4

- uses: actions/labeler@v5
with:
configuration-path: .github/labeler.yml

- name: "Apply size label"
uses: actions/github-script@v7
with:
script: |
console.log("Fetching pull request diff...");
const diff = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
mediaType: {
format: "diff",
},
});
console.log("Pull request diff fetched successfully.");
const changedLines = diff.data
.split("\n")
.filter(line => line.startsWith('+') || line.startsWith('-'))
.length;
console.log(`Number of changed lines: ${changedLines}`);
let label = '';
if (changedLines > 1000) label = 'size:XXL';
else if (changedLines > 499) label = 'size:XL';
else if (changedLines > 99) label = 'size:L';
else if (changedLines > 29) label = 'size:M';
else if (changedLines > 9) label = 'size:S';
else label = 'size:XS';
console.log("Fetching existing labels...");
const labels = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
const sizeLabels = labels.data
.filter(label => label.name.startsWith('size:'))
.map(label => label.name);
if (sizeLabels.length > 0) {
console.log(`Removing existing size labels: ${sizeLabels.join(', ')}`);
for (const label of sizeLabels) {
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: label,
});
}
console.log("Existing size labels removed.");
} else {
console.log("No existing size labels to remove.");
}
if (label) {
console.log(`Applying label "${label}" to the pull request...`);
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: [label]
});
console.log(`Label "${label}" applied successfully.`);
} else {
console.log("No label to apply.");
}
11 changes: 11 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on:
pull_request:
types: [opened]
name: Pull Request
jobs:
assignAuthor:
name: Assign author to PR
runs-on: ubuntu-latest
steps:
- name: Assign author to PR
uses: technote-space/assign-author@v1
31 changes: 31 additions & 0 deletions .github/workflows/webapp-qa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Webapp QA

on:
pull_request:
paths:
- "webapp/**"
push:
paths:
- "webapp/**"
branches: [develop]

jobs:
quality:
name: Code Quality Checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install dependencies
working-directory: ./webapp
run: npm ci
- name: Run ESLint
working-directory: ./webapp
run: npm run lint
- name: Run Prettier
working-directory: ./webapp
run: npm run prettier:check
13 changes: 10 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "interactive"
}
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "interactive",
"tailwindCSS.experimental.classRegex": [
"cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]",
"cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"
],
"editor.codeActionsOnSave": {
"source.fixAll": true
}
}
Loading

0 comments on commit cb79f89

Please sign in to comment.