diff --git a/.github/workflows/label_pr.yml b/.github/workflows/label_pr.yml index dfcd25a9..5def352c 100644 --- a/.github/workflows/label_pr.yml +++ b/.github/workflows/label_pr.yml @@ -35,7 +35,7 @@ jobs: github.event.workflow_run.conclusion == 'success' steps: - name: Download the PR number artifact - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ @@ -67,3 +67,15 @@ jobs: with: labels: validated number: ${{ steps.read.outputs.pr_number }} + + - name: "Label the PR (replacement)" + uses: "actions/github-script@v7" + with: + script: | + github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + name: 'validated' + }); + if: github.event_name == 'pull_request' diff --git a/.github/workflows/reset_pr.yml b/.github/workflows/reset_pr.yml index b3446f67..54b90d1d 100644 --- a/.github/workflows/reset_pr.yml +++ b/.github/workflows/reset_pr.yml @@ -34,7 +34,14 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - name: Reset the PR label - uses: actions-ecosystem/action-remove-labels@v1 + - name: "Reset the PR label" + uses: "actions/github-script@v7" with: - labels: validated + script: | + github.rest.issues.removeLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + name: 'validated' + }); + if: github.event_name == 'pull_request' diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml index 111d6b1c..42c577a2 100644 --- a/.github/workflows/validate_pr.yml +++ b/.github/workflows/validate_pr.yml @@ -27,10 +27,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python and caching - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' cache: 'pip' @@ -77,7 +77,7 @@ jobs: echo $PR_NUMBER > ./pr/pr_number - name: Upload the PR number - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pr_number path: pr/