diff --git a/.github/workflows/maven-verify-test.yml b/.github/workflows/maven-verify-test.yml index 3cd11dd..af15cae 100644 --- a/.github/workflows/maven-verify-test.yml +++ b/.github/workflows/maven-verify-test.yml @@ -21,12 +21,14 @@ on: [ push, pull_request ] jobs: + # default config verify-1: name: Verify 1 uses: ./.github/workflows/maven-verify.yml + # override fail fast config verify-2: - name: Verify 2 + name: Verify 2 - fail fast config uses: ./.github/workflows/maven-verify.yml needs: verify-1 with: @@ -35,4 +37,40 @@ jobs: ff-jdk: '21' verify-goal: clean install verify-fail-fast: false - maven-matrix: '[ "3.9.6", "3.8.8", "3.6.3" ]' + maven-matrix: '[ "3.9.11", "3.8.9", "3.6.3" ]' + + # test with Maven 4 + verify-3: + name: Verify 3 - with Maven 4 + uses: ./.github/workflows/maven-verify.yml + needs: verify-2 + with: + maven4-enabled: true + ff-site-run: false + + # test with Maven 4 without fail fast job + verify-4: + name: Verify 4 - with Maven 4 - no ff job + uses: ./.github/workflows/maven-verify.yml + needs: verify-3 + with: + maven4-enabled: true + ff-run: false + + # test only fail fast job + verify-5: + name: Verify 5 - disable matrix build + uses: ./.github/workflows/maven-verify.yml + needs: verify-4 + with: + ff-site-run: false + matrix-enabled: false + + # test only Maven 4 + verify-6: + name: Verify 6 - Maven4 build + uses: ./.github/workflows/maven-verify.yml + needs: verify-5 + with: + maven4-build: true + ff-site-run: false diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml index ca83795..ee486ae 100644 --- a/.github/workflows/maven-verify.yml +++ b/.github/workflows/maven-verify.yml @@ -29,7 +29,7 @@ on: os-matrix: description: os matrix as json array required: false - default: '[ "ubuntu-latest", "windows-latest", "macOS-latest" ]' + default: '[ "ubuntu-latest", "windows-latest", "macos-latest" ]' type: string jdk-matrix: @@ -41,15 +41,33 @@ on: jdk-distribution-matrix: description: jdk distribution matrix required: false - default: '[ "temurin" ]' + default: '[ "zulu" ]' type: string maven-matrix: description: The Maven version matrix as json array required: false - default: '[ "3.6.3", "3.9.6" ]' + default: '[ "3.6.3", "3.9.11" ]' type: string + maven4-version: + description: The Maven 4.x version matrix + required: false + default: '4.0.0-rc-4' + type: string + + maven4-enabled: + description: Determinate if use Maven 4 in build matrix + required: false + default: false + type: boolean + + maven4-build: + description: Determinate if use only Maven 4 in all builds + required: false + default: false + type: boolean + matrix-include: description: include for matrix as json required: false @@ -62,10 +80,16 @@ on: default: '[]' type: string + matrix-enabled: + description: Determinate if use matrix build + required: false + default: true + type: boolean + max-parallel: description: max parallel jobs required: false - default: 100 + default: 20 type: number timeout-minutes: @@ -90,7 +114,7 @@ on: ff-maven: description: The Maven version used during fail-fast-build job required: false - default: '3.9.6' + default: '3.9.11' type: string ff-jdk: @@ -102,7 +126,7 @@ on: ff-jdk-distribution: description: The jdk distribution used during fail-fast-build job required: false - default: 'temurin' + default: 'zulu' type: string ff-goal: @@ -152,6 +176,18 @@ on: default: false type: boolean + install-subversion: + description: Ensure all build images have Subversion(svn) installed + required: false + default: false + type: boolean + + install-gpg: + description: Ensure all build images have GnuPG installed + required: false + default: false + type: boolean + # allow single build per branch or PR concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -162,26 +198,88 @@ permissions: {} jobs: + setup-maven-version: + runs-on: "ubuntu-latest" + # execute on any push or pull request from forked repo, skip release commit + if: > + (github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork)) && + !startsWith(github.event.head_commit.message , '[maven-release-plugin] prepare release') + outputs: + version: ${{ steps.version.outputs.version }} + maven-matrix: ${{ steps.maven.outputs.matrix }} + exclude-matrix: ${{ steps.exclude.outputs.matrix }} + + steps: + - id: version + name: setup Maven version for ff + run: | + if [ "${{ inputs.maven4-build }}" = "true" ]; then + echo "version=${{ inputs.maven4-version }}" >> $GITHUB_OUTPUT + else + echo "version=${{ inputs.ff-maven }}" >> $GITHUB_OUTPUT + fi + cat $GITHUB_OUTPUT + + - id: maven + name: setup Maven matrix + run: | + { + echo 'matrix<> "$GITHUB_OUTPUT" + + cat "$GITHUB_OUTPUT" + + - id: exclude + name: setup exclude matrix + run: | + { + echo 'matrix<> "$GITHUB_OUTPUT" + + cat "$GITHUB_OUTPUT" + # verify build on one node - before matrix will start fail-fast-build: - name: ${{ inputs.ff-os }} jdk-${{ inputs.ff-jdk }}-${{ inputs.ff-jdk-distribution }} ${{ inputs.ff-maven }} + name: ${{ inputs.ff-os }} jdk-${{ inputs.ff-jdk }}-${{ inputs.ff-jdk-distribution }} ${{ needs.setup-maven-version.outputs.version }} runs-on: ${{ inputs.ff-os }} timeout-minutes: ${{ inputs.ff-timeout-minutes }} - # execute on any push or pull request from forked repo - if: inputs.ff-run && ( github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork ) ) + needs: setup-maven-version + if: inputs.ff-run steps: + - name: Install Subversion on Ubuntu + if: inputs.install-subversion && runner.os == 'Linux' + run: sudo apt install subversion + + - name: Install Subversion on MacOS + if: inputs.install-subversion && runner.os == 'MacOS' + run: brew install subversion + - name: Show free disk space run: df -h shell: bash - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4 with: persist-credentials: false - name: Set up JDK - uses: actions/setup-java@v4 + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v4 with: java-version: ${{ inputs.ff-jdk }} distribution: ${{ inputs.ff-jdk-distribution }} @@ -189,7 +287,7 @@ jobs: - name: Set up Maven run: - mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.2.0:wrapper "-Dmaven=${{ inputs.ff-maven }}" + mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.3:wrapper "-Dmaven=${{ needs.setup-maven-version.outputs.version }}" - name: Build with Maven run: ./mvnw --errors --batch-mode --show-version ${{ inputs.maven-args }} ${{ inputs.ff-goal }} @@ -199,34 +297,36 @@ jobs: if: inputs.ff-site-run - name: Upload Maven Site - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 if: inputs.ff-site-run with: - name: ${{ github.run_number }}-site-${{ inputs.ff-os }}-${{ inputs.ff-jdk }}-${{ inputs.ff-jdk-distribution }} + name: ${{ github.run_number }}-site-${{ inputs.ff-os }}-${{ inputs.ff-jdk }}-${{ inputs.ff-jdk-distribution }}-${{ needs.setup-maven-version.outputs.version }} path: | target/staging/** - name: Upload artifact on failure - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 if: failure() && inputs.failure-upload-path != '' with: - name: ${{ github.run_number }}-failure-${{ inputs.ff-os }}-${{ inputs.ff-jdk }}-${{ inputs.ff-jdk-distribution }} + name: ${{ github.run_number }}-failure-${{ inputs.ff-os }}-${{ inputs.ff-jdk }}-${{ inputs.ff-jdk-distribution }}-${{ needs.setup-maven-version.outputs.version }} path: ${{ inputs.failure-upload-path }} - name: Show free disk space - if: always() + if: (!cancelled()) run: df -h shell: bash - name: Clean Ensuring no file handle remains open on windows - run: ./mvnw clean --errors --batch-mode --show-version + run: ./mvnw clean --errors --batch-mode --show-version "-Dmaven.clean.retryOnError" verify: - needs: fail-fast-build + if: > + (!cancelled()) && inputs.matrix-enabled && ( !inputs.ff-run || needs.fail-fast-build.result == 'success' ) && + !startsWith(github.event.head_commit.message , '[maven-release-plugin] prepare release') + needs: [setup-maven-version, fail-fast-build] name: ${{ matrix.os }} jdk-${{ matrix.jdk }}-${{ matrix.distribution }} ${{ matrix.maven }} timeout-minutes: ${{ inputs.timeout-minutes }} runs-on: ${{ matrix.os }} - if: always() && ( !inputs.ff-run || needs.fail-fast-build.result == 'success' ) strategy: fail-fast: ${{ inputs.verify-fail-fast }} @@ -234,9 +334,9 @@ jobs: os: ${{ fromJSON( inputs.os-matrix ) }} jdk: ${{ fromJSON( inputs.jdk-matrix ) }} distribution: ${{ fromJSON( inputs.jdk-distribution-matrix ) }} - maven: ${{ fromJSON( inputs.maven-matrix ) }} + maven: ${{ fromJSON( needs.setup-maven-version.outputs.maven-matrix ) }} include: ${{ fromJSON( inputs.matrix-include ) }} - exclude: ${{ fromJSON( inputs.matrix-exclude ) }} + exclude: ${{ fromJSON( needs.setup-maven-version.outputs.exclude-matrix ) }} max-parallel: ${{ inputs.max-parallel }} steps: @@ -246,7 +346,8 @@ jobs: matrix.os != inputs.ff-os || matrix.jdk != inputs.ff-jdk || matrix.distribution != inputs.ff-jdk-distribution || - matrix.maven != inputs.ff-maven || + (!inputs.maven4-build && matrix.maven != inputs.ff-maven) || + (inputs.maven4-build && matrix.maven != inputs.maven4-version) || inputs.verify-goal != inputs.ff-goal run: echo ok @@ -258,10 +359,43 @@ jobs: if: > inputs.install-mercurial && steps.should-run.conclusion == 'success' && - matrix.os == 'macOS-latest' + matrix.os == 'macos-latest' run: | brew install mercurial + - name: Install Subversion on Ubuntu + if: > + inputs.install-subversion && + steps.should-run.conclusion == 'success' && + runner.os == 'Linux' + run: | + sudo apt install subversion + + - name: Install Subversion on MacOS + if: > + inputs.install-subversion && + steps.should-run.conclusion == 'success' && + runner.os == 'MacOS' + run: | + brew install subversion + + - name: Install GnuPG + if: > + inputs.install-gpg && + steps.should-run.conclusion == 'success' && + matrix.os == 'windows-latest' + run: | + $env:PATH = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin" + [Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine") + choco install --yes gpg4win + echo "C:\Program Files (x86)\Gpg4win\..\GnuPG\bin" >> $env:GITHUB_PATH + + - name: Check GnuPG + if: > + inputs.install-gpg && + steps.should-run.conclusion == 'success' + run: gpg --version + - name: Show free disk space if: steps.should-run.conclusion == 'success' run: df -h @@ -269,13 +403,13 @@ jobs: - name: Checkout if: steps.should-run.conclusion == 'success' - uses: actions/checkout@v4 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4 with: persist-credentials: false - name: Set up JDK if: steps.should-run.conclusion == 'success' - uses: actions/setup-java@v4 + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v4 with: java-version: ${{ matrix.jdk }} distribution: ${{ matrix.distribution }} @@ -283,24 +417,24 @@ jobs: - name: Set up Maven if: steps.should-run.conclusion == 'success' - run: mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.2.0:wrapper "-Dmaven=${{ matrix.maven }}" + run: mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.3:wrapper "-Dmaven=${{ matrix.maven }}" - name: Build with Maven if: steps.should-run.conclusion == 'success' run: ./mvnw --errors --batch-mode --show-version ${{ inputs.maven-args }} ${{ inputs.verify-goal }} - name: Upload artifact on failure - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 if: steps.should-run.conclusion == 'success' && failure() && inputs.failure-upload-path != '' with: - name: ${{ github.run_number }}-failure-${{ matrix.os }}-${{ matrix.jdk }}-${{ matrix.distribution }} + name: ${{ github.run_number }}-failure-${{ matrix.os }}-${{ matrix.jdk }}-${{ matrix.distribution }}-${{ matrix.maven }} path: ${{ inputs.failure-upload-path }} - name: Show free disk space - if: steps.should-run.conclusion == 'success' && always() + if: steps.should-run.conclusion == 'success' && !cancelled() run: df -h shell: bash - name: Clean Ensuring no file handle remains open on windows if: steps.should-run.conclusion == 'success' - run: ./mvnw clean --errors --batch-mode --show-version + run: ./mvnw clean --errors --batch-mode --show-version "-Dmaven.clean.retryOnError" diff --git a/.github/workflows/pr-automation.yml b/.github/workflows/pr-automation.yml new file mode 100644 index 0000000..0df833c --- /dev/null +++ b/.github/workflows/pr-automation.yml @@ -0,0 +1,195 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + +name: PR Automation +on: + workflow_call: + inputs: + default-label: + description: The default label to add to PR + required: false + default: 'maintenance' + type: string + +# allow single build per branch or PR +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }} + cancel-in-progress: false + +# clare all permissions for GITHUB_TOKEN +permissions: {} + +jobs: + # dump GitHub context only when the workflow is re runed, + # can help investigate problems + dump-github-context: + runs-on: ubuntu-latest + if: github.run_attempt > 1 + + steps: + - run: echo "ok" + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + shell: bash + + # check PR milestone - if not set - update with current opened milestone + milestone: + permissions: + issues: write + pull-requests: write + + if: > + github.event.action == 'closed' && + github.event.pull_request.merged && + !github.event.pull_request.milestone && + !contains(github.event.pull_request.labels.*.name, 'skip-changelog') + runs-on: ubuntu-latest + steps: + - name: Update milestone + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const milestones = await github.rest.issues.listMilestones({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open' + }); + + console.log(milestones); + const branch = context.payload.pull_request.base.ref + + if (milestones.data.length == 0) { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: '@' + context.payload.pull_request.merged_by.login + + ' The PR can\'t be associated to a milestone, because there is no open milestone. Please create a new milestone before merge.' + }); + throw new Error('The PR can\'t be associated to a milestone, because there is no open milestone. Please create a new milestone before merge.') + } + + var milestone; + if (milestones.data.length > 1) { + milestone = milestones.data.find(({description}) => description?.includes('branch: ' + branch)); + if (!milestone) { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: '@' + context.payload.pull_request.merged_by.login + + ' The PR can\'t be associated to a milestone, because there are multiple open milestones. Please add the text "branch: ' + branch + '" to the description to the milestone where this PR belongs to.' + }); + throw new Error('The PR can\'t be associated to a milestone, because there are multiple open milestones. Please add the text "branch: ' + branch + '" to the description to the milestone where this PR belongs to.'); + } + } else { + milestone = milestones.data[0]; + } + + console.log('Set milestone to: ' + milestone.title); + + const result = await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + milestone: milestone.number + }); + + console.log(result); + + # check PR milestone - remove for not merged PR or with skip-changelog label + milestone-rm: + permissions: + issues: write + pull-requests: write + + if: > + github.event.action == 'closed' && + (!github.event.pull_request.merged || contains(github.event.pull_request.labels.*.name, 'skip-changelog')) && + github.event.pull_request.milestone + runs-on: ubuntu-latest + steps: + - name: Remove milestone + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + + const result = await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + milestone: null + }); + + console.log(result); + + # check PR labels - if is empty list add one default + labels: + permissions: + issues: write + pull-requests: write + + if: > + github.event.action == 'closed' && + github.event.pull_request.merged && + toJSON(github.event.pull_request.labels) == '[]' + runs-on: ubuntu-latest + steps: + - name: Comment PR + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: '@' + context.payload.pull_request.merged_by.login + + ' Please assign appropriate label to PR according to the type of change.' + }); + + throw new Error('PRs must be labeled'); + + # check PR assignee - if no one is assigned, assign to person who merge PR + assignees: + permissions: + issues: write + pull-requests: write + + if: > + github.event.action == 'closed' && + github.event.pull_request.merged && + toJSON(github.event.pull_request.assignees) == '[]' + runs-on: ubuntu-latest + steps: + + - name: Assign PR + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + + console.log(context.payload.pull_request); + console.log(context.payload.pull_request.merged_by); + + const result = await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + assignees: [ context.payload.pull_request.merged_by.login ] + }); + + console.log(result); diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 7c6ef19..40863e8 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -20,14 +20,81 @@ name: Release Drafter on: workflow_call: + inputs: + config-name: + description: | + If your workflow requires multiple release-drafter configs it be helpful to override the config-name. + The config should still be located inside `.github` as that's where we are looking for config files. + required: false + type: string + default: 'release-drafter.yml' + commits-since: + description: | + A date in ISO format marking the initial commit for the release draft. This is applied only when no prior release is available. + required: false + type: string + + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false jobs: + detect-version: + # skip release drafter on releases commits + if: (!startsWith(github.event.head_commit.message , '[maven-release-plugin] prepare for next development iteration')) + + name: Detect version + runs-on: ubuntu-latest + permissions: {} + outputs: + version: ${{ steps.version.outputs.version }} + + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4 + with: + persist-credentials: 'false' + + - id: has-pom + run: | + if [ -f pom.xml ]; then + echo "status=true" >> $GITHUB_OUTPUT + fi + cat $GITHUB_OUTPUT + + - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v4 + if: steps.has-pom.outputs.status == 'true' + with: + java-version: '21' + distribution: 'zulu' + cache: 'maven' + + - id: version + if: steps.has-pom.outputs.status == 'true' + run: | + mvn --batch-mode --non-recursive help:evaluate -Dexpression=project.version -Doutput=target/version.txt + V=$(cat target/version.txt) + echo "version=${V%-SNAPSHOT}" >> $GITHUB_OUTPUT + cat $GITHUB_OUTPUT + update_release_draft: + name: Update Release Draft + needs: detect-version permissions: # write permission is required to create a github release contents: write runs-on: ubuntu-latest steps: - - uses: release-drafter/release-drafter@v6 + - uses: apache/maven-gh-actions-shared@release-drafter # temporary copy of the release-drafter action + id: release-drafter + with: + config-name: ${{ inputs.config-name }} + version: ${{ needs.detect-version.outputs.version }} + commitish: ${{ github.ref }} + commits-since: ${{ inputs.commits-since }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Verify release drafter status + if: steps.release-drafter.outputs.id == '' + run: exit 1 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..0e56595 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,89 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + +# https://github.com/actions/stale + +name: Stale + +on: + workflow_call: + +permissions: + issues: write + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.issue.number }} + cancel-in-progress: false + +jobs: + stale-waiting-for-feedback: + if: github.event_name == 'schedule' + name: 'Manage issues, PRs with waiting-for-feedback label' + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10 + with: + days-before-stale: '60' + days-before-close: '30' + stale-issue-message: 'This issue is stale because it has been waiting for feedback for 60 days. Remove the stale label or comment on this issue, or it will be automatically closed in 30 days.' + close-issue-message: 'This issue has been closed because no response was received within 90 days.' + stale-pr-message: 'This pull request is stale because it has been waiting for feedback for 60 days. Remove the stale label or comment on this PR, or it will be automatically closed in 30 days.' + close-pr-message: 'This pull request has been closed because no response was received within 90 days.' + any-of-labels: 'waiting-for-feedback' + exempt-all-milestones: 'true' + exempt-issue-labels: 'priority:blocker,priority:critical' + exempt-pr-labels: 'priority:blocker,priority:critical' + + remove-labels: + if: > + github.event_name == 'issue_comment' && github.event.action == 'created' && + (contains(github.event.issue.labels.*.name, 'waiting-for-feedback') || contains(github.event.issue.labels.*.name, 'Stale')) + name: 'Remove waiting-for-feedback label' + runs-on: ubuntu-latest + + steps: + - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + name: Remove waiting-for-feedback + if: contains(github.event.issue.labels.*.name, 'waiting-for-feedback') + with: + script: | + + const result = await github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + name: 'waiting-for-feedback' + }); + + console.log(result); + + - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + name: Remove Stale + if: contains(github.event.issue.labels.*.name, 'Stale') + with: + script: | + + const result = await github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + name: 'Stale' + }); + + console.log(result); diff --git a/pom.xml b/pom.xml index fe18fe3..945cdf8 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.apache.maven maven-parent - 39 + 44 @@ -49,4 +49,10 @@ + + + + run-its + +