diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml index 9ecca77..af4a009 100644 --- a/.github/auto_assign.yml +++ b/.github/auto_assign.yml @@ -1,21 +1,5 @@ -# Set to true to add reviewers to pull requests +# Set to 'false' to disable adding reviewers to PRs. addReviewers: false -# Set to true to add assignees to pull requests -addAssignees: true - -# A list of reviewers to be added to pull requests (GitHub user name) -reviewers: - - tgrothe - -# A list of assignees, overrides reviewers if set -assignees: - - tgrothe - -# A list of keywords to be skipped the process that add reviewers if pull requests include it -skipKeywords: - - wip - -# A number of reviewers added to the pull request -# Set 0 to add all the reviewers (default: 0) -numberOfReviewers: 0 +# Set addAssignees to 'author' to set the PR creator as the assignee. +addAssignees: author diff --git a/.github/workflows/autoassign.yml b/.github/workflows/autoassign.yml new file mode 100644 index 0000000..dfa0329 --- /dev/null +++ b/.github/workflows/autoassign.yml @@ -0,0 +1,14 @@ +name: 'Auto Assign' + +on: + pull_request: + types: [opened, ready_for_review] + +jobs: + add-reviews: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: kentaro-m/auto-assign-action@v2.0.0 diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index c345bcc..2e73565 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,8 +1,10 @@ name: Enable Automerge + on: pull_request: - branches: - - main + branches: [main] + types: [opened, ready_for_review] + jobs: Enable-Automerge: permissions: write-all diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml deleted file mode 100644 index 13df00d..0000000 --- a/.github/workflows/dependency-review.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: 'Dependency review' - -on: - pull_request: - branches: [ "main" ] - -permissions: - contents: read - -jobs: - dependency-review: - runs-on: ubuntu-latest - steps: -# The following steps are commented out because the dependency-review-action -# is only available for private repositories with a GitHub Advanced Security license. -# - name: 'Checkout repository' -# uses: actions/checkout@v4 -# - name: 'Dependency Review' -# uses: actions/dependency-review-action@v4 - - run: echo "Empty action, because the dependency-review-action is only available for private repos with a GitHub Advanced Security license." diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index a54c982..b383cf0 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -8,11 +8,9 @@ on: jobs: build: - runs-on: ubuntu-latest permissions: contents: read - steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -20,11 +18,7 @@ jobs: with: java-version: '17' distribution: 'temurin' - - # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. - # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 - - name: Build with Gradle Wrapper run: ./gradlew clean build diff --git a/.github/workflows/jars.yml b/.github/workflows/jars.yml index be99b11..0ecbed2 100644 --- a/.github/workflows/jars.yml +++ b/.github/workflows/jars.yml @@ -11,7 +11,6 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -19,13 +18,10 @@ jobs: with: java-version: '17' distribution: 'temurin' - - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 - - name: Build with Gradle Wrapper run: ./gradlew jar - - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: diff --git a/.gitignore b/.gitignore index 6c496ef..7adabc4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ .idea/ build/ logs/ -gradlew.bat diff --git a/build.gradle b/build.gradle index abc10ac..c039fce 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'application' id 'com.diffplug.spotless' version '8.1.0' id 'com.github.ben-manes.versions' version '0.53.0' - id 'com.github.spotbugs' version '6.4.7' + id 'com.github.spotbugs' version '6.4.8' } application { @@ -21,9 +21,9 @@ dependencies { testImplementation('org.junit.jupiter:junit-jupiter') testRuntimeOnly('org.junit.platform:junit-platform-launcher') + implementation 'org.apache.logging.log4j:log4j-core:3.0.0-beta3' implementation 'org.apache.commons:commons-lang3:3.20.0' implementation 'org.json:json:20250517' - implementation 'org.apache.logging.log4j:log4j-core:3.0.0-beta3' } test { diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 7bbfeb7..d9a56cf 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -5,11 +5,8 @@ public class Main { public static final Logger logger = LogManager.getLogger(); public static void main(String[] args) { - logger.debug("Hello"); - logger.debug(add(2, 3)); - } - - public static int add(int a, int b) { - return a + b; + logger.info("Application started."); + // Your application logic here + logger.info("Application finished."); } }