From 7421ce72364d0e6cccca54b7ab0c68c7de506ee9 Mon Sep 17 00:00:00 2001 From: BJ Hargrave Date: Thu, 7 Jul 2022 13:48:48 -0400 Subject: [PATCH 1/3] promise: Change to use unambiguous method reference Signed-off-by: BJ Hargrave --- .../org/osgi/test/assertj/promise/AbstractPromiseAssert.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.osgi.test.assertj.promise/src/main/java/org/osgi/test/assertj/promise/AbstractPromiseAssert.java b/org.osgi.test.assertj.promise/src/main/java/org/osgi/test/assertj/promise/AbstractPromiseAssert.java index c4c811aa..9015b5d9 100644 --- a/org.osgi.test.assertj.promise/src/main/java/org/osgi/test/assertj/promise/AbstractPromiseAssert.java +++ b/org.osgi.test.assertj.promise/src/main/java/org/osgi/test/assertj/promise/AbstractPromiseAssert.java @@ -265,7 +265,7 @@ RESULT getValue(ACTUAL promise) { * resolved with a failure. */ public AbstractObjectAssert hasValueThat() { - return isSuccessful().extracting(this::getValue, Assertions:: assertThat); + return isSuccessful().extracting(this::getValue, Assertions:: assertThatObject); } /** From 4cec3bbc2d7feab52fa707482cb2afe36ded46d8 Mon Sep 17 00:00:00 2001 From: BJ Hargrave Date: Thu, 7 Jul 2022 13:50:08 -0400 Subject: [PATCH 2/3] assert: Use supplier for requireNonNull message Signed-off-by: BJ Hargrave --- .../org/osgi/test/assertj/dictionary/DictionaryAssert.java | 4 ++-- .../test/assertj/servicereference/ServiceReferenceAssert.java | 2 +- .../serviceregistration/ServiceRegistrationAssert.java | 2 +- .../java/org/osgi/test/assertj/promise/PromiseAssert.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/dictionary/DictionaryAssert.java b/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/dictionary/DictionaryAssert.java index dab72af2..e26a3c62 100644 --- a/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/dictionary/DictionaryAssert.java +++ b/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/dictionary/DictionaryAssert.java @@ -44,8 +44,8 @@ public static DictionaryAssert assertThat(Dictionary actual) public static final , K, V> InstanceOfAssertFactory> dictionary( Class keyType, Class valueType) { - requireNonNull(keyType, shouldNotBeNull("keyType").create()); - requireNonNull(valueType, shouldNotBeNull("valueType").create()); + requireNonNull(keyType, shouldNotBeNull("keyType")::create); + requireNonNull(valueType, shouldNotBeNull("valueType")::create); @SuppressWarnings({ "unchecked", "rawtypes" }) diff --git a/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/servicereference/ServiceReferenceAssert.java b/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/servicereference/ServiceReferenceAssert.java index 82cea928..0b2779a0 100644 --- a/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/servicereference/ServiceReferenceAssert.java +++ b/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/servicereference/ServiceReferenceAssert.java @@ -59,7 +59,7 @@ public static ServiceReferenceAssert assertThat(ServiceRefere */ public static , SERVICE> InstanceOfAssertFactory> serviceReference( Class serviceType) { - requireNonNull(serviceType, shouldNotBeNull("serviceType").create()); + requireNonNull(serviceType, shouldNotBeNull("serviceType")::create); @SuppressWarnings({ "rawtypes", "unchecked" }) diff --git a/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/serviceregistration/ServiceRegistrationAssert.java b/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/serviceregistration/ServiceRegistrationAssert.java index 194634fc..1f6ca540 100644 --- a/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/serviceregistration/ServiceRegistrationAssert.java +++ b/org.osgi.test.assertj.framework/src/main/java/org/osgi/test/assertj/serviceregistration/ServiceRegistrationAssert.java @@ -58,7 +58,7 @@ public static ServiceRegistrationAssert assertThat( */ public static , SERVICE> InstanceOfAssertFactory> serviceRegistration( Class serviceType) { - requireNonNull(serviceType, shouldNotBeNull("serviceType").create()); + requireNonNull(serviceType, shouldNotBeNull("serviceType")::create); @SuppressWarnings({ "rawtypes", "unchecked" }) diff --git a/org.osgi.test.assertj.promise/src/main/java/org/osgi/test/assertj/promise/PromiseAssert.java b/org.osgi.test.assertj.promise/src/main/java/org/osgi/test/assertj/promise/PromiseAssert.java index 22b238da..c0c1ee73 100644 --- a/org.osgi.test.assertj.promise/src/main/java/org/osgi/test/assertj/promise/PromiseAssert.java +++ b/org.osgi.test.assertj.promise/src/main/java/org/osgi/test/assertj/promise/PromiseAssert.java @@ -68,7 +68,7 @@ public static PromiseAssert assertThat(Promise, RESULT> InstanceOfAssertFactory> promise( Class resultType) { - requireNonNull(resultType, shouldNotBeNull("resultType").create()); + requireNonNull(resultType, shouldNotBeNull("resultType")::create); @SuppressWarnings({ "rawtypes", "unchecked" }) From 0c435bf12c289d983a76d332f8e755b34743d968 Mon Sep 17 00:00:00 2001 From: BJ Hargrave Date: Thu, 7 Jul 2022 13:53:29 -0400 Subject: [PATCH 3/3] github: Move to actions/stale from probot/stale Signed-off-by: BJ Hargrave --- .github/stale.yml | 81 ------------------------------------- .github/workflows/stale.yml | 70 ++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 81 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 935819b7..00000000 --- a/.github/stale.yml +++ /dev/null @@ -1,81 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale -# Configuration options apply to both Issues and Pull Requests. -# We configure those individually to match our workflow (see `pulls:` and `issues:`) - -pulls: - # Number of days of inactivity before a Pull Request becomes stale - daysUntilStale: 365 - - # Number of days of inactivity before a Pull Request with the stale label is closed. - # Set to false to disable. If disabled, Pull Request still need to be closed manually, but will remain marked as stale. - daysUntilClose: 21 - - # Comment to post when marking as stale. Set to `false` to disable - markComment: > - This pull request has been automatically marked as stale because it has not had recent activity. - Given the limited bandwidth of the team, it will be closed if no further activity occurs. - If you intend to work on this pull request, please reopen the PR. - Thank you for your contributions. - - # Comment to post when closing a stale Pull Request. - closeComment: > - This pull request has been automatically closed due to inactivity. - If you are still interested in contributing this, please ensure that - it is rebased against the latest `main` branch, all review - comments have been addressed and the build is passing. - -issues: - # Number of days of inactivity before a Pull Request becomes stale - daysUntilStale: 365 - - # Number of days of inactivity before an Issue with the stale label is closed. - # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. - daysUntilClose: 21 - - # Comment to post when marking as stale. Set to `false` to disable - markComment: > - This issue has been automatically marked as stale because it has not had recent activity. - Given the limited bandwidth of the team, it will be automatically closed if no further - activity occurs. - If you feel this is something you could contribute, please have a look - at our [Contributor Guide](https://github.com/osgi/osgi-test/blob/main/CONTRIBUTING.md). - Thank you for your contribution. - - # Comment to post when closing a stale Issue. - closeComment: > - This issue has been automatically closed due to inactivity. If you can reproduce this or - if you have a good use case for this feature, please feel free - to reopen the issue with steps to reproduce, a quick explanation of your use case or a - high-quality pull request. - -# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -#onlyLabels: [] - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -# exemptLabels: -# - pinned -# - security -# - "[Status] Maybe Later" - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: true - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: true - -# Set to true to ignore issues with an assignee (defaults to false) -#exemptAssignees: false - -# Label to use when marking as stale -staleLabel: stale - -# Comment to post when removing the stale label. -# unmarkComment: > -# Your comment here. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -# only: issues - diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..3c15e7fb --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,70 @@ +#******************************************************************************* +# Copyright (c) Contributors to the Eclipse Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +#******************************************************************************* + +name: Stale + +on: + schedule: + - cron: '30 1 * * *' + +env: + LC_ALL: en_US.UTF-8 + +defaults: + run: + shell: bash + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + name: Stale + runs-on: 'ubuntu-latest' + steps: + - name: Stale Action + uses: actions/stale@v5 + with: + days-before-stale: 365 + days-before-close: 21 + exempt-all-milestones: true + stale-issue-label: 'stale' + stale-issue-message: > + This issue has been automatically marked as stale because it has not had recent activity. + Given the limited bandwidth of the team, it will be automatically closed if no further + activity occurs. + If you feel this is something you could contribute, please have a look + at our [Contributor Guide](https://github.com/osgi/osgi-test/blob/main/CONTRIBUTING.md). + Thank you for your contribution. + close-issue-message: > + This issue has been automatically closed due to inactivity. If you can reproduce this or + if you have a good use case for this feature, please feel free + to reopen the issue with steps to reproduce, a quick explanation of your use case or a + high-quality pull request. + stale-pr-label: 'stale' + stale-pr-message: > + This pull request has been automatically marked as stale because it has not had recent activity. + Given the limited bandwidth of the team, it will be closed if no further activity occurs. + If you intend to work on this pull request, please reopen the PR. + Thank you for your contributions. + close-pr-message: > + This pull request has been automatically closed due to inactivity. + If you are still interested in contributing this, please ensure that + it is rebased against the latest `main` branch, all review + comments have been addressed and the build is passing.