From c4cd4f0371afba80fad89be91c8db77d2e73ead3 Mon Sep 17 00:00:00 2001 From: Alexander Dokuchaev Date: Fri, 25 Apr 2025 20:11:24 +0300 Subject: [PATCH] Revert "[gha] Automatically add job link to PR description (#3453)" This reverts commit dd99ed548e895a5625a33e53a762c055dd0df825. --- .github/actions/add_job_link/action.yml | 40 ------------------- .../conformance_weight_compression.yml | 20 ---------- .github/workflows/examples.yml | 20 ---------- .github/workflows/install.yml | 20 ---------- .github/workflows/macos.yml | 20 ---------- 5 files changed, 120 deletions(-) delete mode 100644 .github/actions/add_job_link/action.yml diff --git a/.github/actions/add_job_link/action.yml b/.github/actions/add_job_link/action.yml deleted file mode 100644 index 900fedd8f1b..00000000000 --- a/.github/actions/add_job_link/action.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: 'Add job link to PR description' -inputs: - pull_request_number: - description: 'Pull Request number' - required: true - link_name: - description: 'Name of link, should contain only alphanumeric characters, dashes, and underscores' - required: true -runs: - using: "composite" - steps: - - name: Update PR description with preview link - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 - with: - script: | - const prNumber = parseInt(${{ inputs.pull_request_number }}); - const newLink = `https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}`; - const newLine = `[${{ inputs.link_name }}](${newLink})`; - - const { data: pr } = await github.rest.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: prNumber - }); - - let body = pr.body || ''; - const regex = /\[${{ inputs.link_name }}\]\([^)]+\)/; - - if (regex.test(body)) { - body = body.replace(regex, newLine); - } else { - body = body.trim() + `\n\n${newLine}`; - } - - await github.rest.pulls.update({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: prNumber, - body - }); diff --git a/.github/workflows/conformance_weight_compression.yml b/.github/workflows/conformance_weight_compression.yml index 4aae0a3e834..d6c670a20de 100644 --- a/.github/workflows/conformance_weight_compression.yml +++ b/.github/workflows/conformance_weight_compression.yml @@ -71,23 +71,3 @@ jobs: run: | pip install defusedxml==0.7.1 python .github/scripts/pytest_md_summary.py pytest-results.xml >> $GITHUB_STEP_SUMMARY - - update-pr-description: - name: Update PR description - runs-on: ubuntu-22.04 - if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.pull_request_number != '' }} - permissions: - contents: write - pull-requests: write - issues: write - steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - with: - sparse-checkout: .github/actions/add_job_link - - name: Update PR preview link - uses: ./.github/actions/add_job_link - with: - pull_request_number: ${{ inputs.pull_request_number }} - link_name: "Test_Weight_Compression" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 4570bd60a9f..057c12b1da2 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -203,23 +203,3 @@ jobs: run: | pip install defusedxml==0.7.1 python .github/scripts/pytest_md_summary.py pytest-results.xml >> $GITHUB_STEP_SUMMARY - - update-pr-description: - name: Update PR description - runs-on: ubuntu-22.04 - if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.pull_request_number != '' }} - permissions: - contents: write - pull-requests: write - issues: write - steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - with: - sparse-checkout: .github/actions/add_job_link - - name: Update PR preview link - uses: ./.github/actions/add_job_link - with: - pull_request_number: ${{ inputs.pull_request_number }} - link_name: "Test_Examples" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index bf6e3de30b3..6067ec01820 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -90,23 +90,3 @@ jobs: export PATH=/usr/local/cuda-12.4/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} pytest tests/cross_fw/install -rA -s --host-configuration gpu --backend torch - - update-pr-description: - name: Update PR description - runs-on: ubuntu-22.04 - if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.pull_request_number != '' }} - permissions: - contents: write - pull-requests: write - issues: write - steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - with: - sparse-checkout: .github/actions/add_job_link - - name: Update PR preview link - uses: ./.github/actions/add_job_link - with: - pull_request_number: ${{ inputs.pull_request_number }} - link_name: "Test_Install" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 805bb9b367b..967936289dc 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -59,23 +59,3 @@ jobs: run: pytest -ra tests/openvino env: ONEDNN_MAX_CPU_ISA: AVX2 - - update-pr-description: - name: Update PR description - runs-on: ubuntu-22.04 - if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.pull_request_number != '' }} - permissions: - contents: write - pull-requests: write - issues: write - steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - with: - sparse-checkout: .github/actions/add_job_link - - name: Update PR preview link - uses: ./.github/actions/add_job_link - with: - pull_request_number: ${{ inputs.pull_request_number }} - link_name: "Test_MacOS" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}