From 6fdae914700db34a974aacc9e7c5a7f295128fa3 Mon Sep 17 00:00:00 2001 From: Gerd Date: Tue, 27 May 2025 17:49:21 +0200 Subject: [PATCH] update --- .github/workflows/test.yml | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d3a3aebc..2e883ea97 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,35 +9,26 @@ jobs: relabel-issues: runs-on: ubuntu-latest steps: - - name: search - uses: actions/github-script@v7 + - name: find id: find_issues + uses: peter-evans/find-issues@v3 with: - script: | - const issues = await github.paginate( - github.rest.issues.listForRepo, - { - owner: context.repo.owner, - repo: context.repo.repo, - state: 'open', - labels: 'scheduled-next-release', - per_page: 100, - } - ); - return issues.map(issue => issue.number); + query: 'is:open label:scheduled-next-release' + sort: created + direction: asc - name: remove - if: steps.find_issues.outputs.result != '[]' + if: steps.find_issues.outputs.issues != '' uses: actions-ecosystem/action-remove-labels@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} + number: ${{ steps.find_issues.outputs.issue-number }} labels: scheduled-next-release - number: ${{ fromJson(steps.find_issues.outputs.result)[0] }} - name: add - if: steps.find_issues.outputs.result != '[]' + if: steps.find_issues.outputs.issues != '' uses: actions-ecosystem/action-add-labels@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} + issue_number: ${{ steps.find_issues.outputs.issue-number }} labels: fixed-pending-release - number: ${{ fromJson(steps.find_issues.outputs.result)[0] }}