-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 04f8e8c
Showing
48 changed files
with
2,672 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Create a regex for a conventional commit. | ||
convetional_commit_regex="^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\([a-z \-]+\))?!?: .+$" | ||
|
||
# Get the commit message (the parameter we're given is just the path to the | ||
# temporary file which holds the message). | ||
commit_message=$(cat "$1") | ||
|
||
# Check the message, if we match, all good baby. | ||
if [[ "$commit_message" =~ $convetional_commit_regex ]]; then | ||
echo -e "\e[32mCommit message meets Conventional Commit standards...\e[0m" | ||
exit 0 | ||
fi | ||
|
||
# Uh-oh, this is not a conventional commit, show an example and link to the spec. | ||
echo -e "\e[31mThe commit message does not meet the Conventional Commit standard\e[0m" | ||
echo "An example of a valid message is: " | ||
echo " feat(login): add the 'remember me' button" | ||
echo "More details at: https://www.conventionalcommits.org/en/v1.0.0/#summary" | ||
exit 1 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "maven" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: (📡) Create GitHub Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-github-release: | ||
uses: sitepark/github-project-workflow/.github/workflows/create-github-release.yml@release/1.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: (▶) Create Release | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
release: | ||
uses: sitepark/github-project-workflow/.github/workflows/maven-release.yml@release/1.x | ||
with: | ||
botName: "sitepark-bot" | ||
botEmail: "opensource@sitepark.com" | ||
secrets: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | ||
GPG_KEY: ${{ secrets.GPG_KEY }} | ||
MVN_REPO_RELEASE_SERVER_ID: ${{ secrets.MVN_REPO_RELEASE_SERVER_ID }} | ||
MVN_REPO_RELEASE_SERVER_USERNAME: ${{ secrets.MVN_REPO_RELEASE_SERVER_USERNAME }} | ||
MVN_REPO_RELEASE_SERVER_PASSWORD: ${{ secrets.MVN_REPO_RELEASE_SERVER_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: (📡) Deploy Snapshot | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
uses: sitepark/github-project-workflow/.github/workflows/maven-deploy-snapshot.yml@release/1.x | ||
secrets: | ||
MVN_REPO_SNAPSHOT_SERVER_ID: ${{ secrets.MVN_REPO_SNAPSHOT_SERVER_ID }} | ||
MVN_REPO_SNAPSHOT_SERVER_USERNAME: ${{ secrets.MVN_REPO_SNAPSHOT_SERVER_USERNAME }} | ||
MVN_REPO_SNAPSHOT_SERVER_PASSWORD: ${{ secrets.MVN_REPO_SNAPSHOT_SERVER_PASSWORD }} | ||
MVN_REPO_SNAPSHOT_SERVER_URL: ${{ secrets.MVN_REPO_SNAPSHOT_SERVER_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: (▶) Start Hotfix | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
start-hotfix: | ||
uses: sitepark/github-project-workflow/.github/workflows/maven-start-hotfix.yml@release/1.x | ||
with: | ||
ref: ${{ github.ref }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: (📡) Verify | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'main' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
verify: | ||
uses: sitepark/github-project-workflow/.github/workflows/maven-verify.yml@release/1.x | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# eclipse | ||
.classpath | ||
.project | ||
.settings/ | ||
.fbExcludeFilterFile | ||
.pmd | ||
.pmdruleset.xml | ||
|
||
|
||
# ? validate | ||
reports/ | ||
|
||
target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Sitepark GmbH | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Publisher | ||
|
||
The Publisher component of the IES takes on the task of publishing data by compiling data from a resource with the help of aggregators and writing it as a file to the file system. | ||
|
||
These files are made available to the web server, with which these resources can then be further processed for the website. | ||
|
||
Other functions that are also assigned to this Publisher component are linked to the publication process. | ||
|
||
## Link Checker | ||
|
||
For an aggregated resource, all external links are collected and stored in the database. A scheduler checks the validity of the links at regular intervals and updates the status in the database. | ||
The status can be determined via the CMS to give the editors the opportunity to correct the links. | ||
|
||
## UseCases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.sitepark.ies</groupId> | ||
<artifactId>ies-publisher-core</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>ies-publisher-core-linkchecker</artifactId> | ||
<name>IES Link Checker</name> | ||
<description>Check published links</description> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>com.github.spotbugs</groupId> | ||
<artifactId>spotbugs-annotations</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>jakarta.inject</groupId> | ||
<artifactId>jakarta.inject-api</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</dependency> | ||
|
||
<!-- Java 8 Date/time --> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.datatype</groupId> | ||
<artifactId>jackson-datatype-jsr310</artifactId> | ||
</dependency> | ||
|
||
<!-- Java 8 Datatypes --> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.datatype</groupId> | ||
<artifactId>jackson-datatype-jdk8</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.eclipse.jdt</groupId> | ||
<artifactId>org.eclipse.jdt.annotation</artifactId> | ||
</dependency> | ||
|
||
<!-- Test-Dependencies --> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-library</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>nl.jqno.equalsverifier</groupId> | ||
<artifactId>equalsverifier</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.jparams</groupId> | ||
<artifactId>to-string-verifier</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
76 changes: 76 additions & 0 deletions
76
.../main/java/com/sitepark/ies/publisher/core/linkchecker/domain/entity/DailyScheduling.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package com.sitepark.ies.publisher.core.linkchecker.domain.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; | ||
import java.time.LocalTime; | ||
import java.util.Objects; | ||
|
||
@JsonDeserialize(builder = DailyScheduling.Builder.class) | ||
public class DailyScheduling implements Scheduling { | ||
|
||
private final LocalTime startTime; | ||
|
||
protected DailyScheduling(Builder builder) { | ||
this.startTime = builder.startTime; | ||
} | ||
|
||
@Override | ||
public String getType() { | ||
return "daily"; | ||
} | ||
|
||
@JsonFormat(pattern = "HH:mm") | ||
public LocalTime getStartTime() { | ||
return this.startTime; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public Builder toBuilder() { | ||
return new Builder(this); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(this.startTime); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
|
||
if (!(o instanceof DailyScheduling that)) { | ||
return false; | ||
} | ||
|
||
return Objects.equals(this.startTime, that.startTime); | ||
} | ||
|
||
@JsonPOJOBuilder(withPrefix = "", buildMethodName = "build") | ||
public static class Builder { | ||
|
||
private LocalTime startTime; | ||
|
||
private Builder() {} | ||
|
||
private Builder(DailyScheduling instance) { | ||
this.startTime = instance.startTime; | ||
} | ||
|
||
public Builder startTime(LocalTime startTime) { | ||
this.startTime = startTime; | ||
return this; | ||
} | ||
|
||
public Builder startTime(int hour, int minute) { | ||
this.startTime = LocalTime.of(hour, minute); | ||
return this; | ||
} | ||
|
||
public DailyScheduling build() { | ||
return new DailyScheduling(this); | ||
} | ||
} | ||
} |
Oops, something went wrong.